I've noticed that my H2 database seems to grow and grow.
I've got a database, which includes a table with 1.5 million rows.
This database is currently 6GB.
If I run a query to add a new column to the table, and modify an existing column, and then disconnect - it grows to 22GB.
If I then reconnect and run a SHUTDOWN COMPACT, the shrinks to 0.7GB.
Clearly theres gigabytes of redundant data being stored, so my question is how can I reduce the peak size of the database?
I've assumed it's transaction logs / checkpoints thats causing this, but I don't know for sure.
Are there any parameters I can tweak (e.g. the RETENTION_TIME) to improve this?