Compact SQLITE files
-
- Posts: 170
- Joined: April 23rd, 2004, 12:12 pm
- Location: Ohio, USA
Compact SQLITE files
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.
- -Px-
- Posts: 480
- Joined: April 20th, 2011, 1:56 am
Re: Compact SQLITE files
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
Tools -> Web Development -> Error Console
Components.classes["@mozilla.org/browser/nav-history-service;1"].getService(Components.interfaces.nsPIPlacesDatabase).DBConnection.executeSimpleSQL("VACUUM");
Evaluate
- Philip Chee
- Posts: 6475
- Joined: March 1st, 2005, 3:03 pm
- Contact:
Re: Compact SQLITE files
-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