On 16 Dec 2010, at 9:12pm, Marc wrote: > We have an application that runs under windows that use sqlite to store > data. Our application do a pragma integrity_check every time It's launched.
Why ? If you distrust your platform that much, you probably shouldn't use it at all. > One of our users have our application with a database of 180 Mb and It takes > about 6 minutes to complete a Pragma integrity_check the first time that our > application is launched after reboot computer. Is it normal that takes so > much time to complete the Pragma integrity check ? The application during > the pragma integrity_check do an intensive use of hard disk. Then if the > user launches the application another times without rebooting computer It > only tooks 8 seconds to complete the prama integrity_check and It don't use > the hard disk. We supose that the other times the database it's cached, but > it's a lot of difference between 6 minutes the first time we launched the > application and 8 seconds takes to completer after the first launch of our > application. You are seeing at least two levels of caching there. You storage system probably has on-board caching and your motherboard has caching too. I do not find the difference between the two times too surprising. > And another is it recommended to do a pragma integrity check every time that > our applications is launched? Nope. Some times you would normally use integrity_check would be (A) if your program is malfunctioning and you are trying to figure out why (B) if you're about to burn the database into a DVD or make multiple copies for distribution and wanted to check it before wasting a lot of production resources (C) if you are testing your hardware (i.e. designing and constructing your own platform) and are eager for any help in spotting failure If you trust your platform just open the file. You could run integrity_check once in a while while developing, but probably not even once a week. Once your application is working correctly you might run integrity_check once a year just for the hell of it. Simon. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users