Re: [PERFORM] Regression from 9.4-9.6

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [PERFORM] Regression from 9.4-9.6
Дата
Msg-id 13826.1507495079@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [PERFORM] Regression from 9.4-9.6  (Jim Nasby <jim@nasby.net>)
Ответы Re: [PERFORM] Regression from 9.4-9.6  (Jim Nasby <jim@nasby.net>)
Список pgsql-performance
Jim Nasby <jim@nasby.net> writes:
> On 10/8/17 2:34 PM, Tom Lane wrote:
>> Why has this indexscan's cost estimate changed so much?

> Great question... the only thing that sticks out is the coalesce(). Let 
> me see if an analyze with a higher stats target changes anything. FWIW, 
> the 9.6 database is copied from the 9.4 one once a week and then 
> pg_upgraded. I'm pretty sure an ANALYZE is part of that process.

Hm, now that I see the SubPlan in there, I wonder whether 9.6 is
accounting more conservatively for the cost of the subplan.  It
probably is assuming that the subplan gets run for each row fetched
from the index, although the loops and rows-removed counts show
that the previous filter conditions reject 99% of the fetched rows.

But that code looks the same in 9.4, so I don't understand why
the 9.4 estimate isn't equally large ...
        regards, tom lane


-- 
Sent via pgsql-performance mailing list (pgsql-performance@postgresql.org)
To make changes to your subscription:
http://www.postgresql.org/mailpref/pgsql-performance

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

Предыдущее
От: Jim Nasby
Дата:
Сообщение: Re: [PERFORM] Regression from 9.4-9.6
Следующее
От: Jim Nasby
Дата:
Сообщение: Re: [PERFORM] Regression from 9.4-9.6