hi Simon, Thank you for your response. You are right that 5 minutes is probalby overkill, once per day is adequate for my purposes.
Given that, can anyone give any advice on the performance impact whenever integrity_check does run? Does it lock out other read and writes, for how long, other side effects, slowdowns, etc. Also, now the additional question I have: is integrity_check known or believed to return false positives... so it's responses should not be strictly relied upon? Simon Slavin-2 wrote: > > > On 15 Sep 2009, at 3:35pm, rschnitzer wrote: > >> I have an application that cannot afford to be locked out of the >> database >> for more than maybe a fraction of a second. However I'd like my >> application >> to be able to monitor the database for corruption. >> >> Given that, can anyone provide any general comments on running "pragma >> integrity_check" on a timer, e.g. every five minutes... > > If such a thing was really necessary it would be built into the SQLite > libraries and happen without you having to do it in your application. > Is your hardware really so untrustworthy that you think your database > might be corrupted every 5 minutes ? Are you running SATA over > BlueTooth or something ? > > In a mission-critical application I can understand running an > integrity check when the application is launched, or if it's perpetual > once a day. That's about the most I can imagine being useful, even to > the most paranoid. > > Another aspect is what you want your application to do if the > integrity check reports an error. If your application is really that > important, should it just quit with an error message ? Don't forget > the problem of false positives: perhaps integrity_check reports a > problem when the file is actually okay. > > Simon. > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > > -- View this message in context: http://www.nabble.com/Practicality-of-using-pragma-integrity_check-at-runtime-tp25455187p25461859.html Sent from the SQLite mailing list archive at Nabble.com. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users