Goldcougar
Goldcougar

Reputation: 73

HSQLDB Temporary Cached Table

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?

Upvotes: 5

Views: 1061

Answers (1)

fredt
fredt

Reputation: 24352

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

Upvotes: 4

Related Questions