Vacuum the SQLite database for better performance
Drill into the profile folder
sqlite3 places.sqlite VACUUM
Or
Linux/Mac OS X
for s in *.sqlite; { sqlite3 $s vacuum; }
Windows
for %a in (*.sqlite) do (sqlite3 %a vacuum)
With no restart
In Error Console, execute:
Components.classes["@mozilla.org/browser/nav-history-service;1"].getService(Components.interfaces.nsPIPlacesDatabase).DBConnection.executeSimpleSQL("VACUUM");
Or use
Vacuum Places Improved add-on
GUI tool
SQLite Manager add-on for Firefox
sqliteman
Useful Queries
Firefox places database, places.sqlite
Query all URLs which contains www.google.com string
select * from moz_places where url like "%www.google.com%"
delete all records which contains www.archlinux.org in column url
delete from moz_places where url like "%www.archlinux.org%"
Reference
Vacuum Firefox Database for better performance now with no restart