Re: Slow update

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Slow update
Дата
Msg-id 21152.1126534046@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Slow update  (Hilary Forbes <hforbes@dmr.co.uk>)
Список pgsql-performance
Hilary Forbes <hforbes@dmr.co.uk> writes:
> I need to set the value of a field in table A to a value in table B depending on the existence of the record in table
B. So what I have done is 

> UPDATE tableA set a.val1=b.somefield FROM tableA a, tableB b WHERE a.key1=b.key1;

You've written an unconstrained join to a second copy of tableA.

            regards, tom lane

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

Предыдущее
От: Bruno Wolff III
Дата:
Сообщение: Re: Slow update
Следующее
От: Dave Cramer
Дата:
Сообщение: Re: Prepared statement not using index