Hi all,
Can you please help me with this ?

CREATE TABLE ABC (NAME VARCHAR(20) , AGE INTEGER);
INSERT INTO ABC VALUES ( ‘XYA’,1);
INSERT INTO ABC VALUES ( ‘AXYA’,2);
INSERT INTO ABC VALUES ( ‘BXYA’,3);
INSERT INTO ABC VALUES ( ‘CXYA’,4);
INSERT INTO ABC VALUES ( ‘DXYA’,5);
CREATE INDEX INDEX1 ON ABC( NAME,AGE);
EXPLAIN SELECT DISTINCT NAME FROM ABC

Isn’t above select query supposed to use index , INDEX1 that we
created  ?
While if I change it to group by, it seems to be using INDEX1.

Also is there any way in h2 , I can force use an index ?

Regards
Reetesh

-- 
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.

Reply via email to