Hi

I'm using H2 database for my application; I have one table; this is
the table:

CREATE TABLE  IF NOT EXISTS XDASV1
(
   ID int primary key auto_increment,
   RECIVEDATE bigint,
   RAW  VARCHAR,
   HDR_VERSION varchar(256),
   HDR_TIME_OFFSET varchar(256),
   HDR_TIME_UNCERTAINTY_INTERVAL varchar(256),
   HDR_TIME_UNCERTAINTY_INDICATOR varchar(256),
   HDR_TIME_SOURCE varchar(256),
   HDR_TIME_ZONE varchar(256),
   HDR_EVENT_NUMBER varchar(256),
   HDR_OUTCOME varchar(256),
   ORG_LOCATION_NAME varchar(256),
   ORG_LOCATION_ADDRESS varchar(256),
   ORG_SERVICE_TYPE varchar(256),
   ORG_AUTH_AUTHORITY varchar(256),
   ORG_PRINCIPAL_NAME varchar(256),
   ORG_PRINCIPAL_ID varchar(256),
   INT_AUTH_AUTHORITY varchar(256),
   INT_DOMAIN_SPECIFIC_NAME varchar(256),
   INT_DOMAIN_SPECIFIC_ID varchar(256),
   TGT_LOCATION_NAME varchar(256),
   TGT_LOCATION_ADDRESS varchar(256),
   TGT_SERVICE_TYPE varchar(256),
   TGT_AUTH_AUTHORITY varchar(256),
   TGT_PRINCIPAL_NAME varchar(256),
   TGT_PRINCIPAL_ID varchar(256),
   SRC_POINTER_TO_SOURCE_DOMAIN  varchar,
   EVT_EVENT_SPECIFIC_INFORMATION  varchar,
   EVT_RECEIVED_YEAR INT,
   EVT_RECEIVED_DAY INT,
   EVT_RECEIVED_MONTH INT
   );

Not so complicated table. In this table I have 406526 records
(according to me not too much records)
Well, even if I created all the necessary indexes, when I execute this
query (directly from the web client provided by H2):

select count(ID) as y, HDR_EVENT_NUMBER as text
                     from XDASV1
GROUP BY HDR_EVENT_NUMBER

It takes around 40 seconds to be executed; according to me it's a very
huge time (above all because I suppose that in this table there can be
milions and milions of records)
My JDBC URL is the following jdbc:h2:tcp://localhost:8043/data/
audit;CIPHER=AES;CACHE_SIZE=256000

Can you tell me how I can optimize performances? Or is it a known H2
limitation?
Thank you

Cheers,
Angelo

-- 
You received this message because you are subscribed to the Google Groups "H2 
Database" group.
To post to this group, send email to h2-database@googlegroups.com.
To unsubscribe from this group, send email to 
h2-database+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/h2-database?hl=en.

Reply via email to