pg.ddx.io  pgsql-sql@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: William Leite Araújo <william.bh@gmail.com>
To: paallen@attglobal.net <paallen@attglobal.net>
Cc: pgsql-sql@postgresql.org
Subject: Re: Update 3 columns w/ 1 function calc 3 values?
Date: Tue, 3 Oct 2006 12:19:19 -0300
Message-ID: <bc63ad820610030819p35ea8ad1tad2431771b14fd8c@mail.gmail.com> (raw)
In-Reply-To: <20061003145559.C55369FB26B@postgresql.org>
References: <20061003145559.C55369FB26B@postgresql.org>

2006/10/3, paallen@attglobal.net <paallen@attglobal.net>:
>
> 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.


     It's realy very hard say something without the involving tables schema.

     You can:
        - change the function to return x,y,z in one call only ?
        - join the tables?
        - what is the function language?


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
>



-- 
William Leite Araújo

view thread (4+ messages)  latest in thread

Message-ID: <bc63ad820610030819p35ea8ad1tad2431771b14fd8c@mail.gmail.com>
Permalink:  ../bc63ad820610030819p35ea8ad1tad2431771b14fd8c@mail.gmail.com/
Also on:    postgresql.org/message-id/bc63ad820610030819p35ea8ad1tad2431771b14fd8c@mail.gmail.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-sql@postgresql.org
  Cc: william.bh@gmail.com, paallen@attglobal.net
  Subject: Re: Update 3 columns w/ 1 function calc 3 values?
  In-Reply-To: <bc63ad820610030819p35ea8ad1tad2431771b14fd8c@mail.gmail.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox