HSQLDB Test Utility

One of the test classes in HSQLDB tests various queries and operations on the database. Part of this is a speed test, which can be used to get a rough estimate of the speed of inserts, deletes and updates with ordinary (memory based) tables and cached tables.

You should compile the hsqldbtest.jar with Ant to run this utility.

A batch file is provided in the demo directory. To start the application on Windows, type:

runtest TestSelf

To test speed by inserting 30000 rows into one table, type:

runtest TestSelf 30000

To test inserting 10000 rows in the In-Memory-mode type only:

runtest TestSelf 10000 -m

TestSelf will first try to insert the rows into a cached table, and then into an in-memory table. The first part may work and the second part (in-memory table) may run out of memory if there is not enough memory available. You may experience a delay between updating and deleting records. This is by design: the recovery mechanism is tested here.


The new version of TestSelf runs multiple SQL test files to test different operations of the database. All files in the working directory with names matching TestSelf*.txt are processed in alphabetical order. This makes it easy to add new tests to the framework.

This text is based on HypersonicSQL documentation, updated to reflect the latest version 1.7.2 of HSQLDB