Re: Perfomance of views - Mailing list pgsql-performance

From Richard Huxton
Subject Re: Perfomance of views
Date
Msg-id 4360F4F7.8070503@archonet.com
Whole thread Raw
In response to Re: Perfomance of views  (Jan Wieck <JanWieck@Yahoo.com>)
List pgsql-performance
Jan Wieck wrote:
> On 10/27/2005 7:29 AM, Richard Huxton wrote:
>> Svenne Krap wrote:
>>
>>> What do you mean exactly but "pushing conditions inside" ?
>>
>> If I have something like "SELECT * FROM complicated_view WHERE foo =
>> 7" then the planner can look "inside" complicated_view and see where
>> it can attach the condition "foo=7", rather than running the query and
>> applying the condition at the end.
>
> Sorry, but the planner doesn't attach the condition anywhere. It is the
> rewriter that takes the actual query, replaces the views rangetable and
> expression entries with the actual underlying objects and adds the views
> condition with an AND to the queries condition. Simply example:

Thanks for the correction Jan.

--
   Richard Huxton
   Archonet Ltd

pgsql-performance by date:

Previous
From: Denis
Date:
Subject: Update using primary key slow
Next
From: Richard Huxton
Date:
Subject: Re: how postgresql request the computer resources