Hi, based on speed of the query, it seems to be using scans, not indexes.
If it's a table scan, then the explain plan would say so. SELECT OM.OMATTRIBID, OM.OBJID, OM.OWNERID, OM.OBJVALUE, OM.LISTORDER, > OM.OMID FROM PUBLIC.OM /* PUBLIC.OM_ATTRVAL_ID: OMATTRIBID IN(26, 27) AND > OBJVALUE = '468203' */ WHERE (OMATTRIBID IN(26, 27)) AND (OBJVALUE = > '468203') > That means it's using the index OM_ATTRVAL_ID (on OMATTRIBID, OBJVALUE). What other index should the database use? OMATTRIBID INTEGER SELECTIVITY 1: bad selectivity OBJVALUE VARCHAR(1000000) SELECTIVITY 12: medium selectivity, but possibly a lot of data. But possibly the data is sorted in the wrong way on disk. Possibly SHUTDOWN DEFRAG will solve this problem. Could you try this? -During the query all CPU is user, not wa (swap). > You could use the profiling tool (org.h2.util.Profiler) to get the details. Regards, Thomas -- You received this message because you are subscribed to the Google Groups "H2 Database" group. To post to this group, send email to [email protected]. To unsubscribe from this group, send email to [email protected]. For more options, visit this group at http://groups.google.com/group/h2-database?hl=en.
