Tag Archives | databases

Clean Your SQLite Databases to Speed up Firefox

Error Console in Firefox

Did you know you can tidy Firefox up, with VACUUM? No, I do not mean that thing you use to clean your carpets.  Here is a way to VACUUM your places database from within the browser.

Here are the steps you need to take:

1. Open the Firefox tools menu and click on error console.
2. Paste the following command into the code box as a single line:
Components.classes["@mozilla.org/browser/nav-history-service;1"].getService(Components.interfaces.nsPIPlacesDatabase).DBConnection.executeSimpleSQL("VACUUM");
3. Hit the “Enter” key or click the evaluate button.

The user interface will freeze for a moment, but after you are done, your SQLite databases should be less fragmented than before, leading to a leaner and meaner Firefox browsing experience.

Thanks goes to Mozilla developer Jeremy Orem for this fantastic tip!

BonusVacuum Places Improved is an add-on that will do this for you automatically.