Skip site navigation (1) Skip section navigation (2)

Re: View vs Stored Proc Performance

From: Merlin Moncure <mmoncure(at)gmail(dot)com>
To: Dimitri Fontaine <dfontaine(at)hi-media(dot)com>
Cc: Jason Tesser <jasontesser(at)gmail(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: View vs Stored Proc Performance
Date: 2009-09-12 13:22:50
Message-ID: b42b73150909120622t4e22fc9ev82724679d2cb2f21@mail.gmail.com (view raw or flat)
Thread:
Lists: pgsql-performance
On Sat, Sep 12, 2009 at 7:51 AM, Dimitri Fontaine
<dfontaine(at)hi-media(dot)com> wrote:
> Merlin Moncure <mmoncure(at)gmail(dot)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

In response to

Responses

pgsql-performance by date

Next:From: zz_11Date: 2009-09-13 07:17:04
Subject: possible wrong query plan on pg 8.3.5,
Previous:From: Dimitri FontaineDate: 2009-09-12 11:51:29
Subject: Re: View vs Stored Proc Performance

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group