Re: [PERFORM] Regression from 9.4-9.6

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [PERFORM] Regression from 9.4-9.6
Дата
Msg-id 11434.1507491291@sss.pgh.pa.us
обсуждение исходный текст
Ответ на [PERFORM] Regression from 9.4-9.6  (Jim Nasby <jim@nasby.net>)
Ответы Re: [PERFORM] Regression from 9.4-9.6
Список pgsql-performance
Jim Nasby <jim@nasby.net> writes:
> I've got a query that's regressed from 9.4 to 9.6. I suspect it has
> something to do with the work done around bad plans from single-row
> estimates.

Why has this indexscan's cost estimate changed so much?

>> ->  Index Scan using bdata_filed_departuretime on bdata_forks  (cost=0.57..50807.51 rows=1 width=36) (actual
time=979.381..3207.777rows=508 loops=1) 

>> ->  Index Scan using bdata_filed_departuretime on bdata_forks  (cost=0.57..14894236.06 rows=1 width=36) (actual
time=892.664..3025.653rows=508 loops=1) 

I think the reason it's discarding the preferable plan is that, with this
huge increment in the estimated cost getting added to both alternatives,
the two nestloop plans have fuzzily the same total cost, and it's picking
the one you don't want on the basis of some secondary criterion.
        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
Дата:
Сообщение: [PERFORM] Regression from 9.4-9.6
Следующее
От: Jim Nasby
Дата:
Сообщение: Re: [PERFORM] Regression from 9.4-9.6