Skip site navigation (1) Skip section navigation (2)

Re: Parameterized-path cost comparisons need some work

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: Parameterized-path cost comparisons need some work
Date: 2012-02-29 19:02:42
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-hackers
On Wed, Feb 29, 2012 at 1:40 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> I am having trouble
>> constructing an example, but I feel like there might be cases where
>> it's possible to have path A, not parameterized, path B, parameterized
>> by R, and path C, parameterized by S, and maybe also path D,
>> parameterized by both R and S.  In that case, I feel like paths B and
>> C are incomparable.
> Indeed, and the code already knows that.  However, in this example, path
> A is capable of dominating the other three (being strictly less
> parameterized than them), and B and C are each capable of dominating D.
> The problem is just that I'd neglected to consider that rowcount now
> also becomes a figure of merit.

In theory, yes, but in practice, won't it nearly always be the case
that a less parameterized path generates more rows, and a more
parameterized path generates less rows, so that neither dominates the

Robert Haas
The Enterprise PostgreSQL Company

In response to


pgsql-hackers by date

Next:From: Tom LaneDate: 2012-02-29 19:08:43
Subject: Re: Parameterized-path cost comparisons need some work
Previous:From: Alvaro HerreraDate: 2012-02-29 18:53:03
Subject: Re: review: CHECK FUNCTION statement

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group