From Memory to file

Jul 28, 2010 at 7:03 PM
Hi!, I am new to EffiProz. Simple question. I want to load a million rows on a database, and I can see that the in memory database performs much better than the file based. Is it possible to create the database as in memory, and once is created then to tell the library to persist the whole database into a file? I imagine I can make a file backup of the in memory version, and then restore the backup into a file database, but I was looking something that will just save the whole thing to disk, in one shot. Jorge
Coordinator
Jul 29, 2010 at 5:57 AM

Hi, you can use the SCRIPT command to export entire database to a script file.

e.g.: 

SCRIPT '../../../Test/Data/TestSqlPsm/NewScript.sql';

Jul 29, 2010 at 12:16 PM

cool!, to open the file on disk, would I have to run the script in a new database file (this would be back to the backup scenario)? or I can just open the script directly?

Coordinator
Jul 29, 2010 at 12:26 PM

Exactly; you need to run the script in your new database. You can't just open the script directly in a memory database.

Alternative is a file database with script tables. This supports durable transactions (recovery) as well. You can refer to following hsqldb documentation for more details,

http://hsqldb.org/doc/2.0/guide/sqlgeneral-chapt.html#sqlgeneral_tabletypes-sect