Re: Very bad plan when using VIEW and IN (SELECT...*) - Mailing list pgsql-general

From Tom Lane
Subject Re: Very bad plan when using VIEW and IN (SELECT...*)
Date
Msg-id 24217.1281711817@sss.pgh.pa.us
Whole thread Raw
In response to Re: Very bad plan when using VIEW and IN (SELECT...*)  ("Carlo Stonebanks" <stonec.register@sympatico.ca>)
List pgsql-general
"Carlo Stonebanks" <stonec.register@sympatico.ca> writes:
>>> Having said that, modern versions of the planner seem to deal reasonably
>>> well with this situation as long as they're being asked to push the
>>> condition through a UNION ALL.  Do you really need a UNION in that view?

> This is PG v 8.3 - do you mean "modern" compared to that?

When I was testing it yesterday it seemed that versions back to 8.2
generated acceptable plans, but the results might depend on details you
didn't show us.  Try it and see.

            regards, tom lane

pgsql-general by date:

Previous
From: Andre Lopes
Date:
Subject: How to add permissions to views?
Next
From: Craig Ringer
Date:
Subject: Re: Compression on SSL links?