Hi, The optimizer doesn't choose the best index if there are multiple. This is a limitation that is quite hard to fix currently. I will add a feature request. My test case is:
drop table test; create table test(b double, numval int); insert into test select mod(x, 10), x from system_range(1, 1000); explain SELECT * FROM test WHERE b IN (26,27) AND numval = 468203; -- tableScan create index idx_b on test(b); explain SELECT * FROM test WHERE b IN (26,27) AND numval = 468203; -- IDX_B: B IN(26, 27) create index idx_numbal on test(numval); explain SELECT * FROM test WHERE b IN (26,27) AND numval = 468203; -- IDX_B: B IN(26, 27) 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.
