Compacting SQLite bases of Firefox 3

December 2016

SQLite is a powerful database that works behind the scenes of Mozilla Firefox Internet Web Browser by storing its history, bookmarks, the anti-phishing elements, etc. Aiming to provide optimum performance, data is kept secured and searching becomes faster by using SQLite. A little tweak can provide quality output from parts of Mozilla Firefox, although there are a couple of drawbacks with SQLite. It takes quite a large amount of disk space and unless and until modified, Mozilla Firefox can't compact the database part. After downloading SQLite from specific sites, some little adjustments need to be made in Mozilla Firefox so that the size of the SQLite decreases.


SQLite?


Firefox 3 uses SQLite database to store the history, bookmarks, the anti-phishing, etc..
SQLite is a very powerful database.
  • This helps to provide excellent performance, very fast searching and ensure that data will not be corrupted.
  • The disadvantage is that SQLite is a bigger database and takes up more space. Firefox does not compact these databases regularly.
  • These are the files. Sqlite content in your Firefox profile (home directory).
  • Here is a manipulation that reduces the size of these files without any loss of data:
  • This manipulation does no data base: It is fair to claim the unused disk blocks SQLite files.

Download SQLite


Optimising

  • Close Firefox (important)
  • Then type:
    sqlite databasename.sqlite "VACUUM" 
  • (For example: sqlite urlclassifier3.sqlite "VACUUM")
  • The size of the SQLite files should be decreased.

Batch

  • To optimize all SQLite files, here is a batch for Windows:
    • @FOR %%G IN (*.sqlite) DO ( sqlite3 %%G "VACUUM" )
  • You can copy this file. Def (and sqlite3.exe) in the directory containing your .Sqlite files and run from time to time.

Related :

This document entitled « Compacting SQLite bases of Firefox 3 » from CCM (ccm.net) is made available under the Creative Commons license. You can copy, modify copies of this page, under the conditions stipulated by the license, as this note appears clearly.