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
Views: Raw Message | Whole Thread | Download mbox | Resend email
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

Browse pgsql-performance by date

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