Re: View prevents index - Mailing list pgsql-general

From Tom Lane
Subject Re: View prevents index
Date
Msg-id 17448.994828204@sss.pgh.pa.us
Whole thread Raw
In response to View prevents index  (Christopher Masto <chris+pg-general@netmonger.net>)
Responses Re: View prevents index
List pgsql-general
Christopher Masto <chris+pg-general@netmonger.net> writes:
> I guess maybe I'm expecting too much magic optimization.

You're expecting the system to transform

    (SELECT foo UNION SELECT bar) WHERE condition

into

    (SELECT foo WHERE condition) UNION (SELECT bar WHERE condition)

It's not immediately obvious to me that these are equivalent, or
perhaps I should say it's not clear under what conditions is the
transformation legitimate.

            regards, tom lane

pgsql-general by date:

Previous
From: Justin Clift
Date:
Subject: Re: Re: Encrypting database?
Next
From: Martijn van Oosterhout
Date:
Subject: [PATCH] Partial indices almost there