Re: Weird row estimate

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: Weird row estimate
Дата
Msg-id 2393.1184186131@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Weird row estimate  (Marc Cousin <mcousin@sigma.fr>)
Ответы Re: Weird row estimate  (Marc Cousin <mcousin@sigma.fr>)
Список pgsql-performance
Marc Cousin <mcousin@sigma.fr> writes:
> Nevertheless, shouldn't the third estimate be smaller or equal to the sum of the two others ?

The planner's estimation for subplan conditions is pretty primitive
compared to joinable conditions.  When you add the OR, it's no longer
possible to treat the IN like a join, and everything gets an order of
magnitude dumber :-(

It might be worth trying this as a UNION of the two simple queries.

            regards, tom lane

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

Предыдущее
От: Francisco Reyes
Дата:
Сообщение: Re: WALL on controller without battery?
Следующее
От: Patric de Waha
Дата:
Сообщение: Re: Two questions.. shared_buffers and long reader issue