On 30 Aug 2013, at 5:37am, techi eth <techi...@gmail.com> wrote:

> I am using Jffs2 file system. As of now I using all default from
> sqlite3.I am not sure with this information it is possible to get some
> approx that with 'X KB data, database file size will be 'Y' KB or MB.

Your best way to figure this out is to make a set of files with different 
amounts of data in yourself and 
plot how the file size grows with data size on your hardware with your 
operating system and your storage device and your file system.  If you can work 
out your own formula then you can assume it will continue working until you 
change something.

Also note that a page in the file contains data only from one table or one 
index.  So the result is a little different depending on whether you added 500 
records to one table and 80 to another table, or just added 580 records to one 
table.


On 30 Aug 2013, at 5:43am, techi eth <techi...@gmail.com> wrote:

> I am thinking to use auto_vacuum INCREMENTAL & PRAGMA
> incremental_vacuum(N) to make sure whenever required, pages can be
> free.
> 
> I assume this will be better option with compare to FULL.

This would be complicated, involve fragmentation, and would tie the system up 
for a lot of time.  It would be better to stick to just one way of doing it: 
either

A) set no PRAGMAs and just VACUUM immediately after a DELETE FROM which deleted 
lots of data

or

B) use "PRAGMA auto_vacuum = FULL" and just let the system do what it wants.

Once again I point out that these things only make a difference if you have 
deleted significant amounts of data from a file and have not already used up 
the released space with new data.  Almost no uses of SQLite do this, most of 
them have database files which grow and don't shrink much.

Simon.
_______________________________________________
sqlite-users mailing list
sqlite-users@sqlite.org
http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users

Reply via email to