On May 22, 2009, at 3:55 PM, pierr chen wrote: > Hi, > I am using sqlite on Flash based embedded system in the following > way intended to 1) improve the insert/update/delete performance > 2)reduce > the Flash write numbers: > > a .when system is up, load the flash database to the memory > b. the delete/update/insert operation is on the memory database > c. sync the memory based database to the flash periodically > (say 10 > seconds) using on line back up api .I was using loadOrSaveDb() > function > list here. > http://www.sqlite.org/backup.html > > Compared with directly interacting with Flash based database ,the > insert/update/delete performance is improved with no doubt. However, > I found > following problems : > a. It seems when using loadOrSaveDb() , the backup engine will > always > copy the pages from memory database to the flash database even if > these two > database has exactly the same data. If it were the case, then I can > not > achieve my goal 2-reduce the Flash write number.
That's the nature of it at the moment unfortunately. The backup procedure always copies every page of the source db. > b. There always a journey file exist when I reset the system. I > am > thinking that If I reset the system after the loadOrSaveDb() > returned ,as > shown below,there should be no journey file exist as the write has > finished. Did you open the flash database with "PRAGMA locking_mode=exclusive", or some other option that would turn on persistent journals? Dan. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users