Subject | Re: Using NATURAL plan instead of index - why? |
---|---|
Author | Dmitry Yemanov |
Post date | 2012-10-31T08:49:38Z |
31.10.2012 12:14, Maya Opperman wrote:
a) index is inactive (check RDB$INDEX_INACTIVE in RDB$INDICES for this
index)
or
b) Column SourceType is non-numeric (char or varchar)
Dmitry
>There are only two possible explanations:
> select t.SalesOrderNo from stk_stocktransaction t
> where (t.SourceType = 34)
> and (t.TransactionType = 'EXTCST')
> and (t.RefNo = 'I00001')
>
> Plan is:
> PLAN (T NATURAL)
>
> Yet I have the following index: SourceType, TransactionType, RefNo asc
>
> With selectivity: 0.0000049....
a) index is inactive (check RDB$INDEX_INACTIVE in RDB$INDICES for this
index)
or
b) Column SourceType is non-numeric (char or varchar)
Dmitry