Re: Long Running Update

Поиск
Список
Период
Сортировка
От Mark Thornton
Тема Re: Long Running Update
Дата
Msg-id 4E04889B.2030806@optrak.com
обсуждение исходный текст
Ответ на Long Running Update  (Harry Mantheakis <harry.mantheakis@riskcontrollimited.com>)
Ответы Re: Long Running Update  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Re: Long Running Update  (Harry Mantheakis <harry.mantheakis@riskcontrollimited.com>)
Список pgsql-performance
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


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

Предыдущее
От: Harry Mantheakis
Дата:
Сообщение: Re: Long Running Update
Следующее
От: "Kevin Grittner"
Дата:
Сообщение: Re: Long Running Update