Hi,

ALT-5 is the 'traditional' way to do things (with databases like
Oracle and so on). In that case, use one connection or a connection
pool. H2 will perform well in this case, cache usage is probably much
better than when using many small databases. So overall performance is
better, and memory usage is lower.

Compared to other databases such as Oracle, MySQL and so on, opening
and closing a H2 database is relatively fast. But on Android, opening
/ closing a SQLite database is still much faster than opening /
closing an H2 database (30 ms versus 200 ms I believe). Using a
regular JVM, numbers will be very different of course, so you would
need to test it yourself. In the longer term, I plan to improve both
opening and closing, specially for Android.

If you want to try ALT-2, I would use a smaller "close delay", maybe
20 seconds or even less. Just enough to ensure the database stays open
for consecutive requests. 15 minutes sounds like too much, my guess is
that's too long (memory is not used efficiently). When you use one
database per user, I probably wouldn't use a connection pool at the
beginning. Probably you can get some additional speed, but not sure if
it's worth it.

> views on top of it to filter by user

Yes, that's possible. Please tell us if you want to try that out (I
have some demo code somewhere).

> distribute your user's data in  about ~10 databases

That sounds like a good idea as well.

Regards,
Thomas

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.

Reply via email to