Daniel Kalchev wrote:
> >>>Tom Lane said:
> > "Zeugswetter Andreas SB SD" <ZeugswetterA@spardat.at> writes:
> > > My preference would actually be a way to make the optimizer
> > > choose a plan that causes minimal workload, and not shortest runtime
> >
> > ?? I am not sure that I see the difference.
>
> There can be difference only if the optimizer takes into account already
> executing plans (by other backends).
>
> > What I think you are saying is that when there's lots of competing work,
> > seqscans have less advantage over indexscans because the
> > sequential-access locality advantage is lost when the disk drive has to
> > go off and service some other request.
>
> This is exactly my point. The primary goal of the optimizer in my opinion
> should be to avoid trashing. :-) Now, it is not easy to figure out when the
> system starts trashing - at least not a portable way I can think of
> immediately.
I have always felt some feedback mechanism from the executor back to the
optimizer was required but I was never sure quite how to implement it.
-- Bruce Momjian | http://candle.pha.pa.us pgman@candle.pha.pa.us | (610)
853-3000+ If your life is a hard drive, | 830 Blythe Avenue + Christ can be your backup. | Drexel Hill,
Pennsylvania19026