pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Giorgio Valoti <giorgio_v@mac.com>
To: Andreas Kretschmer <akretschmer@spamfence.net>
Cc: pgsql-performance@postgresql.org
Subject: Re: Views and functions returning sets of records
Date: Sun, 23 Mar 2008 10:37:12 +0100
Message-ID: <D49B7437-F5A9-44FC-807F-C8472C059B2B@mac.com> (raw)
In-Reply-To: <20080322165551.GA19460@KanotixBox>
References: <6A737ADC-2A11-4A01-8ACE-C439E4297273@mac.com>
	<29705.1206203639@sss.pgh.pa.us>
	<20080322165551.GA19460@KanotixBox>


On 22/mar/08, at 17:55, Andreas Kretschmer wrote:

> Tom Lane <tgl@sss.pgh.pa.us> schrieb:
>
>> Giorgio Valoti <giorgio_v@mac.com> writes:
>>> maybe it’s a naive question but I was wondering if there is any
>>> difference, from a performance point of view, between a view and a
>>> function performing the same task,
>>
>> Yes.  Usually the view will win.
>
> *smile*

:-(
I was thinking about using using functions as the main way to  
interact with the database from an external application. The  
(supposed) rationale was to simplify the application code: you only  
have to worry about in and out function parameters.
Are there any way to pass some hints to the planner? For example,  
could the IMMUTABLE/STABLE/VOLATILE modifiers be of some help?


Thank you
--
Giorgio Valoti







view thread (8+ messages)  latest in thread

Message-ID: <D49B7437-F5A9-44FC-807F-C8472C059B2B@mac.com>
Permalink:  ../D49B7437-F5A9-44FC-807F-C8472C059B2B@mac.com/
Also on:    postgresql.org/message-id/D49B7437-F5A9-44FC-807F-C8472C059B2B@mac.com

 · 

reply

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: giorgio_v@mac.com, akretschmer@spamfence.net
  Subject: Re: Views and functions returning sets of records
  In-Reply-To: <D49B7437-F5A9-44FC-807F-C8472C059B2B@mac.com>

* 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