First I'd recommend trying to optimize the on-disk approach - that way you 
don't have to deal with/worry about persistence.

See http://www.h2database.com/html/performance.html#fast_import

Tips:
- nio can work wonders depending on your platform (try with and without to 
see)
- CACHE_SIZE is critical
- Disabling logging (SET LOG) and adjusting isolation level (SET LOCK_MODE) 
during import helps - be sure to turn them back on after.

jdbc:h2:nio:dbname;LOG=0;CACHE_SIZE=262144;LOCK_MODE=0;

If it still doesn't perform well - the in memory database can be spooled 
off to disk with the SCRIPT TO:
SCRIPT TO 'file.gz' COMPRESSION GZIP;
and restored with:
RUNSCRIPT 'file.gz' COMPRESSION GZIP;  (Or using org.h2.tools.RunScript)

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To view this discussion on the web visit 
https://groups.google.com/d/msg/h2-database/-/NPZLDiO7N5cJ.
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