I am inserting using this code
timex.start();
// static int i = 0;
QString query
= TableQueries
::insertDataQuery();
qDebug() << ++i;
qDebug() << "::> " << timex.elapsed();
db_query.prepare(query);
qDebug() << ":::> " << timex.elapsed();
int pos = 0;
db_query.bindValue(pos++, Id);
db_query.bindValue(pos++, date);
db_query.bindValue(pos++, time);
db_query.bindValue(pos++, value);
qDebug() << "::::> " << timex.elapsed();
bool exec = db_query.exec();
qDebug() << ":::::> " << timex.elapsed();
QTime timex;
timex.start();
// static int i = 0;
QString query = TableQueries::insertDataQuery();
qDebug() << ++i;
qDebug() << "::> " << timex.elapsed();
db_query.prepare(query);
qDebug() << ":::> " << timex.elapsed();
int pos = 0;
db_query.bindValue(pos++, Id);
db_query.bindValue(pos++, date);
db_query.bindValue(pos++, time);
db_query.bindValue(pos++, value);
qDebug() << "::::> " << timex.elapsed();
bool exec = db_query.exec();
qDebug() << ":::::> " << timex.elapsed();
To copy to clipboard, switch view to plain text mode
And the frequency of my data is around 12000 records/Second.
Then how can transaction be achieved?
Bookmarks