Subject Re: Firebird 2.0 Indexing
Author buppcpp
--- In firebird-support@yahoogroups.com, "Ann W. Harrison" >
> That's not a problem with the index. It's the optimizer that
decides
> whether to use an index or not, based on the access paths it knows
how
> to create.
>

Here is a comment from the Firebird 2.0 source code: (opt.cpp)
NOTE: I couldn't find bug #8958 to see what it was talking about.

Seems like the developers know that they have problems with DISTINCT.


Bug #8958: comment out anything having to do with mapping a DISTINCT
to an index, for now. The fix for this bug was going to be so
involved
that it made more sense to deoptimize this case for the time
being until
we can determine whether it really makes sense to optimize a
DISTINCT,
or for that matter, and ORDER BY, via an index--there is a case
to be made that it is a deoptimization and more testing needs to
be done
to determine that; see more comments in the bug description