X-Original-To: pgsql-performance-postgresql.org@localhost.postgresql.org Received: from localhost (av.hub.org [200.46.204.144]) by postgresql.org (Postfix) with ESMTP id 0EC7B11F65B8 for ; Tue, 11 Apr 2006 05:22:54 -0300 (ADT) X-Virus-Scanned: by amavisd-new at hub.org X-Spam-Score: 0.778 X-Spam-Level: X-Spam-Status: No, score=0.778 required=5 tests=[AWL=-0.554, RCVD_IN_BL_SPAMCOP_NET=1.332] Received: from postgresql.org ([200.46.204.71]) by localhost (av.hub.org [200.46.204.144]) (amavisd-new, port 10024) with ESMTP id ZuVrB9Tz91wb for ; Tue, 11 Apr 2006 05:22:48 -0300 (ADT) X-Greylist: domain auto-whitelisted by SQLgrey- Received: from nproxy.gmail.com (nproxy.gmail.com [64.233.182.190]) by postgresql.org (Postfix) with ESMTP id DB4A911F602E for ; Tue, 11 Apr 2006 05:22:49 -0300 (ADT) Received: by nproxy.gmail.com with SMTP id p77so744172nfc for ; Tue, 11 Apr 2006 01:22:48 -0700 (PDT) DomainKey-Signature: a=rsa-sha1; q=dns; c=nofws; s=beta; d=gmail.com; h=received:message-id:date:from:to:subject:cc:in-reply-to:mime-version:content-type:content-transfer-encoding:content-disposition:references; b=neB1jHi7Cf0fCGyMqpMOVb7KbLocX6KTQ6FWqbF5znolnGYf2dY64TSZPKqah2dzQVx2n2X8zeUIap2+iCfToQU2Lw8GNXkeX1hvsXwrZUMYvEii9abtPxtijv2wzTVPUkFCqHRxhvQZxthIN1ULuo5wB0zwv+IwVcNEXObhJdQ= Received: by 10.49.75.19 with SMTP id c19mr290228nfl; Tue, 11 Apr 2006 01:22:48 -0700 (PDT) Received: by 10.49.27.16 with HTTP; Tue, 11 Apr 2006 01:22:48 -0700 (PDT) Message-ID: Date: Tue, 11 Apr 2006 13:52:48 +0530 From: "Rajesh Kumar Mallah" To: "Simon Dale" Subject: Re: Stored Procedure Performance Cc: pgsql-performance@postgresql.org In-Reply-To: <416F947BF5BA9E40B5F9AA649422212E074DE930@ex-mail2.internal.rmplc.net> MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable Content-Disposition: inline References: <416F947BF5BA9E40B5F9AA649422212E074DE930@ex-mail2.internal.rmplc.net> X-Archive-Number: 200604/229 X-Sequence-Number: 18313 On 4/11/06, Simon Dale wrote: > > > > Hi, > > > > I'm trying to evaluate PostgreSQL as a database that will have to store a > high volume of data and access that data frequently. One of the features = on > our wish list is to be able to use stored procedures to access the data a= nd > I was wondering if it is usual for stored procedures to perform slower on > PostgreSQL than raw SQL? No. RETURN NEXT keeps accumulating the data before returning. I am not sure if any optimisations have been done to that effect. In general functions are *NOT* slower than RAW SQL. Regds mallah.