Re: Parameterized-path cost comparisons need some work

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: pgsql-hackers(at)postgresql(dot)org
Subject: Re: Parameterized-path cost comparisons need some work
Date: 2012-03-05 18:02:35
Message-ID: 23222.1330970555@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-hackers

Robert Haas <robertmhaas(at)gmail(dot)com> writes:
> On Sun, Mar 4, 2012 at 12:20 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> One annoying thing about that is that it will reduce the usefulness of
>> add_path_precheck, because that's called before we compute the rowcount
>> estimates (and indeed not having to make the rowcount estimates is one
>> of the major savings from the precheck). I think what we'll have to do
>> is assume that a difference in parameterization could result in a
>> difference in rowcount, and hence only a dominant path with exactly the
>> same parameterization can result in failing the precheck.

> I wish we had some way of figuring out how much this - and maybe some
> of the other new planning possibilities like index-only scans - were
> going to cost us on typical medium-to-large join problems. In the
> absence of real-world data it's hard to know how worried we should be.

I have been doing testing against a couple of complex queries supplied
by Kevin and Andres. It'd be nice to have a larger sample though ...

I'm a bit concerned that this change will end up removing most of the
usefulness of add_path_precheck. I would not actually cry if that went
away again, because hacking things like that greatly complicated the API
of the join cost functions. But it's nervous-making to be making
decisions like that on the basis of rather small sets of queries.

regards, tom lane

In response to

Responses

Browse pgsql-hackers by date

  From Date Subject
Next Message Pavel Stehule 2012-03-05 18:02:45 Re: poll: CHECK TRIGGER?
Previous Message Robert Haas 2012-03-05 17:59:49 Re: Patch review for logging hooks (CF 2012-01)