pg.ddx.io pgsql-sql@postgresql.org mailing list archivehelp / color / mirror / Atom feed
From: Michael Glaesemann <grzm@myrealbox.com>
To: alex-lists-pgsql@yuriev.com
Cc: pgsql-sql@postgresql.org
Subject: Re: stored procedures for complex SELECTs
Date: Thu, 19 Jan 2006 08:39:16 +0900
Message-ID: <F4383AC1-E004-4883-8883-F5B5AF449658@myrealbox.com> (raw)
In-Reply-To: <20060118231714.GA10125@s2.yuriev.com>
References: <20060118231714.GA10125@s2.yuriev.com>
On Jan 19, 2006, at 8:17 , alex-lists-pgsql@yuriev.com wrote:
> Are there performance advantages that can be achieved by wrapping a
> complex SELECT into a stored procedure?
I believe it depends on the procedural language. If it's SQL, I think
it may be inlined, so you'd have overhead due to the stored procedure
rather than the select itself would probably be minimal. In any other
language, there would be additional parsing overhead, I believe, so I
don't think it would be faster than the select itself.
However, why don't you test it? Test each case in an EXPLAIN ANALYZE
or run some other benchmark to see if there's a performance
difference. Then you'll know for sureāand have numbers to back it up.
Michael Glaesemann
grzm myrealbox com
view thread (3+ messages) latest in thread
Message-ID: <F4383AC1-E004-4883-8883-F5B5AF449658@myrealbox.com> Permalink: ../F4383AC1-E004-4883-8883-F5B5AF449658@myrealbox.com/ Also on: postgresql.org/message-id/F4383AC1-E004-4883-8883-F5B5AF449658@myrealbox.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-sql@postgresql.org Cc: grzm@myrealbox.com, alex-lists-pgsql@yuriev.com Subject: Re: stored procedures for complex SELECTs In-Reply-To: <F4383AC1-E004-4883-8883-F5B5AF449658@myrealbox.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