Re: To use a VIEW or not to use a View.....

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com>
Cc: Tomasz Myrta <jasiek(at)klaster(dot)net>, Jan Wieck <JanWieck(at)Yahoo(dot)com>, Ries van Twisk <ries(at)jongert(dot)nl>, pgsql-sql(at)postgresql(dot)org
Subject: Re: To use a VIEW or not to use a View.....
Date: 2003-01-23 01:01:20
Message-ID: 25948.1043283680@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com> writes:
> On Wed, 22 Jan 2003, Tom Lane wrote:
>> Stephan Szabo <sszabo(at)megazone23(dot)bigpanda(dot)com> writes:
>>> The filter is applied only to a. So, if you really wanted the
>>> c.a=3 condition to be applied for whatever reason you're out of
>>> luck.
>>
>> FWIW, CVS tip is brighter: the condition does propagate to both relations.

> Yeah. I was going to ask how hard you thought it would be to do for
> this particular sort of case. I thought about the simple case of using
> and realized it'd probably be reasonable in amount of work, but it seems
> I don't have to think about it. :)

It could still use more eyeballs looking at it. One thing I'm concerned
about is whether the extra (derived) conditions lead to double-counting
restrictivity and thus underestimating the number of result rows. I
haven't had time to really test that, but I suspect there may be a problem.

regards, tom lane

In response to

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message smoghe 2003-01-23 01:14:48 DBCC CheckIdent in a stored proc?
Previous Message Stephan Szabo 2003-01-23 00:52:29 Re: To use a VIEW or not to use a View.....