On 23 Jul 2013, at 12:26pm, techi eth <techi...@gmail.com> wrote: > I would like to check how we can restrict SQLite3 for more > updating/dropping (I think this two will restrict flash life) based on > memory life. > > If I say my flash will support āNā Thousand access over the life time.
You are trying to minimise block writing. As always, you have several compromises in mind. Most of them would be controlled by PRAGMAs so look here: <http://www.sqlite.org/pragma.html> I recommend PRAGMA auto_vacuum = NONE PRAGMA automatic_index = OFF and maybe PRAGMA journal_mode = OFF PRAGMA synchronous = 0 | OFF The first two represent compromises between space used and the number of writes to the database file. They decrease the number of writes but allow the database to use more space. The second two represent compromises between data integrity and the number of writes to the database file. They decrease the number of writes but increase the chance that if your application (or the entire device) crashes, the data left in the database will be older. There's also a discussion to be had if you decide you do want to use a Journal. I am not sure which journalling mode would involve the fewest writes to storage. You should note that SQLite is not particularly bad at doing lots of writes. Both iPhone and Android phones, for example, constantly write log files to storage. If your device memory is reaching its cycle limit, SQLite may not be the cause of your problem. Simon. _______________________________________________ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users