Yes, I guess I am trying to figure out which poison to pick :-) So here is what I need:
1. Lowest possible writes to the NAND. 2. Highest possible database reliability in situations of power outage/reboots since the device is unmonitored. 3. Am ok with losing 2-5 minutes of data as long as 2 is not compromised. I think keeping temp files in memory is a good idea but i was concerned as I read at a few places that if rollback journals are kept in memory then on power outage you not only lose the 2 minutes data but can have a corrupt DB in hand as there is no journal to lookup to for rollbacks. Is that correct? It seems WAL with SYNC=NORMAL and SQLITE_TEMP_STORE=3 is the right way to go as it will always maintain my DB in good state even if I lose 2 minutes of data. Thanks all for the quick help, Pankaj On Mon, Aug 30, 2010 at 6:20 PM, Black, Michael (IS) <michael.bla...@ngc.com > wrote: > Well...yeh...but you were complaining about the logs being written to your > flash...you gotta' pick your poison. > > If you keep only the temporary files in memory you should be OK. That's > what the compilation flag is for. > > Keeping your entire database in memory is probably on an option if it's > small. > > Do you grow your database forever? Or is there some limit to what you're > doing I assume? > > If you're happy with the 660 writes-per-day from your 2-minute transaction > than the previous solutions (WAL, synchrnous, -DSQLITE_TEMP_STORE=3) should > make you happy. You'll only stand to lose the 2-minute transaction which is > where you were when you started this thread. > > > Michael D. Black > Senior Scientist > Advanced Analytics Directorate > Northrop Grumman Information Systems > > > ________________________________ > > From: sqlite-users-boun...@sqlite.org on behalf of Pankaj Chawla > Sent: Mon 8/30/2010 7:21 AM > To: General Discussion of SQLite Database > Subject: EXTERNAL:Re: [sqlite] Sqlite on NAND flash devices... > > > > HI Michael, > > Thanks for the reply. Wont keeping things in memory lead to chances of > db getting corrupt especially in cases of power failure or device reboots. > I am not sure but since Sqlite is now used so frequently in embedded > devices > and most devices use flash memories how are these situations mitigated. > Are there are papers/best practices available that can help. It seems to be > that if we try to reduce NAND writes by doing things in memory we lose on > reliability and the way to increase reliability is to do frequent writes. > Is > that > a correct understanding? > > Thanks > Pankaj > > > > > _______________________________________________ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > > _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users