After SQLite obtains a read lock it will have to perform at least the
following:
- check the file header to check for corruption
- check for a hot transaction log, and roll back changes if necessary
- read the database schema from the sqlite_master table

This is the most likely cause of the repetitive behavior you're seeing.

Ok, that makes sense.


That said: the OS will of course cache the database file as well, and
many of the 'read' calls will be very fast.

I think you're right about that. After researching it a bit more, I've noticed that disk read usage is actually almost zero during all of this which certainly supports your claim. It is the disk write activity that might be slowing things down for me. I'll have to see if I can figure out anything to speed up inserts. I've tried setting synchronize to off but after a time the inserts seem to build up and performance degrades to about the same point it is with synchronize set to full.

Thanks for the info.

l8r
Sean

Reply via email to