Received: from localhost (mx1.hub.org [200.46.208.251]) by postgresql.org (Postfix) with ESMTP id 1CF4C9FB2DF for ; Tue, 3 Oct 2006 11:56:09 -0300 (ADT) Received: from postgresql.org ([200.46.204.71]) by localhost (mx1.hub.org [200.46.208.251]) (amavisd-new, port 10024) with ESMTP id 54824-05 for ; Tue, 3 Oct 2006 11:55:59 -0300 (ADT) X-Greylist: from auto-whitelisted by SQLgrey- Received: from kcout03.prserv.net (kcout03.prserv.net [12.154.55.33]) by postgresql.org (Postfix) with ESMTP id C55369FB26B for ; Tue, 3 Oct 2006 11:55:59 -0300 (ADT) Received: from kcbe01 (kcbe01.backbone.kan[10.254.3.141]) by prserv.net (kcout03) with SMTP id <2006100314555420300hgoi3e>; Tue, 3 Oct 2006 14:55:55 +0000 X-Originating-IP: [10.254.3.141] From: paallen@attglobal.net To: pgsql-sql@postgresql.org, Subject: Update 3 columns w/ 1 function calc 3 values? Date: Tue, 03 Oct 2006 14:55:55 +0000 X-Priority: 3 MIME-Version: 1.0 Content-Type: text/plain Content-Transfer-Encoding: 7bit Message-Id: <20061003145559.C55369FB26B@postgresql.org> X-Virus-Scanned: Maia Mailguard 1.0.1 X-Spam-Status: No, hits=2.006 tagged_above=0 required=5 tests=AWL, MSGID_FROM_MTA_ID, NO_REAL_NAME X-Spam-Level: ** X-Archive-Number: 200610/22 X-Sequence-Number: 26411 Hi all, I am moving some of my old MS Access functions to plpgsql. My function was made to return coordinates, X,Y,Z for a point along a curved line. So it is not the fastest of functions because it has to call and query data from 3 different tables. I used to just create 3 wrapper functions for my main function which would return the x, y, and z values seperately but that requires the main function to be called 3 seperate times. So here is my bottle neck. Of course I need to update +50,000 records. What should I do to speed this up. What is the best way to update 3 columns from one function call. In MSACCESS I once rig the function to cycle through the records with a curser but that was slow and would crap out due to the shear number. Thanks, Phil