Re: COUNT(*) and index-only scans

Поиск
Список
Период
Сортировка
От Tom Lane
Тема Re: COUNT(*) and index-only scans
Дата
Msg-id 8465.1318277872@sss.pgh.pa.us
обсуждение исходный текст
Ответ на Re: COUNT(*) and index-only scans  ("Kevin Grittner" <Kevin.Grittner@wicourts.gov>)
Ответы Re: COUNT(*) and index-only scans
Список pgsql-hackers
"Kevin Grittner" <Kevin.Grittner@wicourts.gov> writes:
> Tom Lane <tgl@sss.pgh.pa.us> wrote:
>> I think what Robert is complaining about is that we won't
>> currently consider an index that matches neither any WHERE clauses
>> nor ORDER BY, ie, count(*) over the whole table won't get
>> considered for an index-only scan, regardless of cost estimates.
> I guess the trick would be to get it to consider such plans only
> under some conditions, to avoid explosive growth in planning time
> for some types of queries.  Some statistics bucket for the number of
> non-frozen tuples in the relation, maybe?

My intention was to allow it to consider any covering index.  You're
thinking about the cost estimate, which is really entirely different.
        regards, tom lane


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

Предыдущее
От: "Kevin Grittner"
Дата:
Сообщение: Re: Overhead cost of Serializable Snapshot Isolation
Следующее
От: Kohei KaiGai
Дата:
Сообщение: Re: [v9.2] Fix Leaky View Problem