> Try RUNSCRIPT (and SCRIPT to create the schema).
> http://www.h2database.com/html/grammar.html#runscript
> http://www.h2database.com/html/grammar.html#script

Gah--that's exactly what I was looking for. I even looked right at that
example "SCRIPT NODATA" while scanning for backup stuff and skipped it.
Should have searched. I swear I searched for references to getCreateSQL
in Eclipse, and sure enough, I see it in ScriptCommand now. Sorry about
that.

It works great, thanks.

Creating the in-memory db from scratch with migrations takes ~350ms.
Using RUNSCRIPT takes ~275ms. So, faster, and I imagine the difference
will only grow as more migrations are added.

> For in-memory databases, maybe it's faster to close the old database
> and create a new one.

Avoiding JDBC and using the direct Table.truncate/Sequence.setValue
calls flushes the entire database in anywhere from 0.21ms to 0.07ms,
so it's currently extremely fast.

My, granted very small, test suite now takes ~1.1s on postgres and ~0.6s
with H2. So, almost 2x as fast. Not a big deal now, but on larger test
suites, that will be nice.

Thanks for the help,
Stephen



--~--~---------~--~----~------------~-------~--~----~
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