Re: [NOVICE] WHERE clause not used when index is used

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: [NOVICE] WHERE clause not used when index is used
Дата
Msg-id 19581.1456858025@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: [NOVICE] WHERE clause not used when index is used  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-hackers
I wrote:
> I'm not sure if the costing change is a bug or not --- the non-bitmap scan
> does seem to be cheaper in reality, but not by a couple orders of
> magnitude as the planner now thinks.

Ah, scratch that, I wasn't looking closely enough.  The 9.4 plan is an
IndexScan whereas 9.5+ uses IndexOnlyScan, which accounts for the cost
differential.  The reason it changed is the remove_unused_subquery_outputs
patch (55d5b3c08279b487), which allows the subquery to know that it
doesn't actually have to return all columns of tenk1, so that an
index-only scan is legal.
        regards, tom lane



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

Предыдущее
От: Robert Haas
Дата:
Сообщение: Re: Fixing wrong comment on PQmblen and PQdsplen.
Следующее
От: Robert Haas
Дата:
Сообщение: Re: psql completion for ids in multibyte string