From: Andrew Dunstan <andrew@dunslane.net>
To: Robert Haas <robertmhaas@gmail.com>
Cc: Igor Schtein <ischtein@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Performance of SQL Function versus View
Date: Tue, 03 Apr 2012 10:30:00 -0400
Message-ID: <4F7B0968.5000805@dunslane.net> (raw)
In-Reply-To: <CA+TgmoaOv+CKkw9fKTid7Vca+abAHSakoG8cn7hb7O2mBmaW-g@mail.gmail.com>
References: <021a01ccf722$059a2a80$10ce7f80$@gmail.com>
<CA+TgmoaOv+CKkw9fKTid7Vca+abAHSakoG8cn7hb7O2mBmaW-g@mail.gmail.com>
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
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: andrew@dunslane.net, robertmhaas@gmail.com, ischtein@gmail.com
Subject: Re: Performance of SQL Function versus View
In-Reply-To: <4F7B0968.5000805@dunslane.net>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox