Hi,
Thanks for your attention.

Sadly, the 'SHUTDOWN DEFRAG' just closes the connection pool, but the file 
size does not change at all. (Tried with h2 driver 1.4.185 and latest 192)

The version I was using normally is:
h2: 1.4.185

Do you think I could roll back to latest stable setting the version to 
1.3.176 without any trouble (is this the latest most stable version without 
mvstore and the related problems?)
How can I anyway 'rebuild' the database to loose all the 'fat' ?
According to this 
question: https://groups.google.com/forum/#!topic/h2-database/G93ZNBuyMcI
The person states there's a combo of SCRIPT+RUNSCRIPT to bring it back to 
real size - can you help me illustrating the commands to execute in detail?

My plan:
1) Recover DB Size
2) Roll Back to 1.3.176 (or the version you suggest me which is more stable)
3) Continue on that way

Please follow me to achieve this, and thanks for your help in advance


Il giorno mercoledì 20 luglio 2016 07:49:17 UTC+2, Thomas Mueller Graf ha 
scritto:
>
> Hi,
>
> With the MVStore storage engine, which is the default in version 1.4.x, 
> the file size is typically a few times larger than the "real data". This is 
> expected. If you run "shutdown defrag", the file size should decrease. Does 
> it do that?
>
> Reason for the larger file size: to speed up writes without risking to 
> lose data, old data (younger than a few minutes old) is not overwritten, 
> but kept. Disk space is eventually released and re-used, but that algorithm 
> is not yet optimized with the current version. I know this should be 
> improved in the future.
>
> Regards,
> Thomas
>
>
>
> On Monday, July 18, 2016, ck <cro...@gmail.com <javascript:>> wrote:
>
>> This is my first post on this group,
>> Hello to everyone! :)
>>
>> I have a problem with my H2 DATABASE.
>> I am seriously worried by the size it is getting, it is now about 350mb 
>> (Yeah I know it's not the largest one), but my worries go all to the future 
>> and how it will scale in the long run.
>>
>> Issues:
>> - Trying to Export data as CSV using DataGrip (or any other Database 
>> Explorer) I get less than 50mb of real 'data'
>> - Database seems filled with tons of 'unknown' data - I know the database 
>> stores indexes and such, but I tried DROPPING ALL OBJECTS, or DELETING 
>> TABLES , DELETING INFORMATION_SCHEMA just for test purpose and after all 
>> was cleaned it was around 250mb anyway.
>> - After cleaning the whole DB which is now totally empty but still 
>> weights 250mb, the size changes after connect/disconnect, lowering abour 
>> 4mb each time
>> - Deleting tables o creating tables and adding 1000 rows does not change 
>> file size (?) - and many times dropping tables/rows does not lower the DB 
>> Size (why?)
>> - After cleaning the whole DB which is now totally empty, still weights 
>> 250mb, what is happening?
>>
>>
>> Details:
>> - I have INCREMENTAL IDS (with some jumping sequences, eg. from 10->40)
>> - I store BLOBs
>> - I store VARCHARs, many fixed to 125 chars, some with 250/500 or 2000 in 
>> a unique case
>> - I use a JVM Web App that starts connection at program start and closes 
>> it at program closing (I used this approach because I thought it could be 
>> very slow and could waste tons of resources to 'reopen, commit, close' 
>> connection every single time, considering multiple people send multiple 
>> requests simultaneously. I am free too critics and I totally encourage 
>> opinions/advices about this.
>> - Every query is immediately turned to a Map of results and the ResultSet 
>> is closed as soon as possible
>>
>>
>> What is happening? I am mostly concerned about the fact it may get such a 
>> large db in production to cause slowdowns or crashes of the machine
>>
>> Might my question have some mistakes, feel free to correct me and 
>> apologize for my first post
>>
>> -- 
>> 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 post to this group, send email to h2-database@googlegroups.com.
>> Visit this group at https://groups.google.com/group/h2-database.
>> For more options, visit https://groups.google.com/d/optout.
>>
>

-- 
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 post to this group, send email to h2-database@googlegroups.com.
Visit this group at https://groups.google.com/group/h2-database.
For more options, visit https://groups.google.com/d/optout.

Reply via email to