Neohapsis is currently accepting applications for employment. For more information, please visit our website www.neohapsis.com or email firstname.lastname@example.org
RE: used index
From: carsten severin (cseverinvub.de)
Date: Fri Jun 24 2005 - 04:50:27 CDT
ok, it sound reasonable to trust the database to choose the best strategy
(and the best indices).
but there are still things i do not understand:
first, i used the optimizer statistics-option for that table (orderline).
then, i created two indices:
create index orderline1 on orderline(type,bzl1,orderlocal)
create index orderline2 on orderline(orderlocal)
then, i tried out following the select-statement:
explain select b.oid from orderline b where b.type=0 and b.bzl1 = 'a' and
this results in an EQUAL CONDITION FOR INDEX-strategy on index orderline1
with a pagecount of 2298 pages, which seems to be quite high to me.
then, i remove the index orderline1. again, i use the same select-statement
as above. with an EQUAL CONDITION FOR INDEX-strategy on index orderline2, i
get a cost of 678 pages, a value that is still quite high, but much smaller
there are two indices. according to the explain-output, the system chooses
the index with a higher pagecount (=the less performant??).
how can i optimize my statements then? creating indices by using the
thank you for your help.
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb