Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

HSQLDB Temporary Cached Table

Tags:

hsqldb

To use cached tables, can I use the driver URL: jdbc:hsqldb:mem or should I use jdbc:hsqldb:file? I need a non-persistent temporary table that will hold more data that can fit in memory.

It's unclear from the documentation if using create cached table syntax with the JDBC URL of jdbc:hsqldb:mem actually uses a cached table, or does it use memory always since the URL is memory?

like image 942
Goldcougar Avatar asked Oct 09 '22 06:10

Goldcougar


1 Answers

You must use jdbc:hsqldb:file:<file path>. You can turn logging off with SET FILES LOG FALSE, in order to speed up operations when you store only temporary data.

Because the jdbc:hsqldb:mem: URL creates an all-in-memory table, CREATE CACHED TABLE is interpreted as CREATE MEMORY TABLE

like image 158
fredt Avatar answered Oct 13 '22 11:10

fredt