Re: LATERAL quals revisited - Mailing list pgsql-hackers

From Tom Lane
Subject Re: LATERAL quals revisited
Date
Msg-id 13860.1376510691@sss.pgh.pa.us
Whole thread Raw
In response to Re: LATERAL quals revisited  (Antonin Houska <antonin.houska@gmail.com>)
List pgsql-hackers
Antonin Houska <antonin.houska@gmail.com> writes:
> On 07/04/2013 06:11 PM, Antonin Houska wrote:
>> On 07/03/2013 08:32 PM, Tom Lane wrote:
>>> Another possibility would be to keep the optimization, but disable it in
>>> queries that use LATERAL.  I don't much care for that though --- seems
>>> too Rube Goldbergish, and in any case I have a lot less faith in the
>>> whole concept now than I had before I started digging into this issue.

> I constructed a query that triggers the optimization - see attachment 
> with comments.

Thanks for poking at this.

> EXPLAIN shows the same plan with or without the ph_may_need 
> optimization, but that might be data problem (my tables are empty).

Yeah, I didn't have much luck getting a different plan even with data in
the tables.  What you'd need for this to be important would be for a join
order that's precluded without the ph_may_need logic to be significantly
better than the join orders that are still allowed.  While that's
certainly within the realm of possibility, the difficulty of triggering
the case at all reinforces my feeling that this optimization isn't worth
bothering with.  For the moment I'm just going to take it out.
        regards, tom lane



pgsql-hackers by date:

Previous
From: Tom Lane
Date:
Subject: Re: insert throw error when year field len > 4 for timestamptz datatype
Next
From: Sergey Konoplev
Date:
Subject: Re: System catalog vacuum issues