I am using an in-memory hsqldb database with a JDBC driver.
Now, I am looking for a way to persist this database for reloading after application reboot. I came up with the following options:
- Export .script file with sql command "SCRIPT < path > " (link)
- Log all statements to a log file.
Option 2 works, but it seems kind of ugly in my eyes. The script export for option 1 works too, but I seem to be unable to get the .script file back into an in-memory database.
I am thankful for any advice.
mem:tofile:and specify the <path> where you want the database to be stored?DriverManagerconnection string from jdbc:hsqldb:mem:xxx to jdbc:hsqldb:file:xxx, the speed reduces. I am using memory tables. Why could this be?