Re: Slow update with simple query

Поиск
Список
Период
Сортировка
От Ragnar
Тема Re: Slow update with simple query
Дата
Msg-id 1166021340.6369.103.camel@localhost.localdomain
обсуждение исходный текст
Ответ на Re: Slow update with simple query  (Arnaud Lesauvage <thewild@freesurf.fr>)
Ответы Re: Slow update with simple query  (Arnaud Lesauvage <thewild@freesurf.fr>)
Список pgsql-performance
On mið, 2006-12-13 at 14:38 +0100, Arnaud Lesauvage wrote:
> Jens Schipkowski a écrit :
> > On Wed, 13 Dec 2006 13:23:41 +0100, Arnaud Lesauvage <thewild@freesurf.fr>
> >> Why is this query better than the other one ? Because it runs the
> >> "(field IN ('some','other') AND field2 = 'Y')" once and then executes
> >> the join with the resulting set ?
> > True. The Subselect in FROM clause will be executed once and will be
> > joined using the condition at where clause. So your condition at t2 is not
> > executed for each row in t1(2mio records) but for each row in t2(1k
> > records). And the boolean value is already set during update.
>
> OK Jens, thanks for clarifying this.
> I thought the planner could guess what to do in such cases.

don't worry, it will.
this is not your problem

gnari



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

Предыдущее
От: Arnaud Lesauvage
Дата:
Сообщение: Re: Slow update with simple query
Следующее
От: Arnaud Lesauvage
Дата:
Сообщение: Re: Slow update with simple query