[sqlite] VACUUM not reclaiming space
Hi, I noticed an interesting disk-space behavior with VACUUM. If I vacuum my places.sqlite(Firefox database), it's 49mb. If then copy my 2 biggest tables with CREATE table2 as select * from orig_table; drop table ; alter table2 rename to table; Then vacuum, the db becomes 24mb. The same behavior occurs if I use the create statement from sqlite_master to setup the copy-table. Is this a bug or expected behavior? Thanks, Taras ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] VACUUM not reclaiming space
On Mon, Jul 26, 2010 at 11:28 PM, Taras Glek wrote: > Hi, > I noticed an interesting disk-space behavior with VACUUM. If I vacuum my > places.sqlite(Firefox database), it's 49mb. ... > ... > Then vacuum, the db becomes 24mb. > Taras, 49 almost equal to 24*2. Can it be related to some encoding conversion, like UTF16 in first case and UTF-8 in the other? Max ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users
Re: [sqlite] VACUUM not reclaiming space
On Mon, Jul 26, 2010 at 3:28 PM, Taras Glek wrote: > Hi, > I noticed an interesting disk-space behavior with VACUUM. If I vacuum my > places.sqlite(Firefox database), it's 49mb. If then copy my 2 biggest > tables with > CREATE table2 as select * from orig_table; drop table ; alter table2 > rename to table; > > Then vacuum, the db becomes 24mb. The same behavior occurs if I use the > create statement from sqlite_master to setup the copy-table. > > Is this a bug or expected behavior? > My guess is that orig_table contained indices. You copy table does not copy the indices, but your drop table does delete them. > > Thanks, > Taras > ___ > 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
Re: [sqlite] VACUUM not reclaiming space
On Mon, Jul 26, 2010 at 12:28:42PM -0700, Taras Glek scratched on the wall: > Hi, > I noticed an interesting disk-space behavior with VACUUM. If I vacuum my > places.sqlite(Firefox database), it's 49mb. If then copy my 2 biggest > tables with > CREATE table2 as select * from orig_table; drop table ; alter table2 > rename to table; > > Then vacuum, the db becomes 24mb. The same behavior occurs if I use the > create statement from sqlite_master to setup the copy-table. > > Is this a bug or expected behavior? If the first table had any indexes, it would be expected behavior. -j -- Jay A. Kreibich < J A Y @ K R E I B I.C H > "Intelligence is like underwear: it is important that you have it, but showing it to the wrong people has the tendency to make them feel uncomfortable." -- Angela Johnson ___ sqlite-users mailing list sqlite-users@sqlite.org http://sqlite.org:8080/cgi-bin/mailman/listinfo/sqlite-users