Re: UPDATE with JOIN not using index

Поиск
Список
Период
Сортировка
От Arnaud Lesauvage
Тема Re: UPDATE with JOIN not using index
Дата
Msg-id 4B9F9F03.2020807@codata.eu
обсуждение исходный текст
Ответ на Re: UPDATE with JOIN not using index  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: UPDATE with JOIN not using index  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-general
Le 16/03/2010 15:37, Tom Lane a écrit :
> Arnaud Lesauvage<arnaud.listes@codata.eu>  writes:
>>  First query :
>>  "Merge Join  (cost=699826.38..704333.80 rows=13548 width=836)"
>>  "  Merge Cond: (((c.rue)::text = (r.rue)::text) AND ((c.codesite)::text
>>  = (r.codesite)::text))"
>
>>  Second query :
>>  "Seq Scan on cellules c  (cost=0.00..5018080.39 rows=552343 width=823)"
>
> Please notice that the planner thinks the second plan is much more
> expensive than the first.  I think you will find that it's right.
> Using an index is not always the best way to do a query.

Yes indeed, I should have read the output of explain more thoroughly I
guess !
I am still a bit intrigued by the different query plans. Both query look
very similar to me, so why does the planner make so different choices ?

Regards,
Arnaud

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

Предыдущее
От: tv@fuzzy.cz
Дата:
Сообщение: Re: UPDATE with JOIN not using index
Следующее
От: Arnaud Lesauvage
Дата:
Сообщение: Re: UPDATE with JOIN not using index