Re: Fuzzy cost comparison to eliminate redundant planning work

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Fuzzy cost comparison to eliminate redundant planning work
Date: 2004-03-29 06:05:54
Message-ID: 22054.1080540354@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Bruce Momjian <pgman(at)candle(dot)pha(dot)pa(dot)us> writes:
> Do we know in the optimizer whether we will be needing cheapest startup
> or not?

No. Higher levels might want either.

> Is the middle one kept because the optimizer has to mix the startup plus
> some percentage of the total cost for queries using LIMIT?

Right. There are potentially some ranges of LIMIT for which it could
win, I believe. Maybe with some math you could prove there is no range
in which the other two don't dominate it, but I suspect the extra logic
would slow down add_path more than it's worth.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Bruce Momjian 2004-03-29 06:20:56 Re: Fuzzy cost comparison to eliminate redundant planning
Previous Message Eric Ridge 2004-03-29 06:01:56 Re: User Defined Functions/AM's inherently slow?