dimanche 19 juillet 2015

SQLite UPDATE poor performance

The QT application has 1 background thread running where I queue Image objects that need to be updated in the database.

The thread wakes up and dequeues Image objects and calls a DB wrapper that finally executes a simple UPDATE statement on a unique primary key, like this:

UPDATE images SET path=... keywords=... caption=... WHERE uuid=...

uuid is the primary key. I have also added a UNIQUE INDEX for uuid (among others).

From the tests I've been doing it's taking ~250ms for each update which seems crazy.

Aucun commentaire:

Enregistrer un commentaire