I have a h2 database file and the file size has grown to 5GB. I have deleted some of data to reduced the size of the file. But the file size still remains the same even after deleting the half of the records from the database.
I have tried all the below options to reduce the database size but none of them have worked for me.
1. Executed shutdown compact (after closing all the connection).
2. Executed shutdown defrag.
3. Executed checkpoint.
4. Used the property MV_STORE=FALSE along with the database url.
5. Used the property RETENTION_TIME=30000 along with the database url.
MY connection String looks like below :
"jdbc:h2:" + <db file path>;MVCC=TRUE;DEFAULT_LOCK_TIMEOUT=10000;COMPRESS=TRUE;
NOTE :
- We are closing the transaction which we are opened.
- We don't have 5GB of data in the file.
Can anyone suggest me some work around or fix to reduce my database size