Subject | Firebird 1.5 PLAN Windows XP |
---|---|
Author | buppcpp |
Post date | 2005-05-27T11:13:55Z |
Everytime I issue a query that has 3 or more table in it, and each
table is joined on index fields with high selectivity (mainly
primary key fields), the first table in the plan ALWAYS does a table
scan ('NATURAL' in PLAN lingo).
And when I try to create my own plan, and just add the index where
it is doing a NATURAL, I get an error stating that the 'index
cannot be used in the specified plan'.
this plan works:
PLAN JOIN (A NATURAL,B INDEX (PRODS_VSTYLE),C INDEX (AI_SKU));
this also works:
PLAN JOIN (B NATURAL, A INDEX(PKX_PRODUCT),C INDEX (AI_SKU));
but this won't work:
PLAN JOIN (B INDEX (PRODS_VSTYLE), A INDEX(PKX_PRODUCT),C INDEX
(AI_SKU));
this won't work either:
PLAN JOIN (A INDEX(PKX_PRODUCT), B INDEX (PRODS_VSTYLE) ,C INDEX
(AI_SKU));
Is this another bug in the optimizer?
table is joined on index fields with high selectivity (mainly
primary key fields), the first table in the plan ALWAYS does a table
scan ('NATURAL' in PLAN lingo).
And when I try to create my own plan, and just add the index where
it is doing a NATURAL, I get an error stating that the 'index
cannot be used in the specified plan'.
this plan works:
PLAN JOIN (A NATURAL,B INDEX (PRODS_VSTYLE),C INDEX (AI_SKU));
this also works:
PLAN JOIN (B NATURAL, A INDEX(PKX_PRODUCT),C INDEX (AI_SKU));
but this won't work:
PLAN JOIN (B INDEX (PRODS_VSTYLE), A INDEX(PKX_PRODUCT),C INDEX
(AI_SKU));
this won't work either:
PLAN JOIN (A INDEX(PKX_PRODUCT), B INDEX (PRODS_VSTYLE) ,C INDEX
(AI_SKU));
Is this another bug in the optimizer?