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?
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
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