Re: COUNT(*) and index-only scans

Поиск
Список
Период
Сортировка
Искать
От
Bruce Momjian
Тема
Re: COUNT(*) and index-only scans
Дата
Msg-id
201110111643.p9BGhxf09653@momjian.us
Ответ на
Список
Дерево обсуждения
Re: COUNT(*) and index-only scans "Kevin Grittner" <Kevin.Grittner@wicourts.gov>
Re: COUNT(*) and index-only scans jesper@krogh.cc
Re: COUNT(*) and index-only scans Jeff Janes <jeff.janes@gmail.com>
Greg Stark wrote:
> On Mon, Oct 10, 2011 at 9:17 PM, Tom Lane  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.

Actually, I think the smallest non-partial one on disk might be the best
--- that is very easy to find out.

--  Bruce Momjian          http://momjian.us EnterpriseDB                             http://enterprisedb.com
 + It's impossible for everything to be true. +

В списке pgsql-hackers по дате отправления
От: Bruce Momjian
Дата:
От: Andrew Dunstan
Дата:
FAQ