[...]
> first, i used the optimizer statistics-option for that table 
> (orderline).
> then, i created two indices:

usually the update statistics is run after index creation.
 
> 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
> b.orderlocal in(0);
> 
> this results in an EQUAL CONDITION FOR INDEX-strategy on 
> index orderline1
> with a pagecount of 2298 pages, 

Note: "pagecount" here.

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

Note: "cost" her.

"Pagecount" is not the same as "cost" -- even if the two figures are in the 
same column of the output table.

> a value that is still quite high, 
> but much smaller that 2298!
> 
> 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
> pagecount-values?

Please post the complete output of "EXPLAIN ...". Then maybe someone can help.

Best regards
Christian

-- 
#include <std_disclaimer.h>
/* The opinions stated above are my own and not
   necessarily those of my employer. */


--
MaxDB Discussion Mailing List
For list archives: http://lists.mysql.com/maxdb
To unsubscribe:    http://lists.mysql.com/[EMAIL PROTECTED]

Reply via email to