Re: UPDATE with JOIN not using index

Поиск
Список
Период
Сортировка
От Richard Huxton
Тема Re: UPDATE with JOIN not using index
Дата
Msg-id 4B9F8CA8.7080004@archonet.com
обсуждение исходный текст
Ответ на UPDATE with JOIN not using index  (Arnaud Lesauvage <arnaud.listes@codata.eu>)
Ответы Re: UPDATE with JOIN not using index  (Arnaud Lesauvage <arnaud.listes@codata.eu>)
Список pgsql-general
On 16/03/10 13:05, Arnaud Lesauvage wrote:
> Hi all !
>
> PostgreSQL 8.4 here.
> I have a simple update query that looks like this :
>
> UPDATE t1
> SET col = t2.col
> FROM t2
> WHERE t1.key1 = t2.key1 AND t1.key2 = t2.key2;
>
> There is an index on (key1,key2) on the joined table (t2).
> This query does not use the index.

What does it do, then? The output of EXPLAIN would be a start if EXPLAIN
ANALYSE is too expensive.

Oh - and how many rows will this actually update?

--
   Richard Huxton
   Archonet Ltd

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

Предыдущее
От: Richard Huxton
Дата:
Сообщение: Re: Text search
Следующее
От: Arnaud Lesauvage
Дата:
Сообщение: Re: UPDATE with JOIN not using index