on Sat, 18 Nov 2006 06:55:34 -0800  P Kishor wrote:

                







>didn't try any of your tricks, but can confirm that VACUUM is very
>slow on a similar db I have...
>
>table1 -- 210k rows x 6 cols, 4 indexes, 1 pk
>table2 -- 36k rows x 6 cols, 4 indexes, 1 pk
>table3 -- 16k rows x 6 cols, 4 indexes, 1 pk
>table4 -- 5M rows x 4 cols, 2 indexes, 1 pk
>
>total size on file 1.95 Gb
>
>VACUUM takes an hour+ on a 3 GHz x 4 Xeon (quad Xeon), 4 Gb RAM, Win
>XP, SQLite 3.3.7
I'd be curious to learn if the timings of VACUUM on this database are any 
different 
than the following:


    sqlite3 your.db .dump | sqlite3 new.db


.dump outputs CREATE INDEX statements after the table INSERT statements, 
while VACUUM outputs the CREATE INDEX statements before the table INSERT 
statements.  Sure, there's SQL statement interpretation overhead with the .dump 
technique, but some time might be saved creating the indexes one by one after 
the tables are populated (and the resultant index pages should also be 
contiguous).

Note: the above command will only work with SQLite version 3.3.7 or previous
because 3.3.8 does not .dump CREATE INDEX statements: 
http://www.sqlite.org/cvstrac/tktview?tn=2072






 
____________________________________________________________________________________
Sponsored Link

Mortgage rates near 39yr lows. 
$510k for $1,698/mo. Calculate new payment! 
www.LowerMyBills.com/lre

-----------------------------------------------------------------------------
To unsubscribe, send email to [EMAIL PROTECTED]
-----------------------------------------------------------------------------

Reply via email to