Re: Re: [COMMITTERS] pgsql: Rewrite GEQO's gimme_tree function so that it always finds a - Mailing list pgsql-hackers

From Robert Haas
Subject Re: Re: [COMMITTERS] pgsql: Rewrite GEQO's gimme_tree function so that it always finds a
Date
Msg-id 603c8f070911271205r4d4534edt1cebcb76ff5066a5@mail.gmail.com
Whole thread Raw
In response to Re: Re: [COMMITTERS] pgsql: Rewrite GEQO's gimme_tree function so that it always finds a  (Robert Haas <robertmhaas@gmail.com>)
Responses Re: Re: [COMMITTERS] pgsql: Rewrite GEQO's gimme_tree function so that it always finds a
Re: Re: [COMMITTERS] pgsql: Rewrite GEQO's gimme_tree function so that it always finds a
List pgsql-hackers
On Mon, Nov 9, 2009 at 1:42 PM, Robert Haas <robertmhaas@gmail.com> wrote:
> On Mon, Nov 9, 2009 at 1:10 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> Robert Haas <robertmhaas@gmail.com> writes:
>>> On Mon, Nov 9, 2009 at 10:57 AM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
>>>> Too bad you don't have debug symbols ... it'd be interesting to see
>>>> how long that list is.
>>
>>> I stopped it a couple of times.  Lengths of list1, list2 respectively:
>>
>>> 8876, 20
>>> 14649, 18
>>> 15334, 10
>>> 17148, 18
>>> 18173, 18
>>
>> Yowza.  18000 distinct paths for one relation?  Could we see the test
>> case?
>
> Well, the test case isn't simple, and I'm not sure that my employer
> would be pleased if I posted it to a public mailing list. The general
> thrust of it is that [...]

Test case attached.  Load this into an empty database and then:

set geqo to off;
set join_collapse_limit to 100;
set from_collapse_limit to 100;
select * from foo_view order by name;

I guess it's somewhat unsurprising that you can make the planner get
into trouble with the above settings - we've been over that ground
before.  But it might be possibly interesting that such a simple
schema is capable of generating so many paths.  This breaks 40,000
without finishing.

...Robert

Attachment

pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: Writeable CTE patch
Next
From: Jeff Davis
Date:
Subject: Re: [PATCH 4/4] Add tests to dblink covering use of COPY TO FUNCTION