Performance when using batch mode of Qt / MySQL

后端 未结 1 2165
佛祖请我去吃肉
佛祖请我去吃肉 2021-02-15 23:36

I am using the SQL module of Qt 5.3.1 (Win 7, VS2013) to insert data into a MySQL 5.6 database. After I noticed some performance issues I execute three test code snippets and me

1条回答
  •  心在旅途
    2021-02-16 00:21

    QMYSQL doesn't support BatchExec.

    You can use QSqlDriver::hasFeature(QSqlDriver::BatchOperations) to check if a driver support Batchexec.

    You can also check the source in QT_SRC/src/sql/drivers/mysql/qsql_mysql.cpp

    bool QMYSQLDriver::hasFeature(DriverFeature f) const

    it just returned false.

    0 讨论(0)
提交回复
热议问题