Compact SQLITE files

Discussion of features in Seamonkey
Post Reply
Zosimos
Posts: 170
Joined: April 23rd, 2004, 12:12 pm
Location: Ohio, USA

Compact SQLITE files

Post by Zosimos »

The various SQLITE database files used in Seamonkey can get ridiculously huge with old, outdated entries. Why isn't there a function built-in to compact them? I had to find a third-party utility to clean them up in my install. It dramatically reduced the size of the files, too.
User avatar
-Px-
Posts: 480
Joined: April 20th, 2011, 1:56 am

Re: Compact SQLITE files

Post by -Px- »

It's already there
Tools -> Web Development -> Error Console
Components.classes["@mozilla.org/browser/nav-history-service;1"].getService(Components.interfaces.nsPIPlacesDatabase).DBConnection.executeSimpleSQL("VACUUM");
Evaluate
User avatar
Philip Chee
Posts: 6475
Joined: March 1st, 2005, 3:03 pm
Contact:

Re: Compact SQLITE files

Post by Philip Chee »

-Px- wrote:It's already there
Tools -> Web Development -> Error Console
Components.classes["@mozilla.org/browser/nav-history-service;1"].getService(Components.interfaces.nsPIPlacesDatabase).DBConnection.executeSimpleSQL("VACUUM");
Evaluate

In the latest SeaMonkey versions, this is run periodically in the background. But I guess it doesn't hurt to do it manually once in a while. There is also a "Vacuum Places Enhanced" extension for Firefox:
https://addons.mozilla.org/addon/vacuum-places-improved/
I've ported it to SeaMonkey. You can find it here:
http://xsidebar.mozdev.org/modifiedmisc.html#vacuumplacesimproved

Phil
Post Reply