Re: View vs Stored Proc Performance - Mailing list pgsql-performance

From Merlin Moncure
Subject Re: View vs Stored Proc Performance
Date
Msg-id b42b73150909120622t4e22fc9ev82724679d2cb2f21@mail.gmail.com
Whole thread Raw
In response to Re: View vs Stored Proc Performance  (Dimitri Fontaine <dfontaine@hi-media.com>)
Responses Re: View vs Stored Proc Performance  (Ivan Voras <ivoras@freebsd.org>)
List pgsql-performance
On Sat, Sep 12, 2009 at 7:51 AM, Dimitri Fontaine
<dfontaine@hi-media.com> wrote:
> Merlin Moncure <mmoncure@gmail.com> writes:
>> like joining the result to another table...the planner can see
>> 'through' the view, etc.  in a function, the result is fetched first
>> and materialized without looking at the rest of the query.
>
> I though the planner would "see through" SQL language functions and
> inline them when possible, so they often can make for parametrized
> views...

It can happen for simple functions but often it will not.  For views
it always happens.

merlin

pgsql-performance by date:

Previous
From: Dimitri Fontaine
Date:
Subject: Re: View vs Stored Proc Performance
Next
From: zz_11@mail.bg
Date:
Subject: possible wrong query plan on pg 8.3.5,