For better performance, try to utilize prepared statements;

example:

PREPARE CPrep_Clients (varchar(20)) AS
    SELECT * FROM client WHERE nom = $1;

EXECUTE CPrep_Clients('Francio');

In my system, over 51ms difference between standard select (prepared by-pass
planification/optimization)

Regards



----- Original Message ----- From: <[EMAIL PROTECTED]>
To: <pgsql-sql@postgresql.org>
Sent: Thursday, January 19, 2006 12:17 AM
Subject: [SQL] stored procedures for complex SELECTs



Are there performance advantages that can be achieved by wrapping a
complex SELECT into a stored procedure?

Alex

---------------------------(end of broadcast)---------------------------
TIP 4: Have you searched our list archives?

              http://archives.postgresql.org





---------------------------(end of broadcast)---------------------------
TIP 1: if posting/reading through Usenet, please send an appropriate
      subscribe-nomail command to [EMAIL PROTECTED] so that your
      message can get through to the mailing list cleanly

Reply via email to