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

Re: Performance of SQL Function versus View

From: Andrew Dunstan <andrew(at)dunslane(dot)net>
To: Robert Haas <robertmhaas(at)gmail(dot)com>
Cc: Igor Schtein <ischtein(at)gmail(dot)com>, pgsql-performance(at)postgresql(dot)org
Subject: Re: Performance of SQL Function versus View
Date: 2012-04-03 14:30:00
Message-ID: 4F7B0968.5000805@dunslane.net (view raw or flat)
Thread:
Lists: pgsql-performance

On 04/03/2012 10:21 AM, Robert Haas wrote:
>
> You should probably test this in your environment, but I'd expect the
> view to be better.  Wrapping logic inside PL/pgsql functions
> needlessly rarely turn outs to be a win.



Right, But also note that auto_explain is very useful in getting plans 
and times of queries nested in functions which can't easily be got 
otherwise.

cheers

andrew

In response to

pgsql-performance by date

Next:From: Robert HaasDate: 2012-04-03 14:57:43
Subject: Re: ...WHERE TRUE" condition in union results in bad query pla
Previous:From: Robert HaasDate: 2012-04-03 14:21:10
Subject: Re: Performance of SQL Function versus View

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