On Thu, Nov 10, 2011 at 5:41 PM, Fabian <fabianpi...@gmail.com> wrote:
> I'm trying to understand the following: Why is it that when I create a new > database, and fill it with rows, why can it not be commited to disk the > same way as VACUUM would do it? Because when you are inserting the Nth row, SQLite has no idea of how many more rows will follow or how big the subsequent rows will be, so it has no way to reserve contiguous space sufficient to hold them all. The result is that parts of the table and parts of the indices become interleaved in the file. > Currently I'm trying to manually vacuum the > database by inserting rows sorted by table and by rowid, but as soon as the > table contains INDEXes I cannot reproduce anywhere near the same output as > a real VACUUM, because it writes the indexes first instead of last, for > example. Is there some trick to force VACUUM-like output when building the > database, and avoid to build it twice? > _______________________________________________ > 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