Re: [h2] Automatic COMPACT does not seem to work

2022-06-14 Thread Andreas Reichel


On Tue, 2022-06-14 at 08:11 +0200, Noel Grandin wrote:
> In general, compacting should work while the db is running, but it's
> fairly conservative

Noel,

not arguing, you know that we do love H2 and are grateful.
Although I never saw any online defragmention doing anything.

We have 300 MB defragmented content blown up to 20 GByte. The databases
are idle during the night and most time the day.
Heavy Delete/Write/Querying happens only in the early morning -- but it
never shrinks, only grows, until "SHUTDOWN DEFRAG".

Best regards
Andreas


-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to h2-database+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/h2-database/13bd3bcaa898278cb3bd4d4fb2228d855ca42a39.camel%40manticore-projects.com.


Re: [h2] Automatic COMPACT does not seem to work

2022-06-14 Thread Ulrich
Thanks for the clarification!

I will try to pause operations on the database and see what happens. 
What do you mean with "while you run the compacter"? Is there a specific 
command to start the compacter. I thought it would start automatically or 
if I run SHUTDOWN COMPACT. 

Noel Grandin schrieb am Dienstag, 14. Juni 2022 um 08:12:03 UTC+2:

>
> In general, compacting should work while the db is running, but it's 
> fairly conservative, so if you have running queries or open transactions, 
> that can keep a lot of stuff alive that should be compacted.
> Also, if you are adding stuff to the db while compacting, even if the 
> compacter frees up a ton of space, there will likely be trailing entries in 
> the file that prevent the file from being truncated.
>
> If you can temporarily pause all your queries or operations while you run 
> the compacter, that might help.
>
> Possibly we should look into an option that does that (pausing) 
> automatically.
>
>

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to h2-database+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/h2-database/dbf6d485-bb7d-4bae-96ec-81bdfcdc89dcn%40googlegroups.com.


Re: [h2] Column not found when SELECTing from a recursive Common Table Expression (CTE)

2022-06-14 Thread Noel Grandin
Unfortunately CTE's in H2 are currently pretty bad, and nobody has felt
sufficiently motivated to do the surgery that is necessary to accomodate
them really well.

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to h2-database+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/h2-database/CAFYHVnU9kB6KArjUouSnSjm9pX-_BOYcN6Rud8S0yfObQrA0Wg%40mail.gmail.com.


Re: [h2] Automatic COMPACT does not seem to work

2022-06-14 Thread Noel Grandin
In general, compacting should work while the db is running, but it's fairly
conservative, so if you have running queries or open transactions, that can
keep a lot of stuff alive that should be compacted.
Also, if you are adding stuff to the db while compacting, even if the
compacter frees up a ton of space, there will likely be trailing entries in
the file that prevent the file from being truncated.

If you can temporarily pause all your queries or operations while you run
the compacter, that might help.

Possibly we should look into an option that does that (pausing)
automatically.

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to h2-database+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/h2-database/CAFYHVnVzL66xyFJpt4PJ5GV4oX8oO1wBapqmAcVuO_vxEAQ9yA%40mail.gmail.com.