Re: COUNT(*) and index-only scans

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: COUNT(*) and index-only scans
Дата
Msg-id CAM-w4HOscbrS1kyjO0H7BnPozn1thrpa=h6xmxUTXX-aA9V8eA@mail.gmail.com
обсуждение исходный текст
Ответ на Re: COUNT(*) and index-only scans  (Tom Lane <tgl@sss.pgh.pa.us>)
Ответы Re: COUNT(*) and index-only scans
Re: COUNT(*) and index-only scans
Список pgsql-hackers
On Mon, Oct 10, 2011 at 9:17 PM, Tom Lane <tgl@sss.pgh.pa.us> wrote:
> My intention was to allow it to consider any covering index.  You're
> thinking about the cost estimate, which is really entirely different.
>

Is there any reason to consider more than one? I would have expected
the narrowest one to be the best choice. There's something to be said
for using the same index consistently but we already have that problem
and make no attempt to do that. And partial indexes might be better
but then we would already be considering them if their constraints are
satisfied.

--
greg


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: index-only scans
Следующее
От: "Kevin Grittner"
Дата:
Сообщение: Re: COUNT(*) and index-only scans