Re: Index Scans become Seq Scans after VACUUM ANALYSE - Mailing list pgsql-hackers

From mlw
Subject Re: Index Scans become Seq Scans after VACUUM ANALYSE
Date
Msg-id 3CBD8739.6357196C@mohawksoft.com
Whole thread Raw
In response to Re: Index Scans become Seq Scans after VACUUM ANALYSE  (Bruce Momjian <pgman@candle.pha.pa.us>)
List pgsql-hackers
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?


pgsql-hackers by date:

Previous
From: Michael Loftis
Date:
Subject: Re: Index Scans become Seq Scans after VACUUM ANALYSE
Next
From: Thomas Lockhart
Date:
Subject: Re: Index Scans become Seq Scans after VACUUM ANALYSE