Thomas Lockhart wrote:
> Systems which have optimizing planners can *never* be guaranteed to
> generate the actual lowest-cost query plan. Any impression that Oracle,
> for example, actually does do that may come from a lack of visibility
> into the process, and a lack of forum for discussing these edge cases.
And here in lies the crux of the problem. It isn't a purely logical/numerical
formula. It is a probability estimate, nothing more. Currently, the statistics
are used to calculate a probable best query, not a guaranteed best query. The
presence of an index should be factored into the probability of a best query,
should it not?