[sqlite] Much unused space in sqlite3 database when using blobs

2014-12-01 Thread Александр Гурьянов
Hi. Hi. I am writing an app that stores some blobs in sqlite3 database. My question is about disk space usage. For analyst i use sqlite_analyzer. My database is created with this script: PRAGMA page_size = 512; PRAGMA synchronous = OFF; PRAGMA journal_mode = MEMORY; begin; create table

Re: [sqlite] Much unused space in sqlite3 database when using blobs

2014-12-01 Thread Richard Hipp
On Sun, Nov 30, 2014 at 11:06 PM, Александр Гурьянов caiiiy...@gmail.com wrote: Hi. Hi. I am writing an app that stores some blobs in sqlite3 database. My question is about disk space usage. For analyst i use sqlite_analyzer. My database is created with this script: PRAGMA page_size = 512;

Re: [sqlite] Much unused space in sqlite3 database when using blobs

2014-12-01 Thread Paul Sanderson
Further to Richards comment the formula to determine when a record overflows into a page file is given in section 1.5 of the file format doc http://www.sqlite.org/fileformat.html The relevant section states: The amount of payload that spills onto overflow pages also depends on the page type.

Re: [sqlite] Much unused space in sqlite3 database when using blobs

2014-12-01 Thread Александр Гурьянов
Richard, Paul thanks! You help me so much. Omitting WITHOUT ROWID do the trick. 2014-12-02 3:04 GMT+07:00 Paul Sanderson sandersonforens...@gmail.com: Further to Richards comment the formula to determine when a record overflows into a page file is given in section 1.5 of the file format doc