File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes JDBC and the fly likes HSQLDB Text Table Performance Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of OCA/OCP Java SE 7 Programmer I & II Study Guide this week in the OCPJP forum!
JavaRanch » Java Forums » Databases » JDBC
Bookmark "HSQLDB Text Table Performance" Watch "HSQLDB Text Table Performance" New topic
Author

HSQLDB Text Table Performance

Mukti chandnani
Greenhorn

Joined: Jul 01, 2008
Posts: 6
I am developing a application that uses HSQLDB. I have created cached tables in HSQLDB. I read that cached tables give low performance and text tables give better performance so i switched to text tables. The first time I ran my application it ran very fast. But since then it is running even slower than when i had cached tables. What could be the reason for that?

below is my properties file and the script file.

#HSQL Database Engine 1.8.0.9
#Thu Jul 03 22:35:51 IST 2008
hsqldb.script_format=0
runtime.gc_interval=100,000
sql.enforce_strict_size=false
hsqldb.cache_size_scale=20
readonly=false
hsqldb.nio_data_file=true
hsqldb.cache_scale=18
version=1.8.0
hsqldb.default_table_type=text
hsqldb.cache_file_scale=1
hsqldb.log_size=200
modified=yes
hsqldb.cache_version=1.7.0
hsqldb.original_version=1.8.0
hsqldb.compatible_version=1.8.0


script file
---------------

CREATE SCHEMA PUBLIC AUTHORIZATION DBA
CREATE TEXT TABLE INDICES(ID BIGINT NOT NULL PRIMARY KEY,FS INTEGER NOT NULL,MP INTEGER NOT NULL,PARENT BIGINT NOT NULL,ISDIR BOOLEAN NOT NULL,NAME VARCHAR(256),EXT VARCHAR(50),PARENTPATH VARCHAR(4096),MODTIME TIMESTAMP NOT NULL,BYTES BIGINT NOT NULL,STAMPUPD TIMESTAMP DEFAULT NOW NOT NULL,ISDELETED BOOLEAN NOT NULL)
CREATE INDEX U_INDICES_FS_MP_SELF ON INDICES(ID,MP,ISDELETED)
CREATE INDEX INDICES_COUNT ON INDICES(ISDIR,ISDELETED)
CREATE INDEX INDICES_FS_MP_PARENT ON INDICES(MP,PARENT,ISDELETED)
CREATE INDEX INDICES_NAME_PARENTPATH ON INDICES(NAME,PARENTPATH)
CREATE INDEX INDICES__PARENT ON INDICES(PARENT,ISDELETED)
CREATE INDEX INDICES_MP_ISDIR_EXT ON INDICES(MP,ISDIR,EXT,ISDELETED)
SET TABLE INDICES SOURCE "indices.csv"
CREATE TEXT TABLE INVERTEDINDEX(FILEID BIGINT NOT NULL,FOLDERID BIGINT NOT NULL)
CREATE INDEX INVERTEDINDEX_FOLDERID_ISDELETED ON INVERTEDINDEX(FOLDERID)
SET TABLE INVERTEDINDEX SOURCE "invertedindex.csv"
CREATE TEXT TABLE DB_VERSION(DBVERSION NUMERIC,REFRESHCOUNT NUMERIC,UPDATEDATE NUMERIC)
SET TABLE DB_VERSION SOURCE "db_version.csv"
CREATE USER SA PASSWORD ""
GRANT DBA TO SA
SET WRITE_DELAY 10
Darius Cooper
Greenhorn

Joined: Jul 10, 2008
Posts: 8
It doesn't sound right that TEXT tables would be faster than CACHED tables. Could it be that you're thinking of MEMORY tables?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: HSQLDB Text Table Performance