Hi All,
Is it possible to do multiple updates of blobs using the bind variables, I
was doing them 1 at a time but it was a little slow.
For example :-
rc = sqlite3_prepare(objects_db, "UPDATE table SET proprietary_data = ?
WHERE device_id = ? and instance = ?", -1, &pStmt, 0);
for (i= 0; i <10;i++)
{
sqlite3_bind_blob(pStmt, 1, proprietary_data, proprietary_data_len,
SQLITE_STATIC);
sqlite3_bind_int(pStmt, 2, object->device_id);
sqlite3_bind_int(pStmt, 3, object->objectIdentifier.instance);
rc = sqlite3_step(pStmt);
}
if (sqlite3_finalize(pStmt))
Regards,
Chris
There is a pretty simple answer to all these kinds of questions. Use
transactions. You can see the details about transactions and performance
here: http://www.sqlite.org/cvstrac/wiki?p=PerformanceConsiderations . In my
experience, performance do improve a lot when transaction is used for such
an update or insert iteration.
If you don't know it yet, another idea is to use PRAGMA synchronous = OFF; .
This way, sqlite will rely on operating system disk cache, which is an even
greater improvement in performance.
Best regards,
He Shiming
-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------