Re: [sqlite] What is the recommended size we should keep aside for sqlite journal
On Wed, Jun 11, 2014 at 4:08 AM, Mayank Kumar (mayankum)wrote: > Thanks Richard. When there is not enough space to write a journal file, > what is the expected behavior. Will that and any transaction which cannot > write a journal file fail ? > > You will get an SQLITE_FULL error and the transaction will attempt to roll back. -- D. Richard Hipp d...@sqlite.org ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] What is the recommended size we should keep aside for sqlite journal
Thanks Richard. When there is not enough space to write a journal file, what is the expected behavior. Will that and any transaction which cannot write a journal file fail ? -Mayank -Original Message- From: sqlite-users-boun...@sqlite.org [mailto:sqlite-users-boun...@sqlite.org] On Behalf Of Richard Hipp Sent: Tuesday, June 10, 2014 4:21 PM To: General Discussion of SQLite Database Subject: Re: [sqlite] What is the recommended size we should keep aside for sqlite journal On Tue, Jun 10, 2014 at 6:43 PM, Mayank Kumar (mayankum) <mayan...@cisco.com > wrote: > We have limited flash space and we would like to know what is the > recommended allocation for the sqlite db vs sqlite journal file. > Should it be 50-50 or it doesn't matter. If there is no very less > space remaining to write the complete journal file, what will happen. > > The size of the journal file is a function of the size of your transactions. If you never do more than insert a single element into a single table, then parhaps 10K or 20K of journal space will be sufficient. If you run VACUUM, you'll need a journal file that is slightly bigger than your database. It is possible to construct a massive transaction for which the journal file is larger than your database, if you work at it. Also remember that the less free space there is in your flash device, the faster it will wear out. That has nothing to do with SQLite, of course - it is merely a characteristic of NAND flash. > > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > -- D. Richard Hipp d...@sqlite.org ___ 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
Re: [sqlite] What is the recommended size we should keep aside for sqlite journal
On Tue, Jun 10, 2014 at 6:43 PM, Mayank Kumar (mayankum)wrote: > We have limited flash space and we would like to know what is the > recommended allocation for the sqlite db vs sqlite journal file. Should it > be 50-50 or it doesn't matter. If there is no very less space remaining to > write the complete journal file, what will happen. > > The size of the journal file is a function of the size of your transactions. If you never do more than insert a single element into a single table, then parhaps 10K or 20K of journal space will be sufficient. If you run VACUUM, you'll need a journal file that is slightly bigger than your database. It is possible to construct a massive transaction for which the journal file is larger than your database, if you work at it. Also remember that the less free space there is in your flash device, the faster it will wear out. That has nothing to do with SQLite, of course - it is merely a characteristic of NAND flash. > > ___ > sqlite-users mailing list > sqlite-users@sqlite.org > http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users > -- D. Richard Hipp d...@sqlite.org ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users