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

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: Re: [COMMITTERS] pgsql: Rewrite GEQO's gimme_tree function so that it always finds a
Date: 2009-11-27 20:05:07
Message-ID: 603c8f070911271205r4d4534edt1cebcb76ff5066a5@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-committers pgsql-hackers

On Mon, Nov 9, 2009 at 1:42 PM, Robert Haas <robertmhaas(at)gmail(dot)com> wrote:
> On Mon, Nov 9, 2009 at 1:10 PM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> wrote:
>> Robert Haas <robertmhaas(at)gmail(dot)com> writes:
>>> On Mon, Nov 9, 2009 at 10:57 AM, Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)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 Content-Type Size
list_concat_unique_ptr.dump application/octet-stream 45.3 KB

In response to

Responses

Browse pgsql-committers by date

  From Date Subject
Next Message Tom Lane 2009-11-27 23:04:58 Re: Re: [COMMITTERS] pgsql: Rewrite GEQO's gimme_tree function so that it always finds a
Previous Message User H-saito 2009-11-27 17:41:29 psqlodbc - psqlodbc: added some change.

Browse pgsql-hackers by date

  From Date Subject
Next Message Dave Cramer 2009-11-27 20:34:09 OpenSSL key renegotiation with patched openssl
Previous Message Tom Lane 2009-11-27 19:44:50 Re: Writeable CTE patch