Most rule-based planners,
including WHINIT from the server, assume that the index has a uniform
distribution of values between the upper and lower value boundaries.
This means if data values range between 2 and 10, that there is an
equal number of 3s and 4s, and so on. When the assumption of a uniform
distribution is false, an indexed predicate can return a large number
of rows. In turn, this causes WHINIT's indexed plan to run slower
than a sequential read of the entire table. In this case, the index
should be suppressed.
Here is another, more subtle instance. When the WHERE clause uses only the front part
of the key, WHINIT selects a composite index. Assume an
index
abcd on
columns A, B, C, and D, and an index
e on
column E, and specify the WHERE clause as follows:
where a = 3 and e = 5;
Normally, WHINIT will
select both indexes (abcd and e)
and choose EVAL1. However, using the index abcd just
to interrogate a might return a large number
of rows. In this case, suppressing the abcd index
might be a good idea.