tags:

views:

853

answers:

1

I have a Java application set up as a service to do data-mining against ~3GB of data every few hours. I would like this to occur 100% in memory. Ideally I want the application to be isolated from everything; I want it to construct the database, do the mining I need, and tear down the database when it's done.

However with HSQLDB, even when i use the "create memory table...." command, a log is written of all of the statements and the table is recreated the next time the application runs.

I'm doing a LOT of inserts, ~150k+, so this file will quickly grow in size. I also don't care about reconstructing the database upon next run, so the logging is useless to me.

I could just delete the file when I'm done, but if possible I'd like to avoid having to write that much to the disk.

Is there a way to turn off this feature?

Thanks in advance!

+3  A: 

No problem, just open the database connection thus:

 Connection c = DriverManager.getConnection("jdbc:hsqldb:mem:aname", "sa", "");

For more information, refer to the HSQL docs.

Jason Cohen