Re: Cost estimates for parameterized paths

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Cost estimates for parameterized paths
Date: 2010-09-04 00:35:33
Message-ID: AANLkTik25SAqBQOCjj68SK1OctMk8_C5+=ELCM+uMxOX@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

On Fri, Sep 3, 2010 at 5:53 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>> On Fri, Sep 3, 2010 at 2:04 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>>> On reflection I think that for parameterized paths the problem won't be
>>> too bad, because (a) we'll ignore parameterized paths except when
>>> considering a join to the right outer rel, so their presence in the
>>> rel's pathlist won't cost much otherwise,
>
>> Hmm.  Maybe they should go into a separate path list, and perhaps we
>> could do the min/max calculations only with that pathlist (at least
>> for now), thus avoiding taking a generalized penalty to handle this
>> specific case.  IIUC, a parameterized path should never cause an
>> unparamaterized path to be thrown out,
>
> Yeah, but the converse isn't true.  I had considered the idea of keeping
> parameterized paths in a separate list, but you'd still have to examine
> the main list to look for unparameterized paths that might dominate them.

Definitely true, but if it avoids slowing down add_path() in the
common case, it's worth it.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise Postgres Company

In response to

Browse pgsql-hackers by date

  From Date Subject
Next Message Robert Haas 2010-09-04 01:19:06 Re: Interruptible sleeps (was Re: CommitFest 2009-07: Yay, Kevin! Thanks, reviewers!)
Previous Message Robert Haas 2010-09-04 00:33:29 Re: ps buffer is incorrectly padded on the (latest) OS X