Take the 2-minute tour ×  I'm writing an application which must
log information pretty frequently, say, twice in a second. I
wish to save the information to an sqlite database, however I
don't mind to commit changes to the disk once every ten minutes.
Executing my queries when using a file-database takes to long,
and makes the computer lag.  An optional solution is to use an
in-memory database (it will fit, no worries), and synchronize it
to the disk from time to time,  Is it possible? Is there a
better way to achieve that (can you tell sqlite to commit to
disk only after X queries?).  Can I solve this with Qt's SQL
wrapper?  share|improve this question  3 Answers 3  up vote 6
down vote accepted  Let's assume you have an on-disk database
called 'disk_logs' with a table called 'events'. You could
attach an in-memory database to your existing database:  ATTACH
DATABASE ':memory:' AS mem_logs;  Create a table in that
database (which would be entirely in-memory) to receive the
incoming log events:  CREATE TABLE