sqlf compact-disk-store

Perform offline compaction of a single SQLFire disk store.


sqlf compact-disk-store <diskStoreName> <directory>+


When a CRUD operation is performed on a persistent/overflow table the data is written to the log files. Any pre-existing operation record for the same row becomes obsolete, and SQLFire marks it as garbage. It compacts an old operation log by copying all non-garbage records into the current log and discarding the old files.

Manual compaction can be done for online and offline disk stores. For the online disk store, the current operation log is not available for compaction, no matter how much garbage it contains.

Offline compaction runs essentially in the same way, but without the incoming CRUD operations. Also, because there is no current open log, the compaction creates a new one to get started.


You must provide all of the directories in the disk store. If no oplog max size is specified, SQLFire uses the system default.

Offline compaction can consume a large amount of memory. If you get a java.lang.OutOfMemory error while running this command, you made need to increase the heap size by setting the -Xmx and -Xms options in the JAVA_ARGS environment variable. sqlf Launcher Commands provides more information about setting Java options.


sqlf compact-disk-store myDiskStoreName  /firstDir  /secondDir   

The output of this command is similar to:

Offline compaction removed 12 records.
Total number of region entries in this disk store is: 7