Re: Pushing IN (subquery) down through UNION ALL? - Mailing list pgsql-performance

From Robert Haas
Subject Re: Pushing IN (subquery) down through UNION ALL?
Date
Msg-id AANLkTinyB4NCDrH8sY8n+EJKSU9=_HtMLFL6bxZCia9W@mail.gmail.com
Whole thread Raw
In response to Re: Pushing IN (subquery) down through UNION ALL?  (Thom Brown <thom@linux.com>)
Responses Re: Pushing IN (subquery) down through UNION ALL?  (Thom Brown <thom@linux.com>)
List pgsql-performance
On Wed, Mar 2, 2011 at 9:11 AM, Thom Brown <thom@linux.com> wrote:
> On 2 March 2011 19:38, Robert Haas <robertmhaas@gmail.com> wrote:
>> On Thu, Feb 24, 2011 at 11:38 AM, Dave Johansen <davejohansen@gmail.com> wrote:
>>> I also just noticed that an ORDER BY x LIMIT n optimization is not pushed
>>> down through the UNION ALL as well. I understand that this may be a little
>>> trickier because the ORDER BY and LIMIT would need to be applied to the
>>> subqueries and then re-applied after the APPEND,
>>
>> PostgreSQL 9.1 will know how to do this, FWIW.
>
> Out of curiosity, what was the commit for this?

11cad29c91524aac1d0b61e0ea0357398ab79bf8 Support MergeAppend plans, to
allow sorted output from append relations.
034967bdcbb0c7be61d0500955226e1234ec5f04 Reimplement planner's
handling of MIN/MAX aggregate optimization.
947d0c862c895618a874344322e7b07c9df05cb2 Use appendrel planning logic
for top-level UNION ALL structures.
6fbc323c8042303a737028f9da7616896bccc517 Further fallout from the
MergeAppend patch.

--
Robert Haas
EnterpriseDB: http://www.enterprisedb.com
The Enterprise PostgreSQL Company

pgsql-performance by date:

Previous
From: Thom Brown
Date:
Subject: Re: Pushing IN (subquery) down through UNION ALL?
Next
From: Thom Brown
Date:
Subject: Re: Pushing IN (subquery) down through UNION ALL?