> Couldn't you go ahead and do your quick check on startup and then do the
> integrity check later when the database is otherwise unoccupied?

I was thinking of doing a hybrid as you suggested.

> If your database is smaller than system memory then there is also value
> in just reading the entire file so that it is cached by the OS which
> will cause initial queries to be a lot quicker because they won't have
> to page in things from disk.

Yea, I have heard of the old 'cat myfile > /dev/null' to get pages
cached in the OS.
I didn't include the numbers, but I tested that as well and this takes
about 9 seconds
(reading the whole file to dev/null).
I then performed both tests above and the time was slightly more than
just flat out
issuing the command.

> If you look at your timing figures you can see that the integrity check
> and md5sum are spending all their time in system - ie reading the file
> into memory.  You may find a more effective way of reading into memory
> using appropriate block sizes, asynchronous I/O etc.  You can also tweak
> SQLite block sizes to match OS block sizes.

I will look into that.  Thank you for your feedback!

--
Rich
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to