Re: View prevents index

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Christopher Masto <chris+pg-general(at)netmonger(dot)net>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: View prevents index
Date: 2001-07-11 05:10:04
Message-ID: 17448.994828204@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Christopher Masto <chris+pg-general(at)netmonger(dot)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

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Martijn van Oosterhout 2001-07-11 05:34:19 [PATCH] Partial indices almost there
Previous Message Justin Clift 2001-07-11 04:40:14 Re: Re: Encrypting database?