X-Original-To: pgsql-sql-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id AB6C29DC9B9 for ; Tue, 24 Jan 2006 23:06:30 -0400 (AST) Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id 30249-09 for ; Tue, 24 Jan 2006 23:06:31 -0400 (AST) X-Greylist: delayed 00:06:38.123284 by SQLgrey- Received: from mail.tinet.org (mail.tinet.org [195.77.216.130]) by postgresql.org (Postfix) with ESMTP id DD0079DC850 for ; Tue, 24 Jan 2006 23:06:24 -0400 (AST) Received: (qmail 4441 invoked from network); 25 Jan 2006 02:59:49 -0000 Received: from 135.red-81-38-24.dynamicip.rima-tde.net (HELO d505) (ipv@[81.38.24.135]) (envelope-sender ) by mail.tinet.org (qmail-ldap-1.03) with SMTP for ; 25 Jan 2006 02:59:49 -0000 Message-ID: <003901c6215b$97036340$0600000a@matt.mutua> Reply-To: From: To: Subject: Fw: stored procedures for complex SELECTs Date: Wed, 25 Jan 2006 04:01:07 +0100 MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=response Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 6.00.2900.2670 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2900.2670 X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Status: No, score=0.55 required=5 tests=[NO_REAL_NAME=0.55] X-Spam-Score: 0.55 X-Spam-Level: X-Archive-Number: 200601/157 X-Sequence-Number: 23946 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: > To: > 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 >> >> >