Re: Long Running Update

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 23/06/11 16:05, Harry Mantheakis wrote:
Hello

I am attempting to run an update statement that copies two fields from one table to another:


UPDATE
  table_A
SET
(
  field_1
, field_2
) = (
table_B.field_1
, table_B.field_2
)
FROM
table_B
WHERE
table_B.id = table_A.id
;


I frequently get updates involving a FROM clause wrong --- the resulting table is correct but the running time is quadratic. You might want to try a series of smaller examples to see if your query displays this behaviour.

Mark Thornton


--
Sent via pgsql-performance mailing list (pgsql-performance@xxxxxxxxxxxxxx)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance


[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux