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. 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. //a background thread while(1) { call LoadOrSaveDb() and returned sleep(10) <------ reset the system in between ,say 5th second moment. } Thanks for your comments. Pierr Chen _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users