Subject Re: [firebird-support] Re: Firebird 2.0 Indexing
Author Kjell Rilbe
Svein Erling Tysvær wrote:

>>Primary Key Stats (PK_SKU_STORE). 0.0000004474044
>>Store_No Key Stats (IDX_STORE). 0.5000000000000
>
> Drop the index on Store_No, the selectivity is too poor for the index
> to be useful (your GROUP BY query should execute somewhat faster
> without this index, probably equal to your DISTINCT query).

And why doesn't FB automatically ignore an index with such bad
selectivity in this situation? Is there *any* situation where this index
should actually be used? I doubt it. So the engine should ignore it.

This is just one example of a performance pitfall with FB that could
probably be fixed.

Kjell
--
--------------------------------------
Kjell Rilbe
Adressmarknaden AM AB
E-post: kjell.rilbe@...
Telefon: 08-761 06 55
Mobil: 0733-44 24 64