I'm a newbe in working with indices on maxdb. i have a large tables orderlocal with about 200.000 lines (not that large though, isn't it?).
i create the following indices (order of creating): create index ol1 on orderline(bzl1,orderlocal) create index ol2 on orderline(bzl2,orderlocal) create index ol3 on orderline(bzl1,bzl2,orderlocal) i try to analyse the following query: explain select * from orderline b where b.bzl1='a' and b.bzl2 = 'b' and b.orderlocal in(0) Result: STRATEGY EQUAL CONDITION FOR INDEX, Pagecount=2133. the analyser says, index ol1 is used. why? doesn't suite index ol3 much more to the query-statement? How does the optimizer selects the indices?? our problem is, that we join the result over a subselect (included in the oderlocal in()-term) with another 200.000 rows-table and this leads to an uncredibly high load on our database-server! Thank you for your help, Carsten -- Mit freundlichen Grüßen Christof Lehmann VUB Printmedia GmbH Chopinstr. 4 04157 Leipzig Tel 0341 960 50 93 Fax 0341 960 50 92
