SQLite vacuum or auto_vacuum?
Prompted by a question on users I wondered how SQLite's vacuum
(http://sqlite.org/lang_vacuum.html) would affect wc.db size. On a
Subversion trunk working copy I have been using for months the size was
reduced from 2.3MB to 1.3MB which isn't really a significant change.
For a further test I checked-out a ^/subversion/branches working copy
for a wc.db of 93MB with 121738 rows, I made it sparse with 66046 rows
and it was still 93MB, then I ran vacuum and it was reduced to 51MB. I
have a gcc working copy with some subtrees switched to an empty
directory. There vacuum reduced wc.db from 47MB to 8.1MB.
So it appears that vacuum is interesting if the number of rows decreases
SQLite has auto_vacuum but it comes with a warning that it may make
fragmentation worse (http://sqlite.org/pragma.html#pragma_auto_vacuum)
so it's not clear whether we should enable it. Perhaps we should add a
"vacuum" to cleanup? A full vacuum rewrites all the tables so it's not
a trivial operation but it is reasonably fast for the working copies on
local disk that I tried.
Certified & Supported Apache Subversion Downloads:
Received on 2012-12-03 13:08:56 CET
This is an archived mail posted to the Subversion Dev