Gaurav Bhatia
Gaurav Bhatia

Reputation: 21

Recommended way of clearing .lobs files with HSQLDB

I am using HSQLDB for a project which saves BLOBS, with version 2.2.8 and can see .lobs files are created as expected.

The size of *.lobs file keeps on increasing and doesn't come down on deleting records from application.

On reading from documentation, found that .lobs file is not cleared and has to be done after shutting down DB.

So, question is : If we have the application online 24*7, then how do we handle clearing or shrinking size of lobs file?

Upvotes: 2

Views: 1223

Answers (1)

fredt
fredt

Reputation: 24352

When a CHECKPOINT occurs, all the space occupied by deleted lobs is freed. This space is reused for new lobs and the size of the .lobs file does not grow until all the space is used.

A checkpoint occurs regularly when the size of the .log file reaches a limit. A checkpoint can also be performed by executing the CHECKPOINT SQL statement.

Upvotes: 2

Related Questions