Re: Update 3 columns w/ 1 function calc 3 values?

Поиск
Список
Период
Сортировка
От Bruno Wolff III
Тема Re: Update 3 columns w/ 1 function calc 3 values?
Дата
Msg-id 20061003171956.GB5744@wolff.to
обсуждение исходный текст
Ответ на Update 3 columns w/ 1 function calc 3 values?  (paallen@attglobal.net)
Список pgsql-sql
On Tue, Oct 03, 2006 at 14:55:55 +0000, paallen@attglobal.net wrote:
> 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
> 
> 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.

Why is the data in three different tables? It is unusual to not have all
coordinates in the same table using one column per coordinate.

If you need to update 3 tables, you will need 3 update statements.
Doing all of the updates in a single transaction will help.
If possible doing all of the updates for each coordinate table in one command
will help. To do that you would need the data to be coming from data already
in the database.
Chnaging the design of your database so that the coordinates are all in the
same table (assuming that is possible) would be a good idea.


В списке pgsql-sql по дате отправления:

Предыдущее
От: Bruno Wolff III
Дата:
Сообщение: Re: How to FindNearest
Следующее
От: "Worky Workerson"
Дата:
Сообщение: Updating from table with multiple possibilities