建議使用HSQLDB清除.lobs文件的方法

[英]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.

我正在使用HSQLDB來保存BLOBS的項目,版本為2.2.8,可以看到.lobs文件是按預期創建的。

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

* .lobs文件的大小不斷增加,並且不會從應用程序中刪除記錄。

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

從文檔中讀取時,發現.lobs文件未清除,必須在關閉DB后完成。

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

所以,問題是:如果我們24 * 7在線申請,那么我們如何處理清算或縮小lobs文件的大小?

  • Is there any way to do that programmatically?
  • 有沒有辦法以編程方式做到這一點?
  • or some way by config settings (just found lob_file_scale settings which is not exactly what i am looking for)?
  • 或者某種方式通過配置設置(剛剛找到lob_file_scale設置,這不是我正在尋找的)?
  • What is the recommended approach for house-keeping in this case?
  • 在這種情況下,建議的家務管理方法是什么?

1 个解决方案

#1


1  

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.

發生CHECKPOINT時,將刪除已刪除的lobs占用的所有空間。此空間將重新用於新的lobs,並且.lobs文件的大小不會增長,直到使用所有空間。

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.

當.log文件的大小達到限制時,會定期發生檢查點。也可以通過執行CHECKPOINT SQL語句來執行檢查點。


注意!

本站翻译的文章,版权归属于本站,未经许可禁止转摘,转摘请注明本文地址:https://www.itdaan.com/blog/2012/05/01/724d5a80b32e43e9093fbb47bcd542a3.html



 
粤ICP备14056181号  © 2014-2020 ITdaan.com