Re: Pushing IN (subquery) down through UNION ALL?

From: Robert Haas <robertmhaas(at)gmail(dot)com>
To: Dave Johansen <davejohansen(at)gmail(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: Pushing IN (subquery) down through UNION ALL?
Date: 2011-03-02 14:08:45
Message-ID: AANLkTinM1gAqY2r5An+qG77bJkJu6H6GaRHRZ316d1sS@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

On Thu, Feb 24, 2011 at 11:38 AM, Dave Johansen <davejohansen(at)gmail(dot)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.

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

In response to

Responses

Browse pgsql-performance by date

  From Date Subject
Next Message Thom Brown 2011-03-02 14:11:51 Re: Pushing IN (subquery) down through UNION ALL?
Previous Message Andy Colson 2011-03-02 03:41:23 Re: Performance trouble finding records through related records