Re: [h2] Debugging large database file

2021-02-11 Thread Andreas Reichel
Good Morning Quy,

unfortunately I have observed similar problems in the
past: https://github.com/h2database/h2database/issues/2904

Two things:

1) when inserting large data, then you will need to remove any indices
and constraints on the target table and create them only after the data
are written
2) "pagination" helps, but is not very robust or reliable

Also, beyond the problem above, H2 in general is meant to take a lot of
filespace -- trading of speed vs. file space efficiency.

Best regards
Andreas


On Thu, 2021-02-11 at 10:11 -0800, Quy Nguyen wrote:
> Hello,
> 
> I have an issue with the size of the database file. It stores roughly
> 500mb of data normally, but during use it can balloon to something
> like 25GB. If I restart the application, it can spends hours reading
> and writing the database, and then the file will be back to 500mb.
> 
> I'm using the following dependencies, along with Ktorm as my ORM, but
> I did not have this issue when I was using sqlite.
> 
> ```
> implementation group: 'com.zaxxer', name: 'HikariCP', version:
> '4.0.1'
> implementation group: "com.h2database", name: "h2", version:
> "1.4.200"
> ```
> 
> Thanks,
> Quy
> -- 
> 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/6359beae-5ab3-4fd2-9693-7d19fdfe48d7n%40googlegroups.com
> .

-- 
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/1a99ff0d33ec187cd2d80c138d80f7e2741458c7.camel%40manticore-projects.com.


[h2] Debugging large database file

2021-02-11 Thread Quy Nguyen
Hello,

I have an issue with the size of the database file. It stores roughly 500mb 
of data normally, but during use it can balloon to something like 25GB. If 
I restart the application, it can spends hours reading and writing the 
database, and then the file will be back to 500mb.

I'm using the following dependencies, along with Ktorm as my ORM, but I did 
not have this issue when I was using sqlite.

```
implementation group: 'com.zaxxer', name: 'HikariCP', version: '4.0.1'
implementation group: "com.h2database", name: "h2", version: "1.4.200"
```

Thanks,
Quy

-- 
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/6359beae-5ab3-4fd2-9693-7d19fdfe48d7n%40googlegroups.com.