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!
HSQLDB (HyperSQL DataBase) is the leading SQL relational database system written in Java. It offers a small, fast multithreaded and transactional database engine with in-memory and disk-based tables and supports embedded and server modes.
In-memory databases are purpose-built databases that rely primarily on memory for data storage, in contrast to databases that store data on disk or SSDs. In-memory data stores are designed to enable minimal response times by eliminating the need to access disks.
HSQLDB (Hyper SQL Database) is a relational database management system written in Java. It has a JDBC driver and supports a large subset of SQL-92, SQL:2008, SQL:2011, and SQL:2016 standards.
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.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With