Re: [sqlite] size control of sqlite database

2010-01-14 Thread Martin Engelschalk
Hi Roger, yes, thank you, i did not see this. Martin Roger Binns wrote: > -BEGIN PGP SIGNED MESSAGE- > Hash: SHA1 > > Martin.Engelschalk wrote: > >> However, i could not find a way to determine when the empty pages are >> used up and the file will start to grow again without checking

Re: [sqlite] size control of sqlite database

2010-01-14 Thread Roger Binns
-BEGIN PGP SIGNED MESSAGE- Hash: SHA1 Martin.Engelschalk wrote: > However, i could not find a way to determine when the empty pages are > used up and the file will start to grow again without checking the file > size after every insert. Doesn't PRAGMA freelist_count help with that?

Re: [sqlite] size control of sqlite database

2010-01-14 Thread Martin.Engelschalk
Hi, a sqlite database is a file, you can get its size using OS calls. It is not possible to create a database with an initial size, because the file grows dynamically when you insert data. To avoid fragmentation, I also looked for a way to allocate empty space inside the database file when

[sqlite] size control of sqlite database

2010-01-14 Thread gujx
Hi, I’d like to ask some question about the interface of the sqlite resource. Whether there is some interface to control the size of a database, for example, if I want to create a database with 5M initialized, how can I do that? And when I make change to a database, for example, insert a row to a