Re: Very bad plan when using VIEW and IN (SELECT...*)

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: "Carlo Stonebanks" <stonec(dot)register(at)sympatico(dot)ca>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: Very bad plan when using VIEW and IN (SELECT...*)
Date: 2010-08-13 15:03:37
Message-ID: 24217.1281711817@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

"Carlo Stonebanks" <stonec(dot)register(at)sympatico(dot)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

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Craig Ringer 2010-08-13 15:04:40 Re: Compression on SSL links?
Previous Message Andre Lopes 2010-08-13 14:55:15 How to add permissions to views?