| From: | Richard Huxton <dev(at)archonet(dot)com> |
|---|---|
| To: | Jan Wieck <JanWieck(at)Yahoo(dot)com> |
| Cc: | Svenne Krap <svenne(at)krap(dot)dk>, 'Postgresql Performance' <pgsql-performance(at)postgresql(dot)org> |
| Subject: | Re: Perfomance of views |
| Date: | 2005-10-27 15:40:39 |
| Message-ID: | 4360F4F7.8070503@archonet.com |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | 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
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Denis | 2005-10-27 15:41:22 | Update using primary key slow |
| Previous Message | Svenne Krap | 2005-10-27 15:10:29 | Re: Perfomance of views |