Update 3 columns w/ 1 function calc 3 values? - Mailing list pgsql-sql

From paallen@attglobal.net
Subject Update 3 columns w/ 1 function calc 3 values?
Date
Msg-id 20061003145559.C55369FB26B@postgresql.org
Whole thread Raw
Responses Re: Update 3 columns w/ 1 function calc 3 values?  ("William Leite Araújo" <william.bh@gmail.com>)
Re: Update 3 columns w/ 1 function calc 3 values?  (Bruno Wolff III <bruno@wolff.to>)
Re: Update 3 columns w/ 1 function calc 3 values?  (Markus Schaber <schabi@logix-tt.com>)
List pgsql-sql
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 



pgsql-sql by date:

Previous
From: Andrew Sullivan
Date:
Subject: Re: Assigning a timestamp without timezone to a timestamp
Next
From: "William Leite Araújo"
Date:
Subject: Re: Update 3 columns w/ 1 function calc 3 values?