Re: Parameterized-path cost comparisons need some work - Mailing list pgsql-hackers

From Tom Lane
Subject Re: Parameterized-path cost comparisons need some work
Date
Msg-id 23222.1330970555@sss.pgh.pa.us
Whole thread Raw
In response to Re: Parameterized-path cost comparisons need some work  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Parameterized-path cost comparisons need some work  (Robert Haas <robertmhaas@gmail.com>)
List pgsql-hackers
Robert Haas <robertmhaas@gmail.com> writes:
> On Sun, Mar 4, 2012 at 12:20 AM, Tom Lane <tgl@sss.pgh.pa.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


pgsql-hackers by date:

Previous
From: Robert Haas
Date:
Subject: Re: Patch review for logging hooks (CF 2012-01)
Next
From: Pavel Stehule
Date:
Subject: Re: poll: CHECK TRIGGER?