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

Re: Stored procedures

From: Rikard Pavelic <rikard(dot)pavelic(at)zg(dot)htnet(dot)hr>
To: pgsql-performance(at)postgresql(dot)org
Subject: Re: Stored procedures
Date: 2006-01-20 18:55:19
Message-ID: (view raw, whole thread or download thread mbox)
Lists: pgsql-performance
>> Hi,
>> Will simple queries such as "SELECT * FROM blah_table WHERE tag='x'; 
>> work any
>> faster by putting them into a stored procedure?

> IMHO no, why do you think so? You can use PREPARE instead, if you have 
> many
> selects like this.

I tought that creating stored procedures in database means
storing it's execution plan (well, actually storing it like a
compiled object). Well, that's what I've learned couple a years
ago in colledge ;)

What are the advantages of parsing SP functions every time it's called?

My position is that preparing stored procedures for execution solves
more problems, that it creates.
And the most important one to be optimizing access to queries from 
multiple connections (which is one of the most important reasons for 
using stored procedures in the first place).

Best regards,

In response to

pgsql-performance by date

Next:From: Jim C. NasbyDate: 2006-01-20 19:02:36
Subject: Re: Autovacuum / full vacuum (off-topic?)
Previous:From: Tom LaneDate: 2006-01-20 18:51:14
Subject: Re: SELECT MIN, MAX took longer time than SELECT COUNT, MIN, MAX

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