Re: Improving count(*)

Поиск
Список
Период
Сортировка
От Gregory Maxwell
Тема Re: Improving count(*)
Дата
Msg-id e692861c0511211606l35e48be8le6eeba32e91ac151@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Improving count(*)  ("Jim C. Nasby" <jnasby@pervasive.com>)
Ответы Re: Improving count(*)  (Bruce Momjian <pgman@candle.pha.pa.us>)
Список pgsql-hackers
On 11/21/05, Jim C. Nasby <jnasby@pervasive.com> wrote:
> What about Greg Stark's idea of combining Simon's idea of storing
> per-heap-block xmin/xmax with using that information in an index scan?
> ISTM that's the best of everything that's been presented: it allows for
> faster index scans without adding a lot of visibility overhead to the
> index heap, and it also allows VACUUM to hit only pages that need
> vacuuming. Presumably this could also be used as the on-disk backing for
> the FSM, or it could potentially replace the FSM.

This should be a big win all around, especially now since in memory
bitmaps make it more likely that some classes of queries will be pure
index.  I still think it would be useful to have a estimated_count()
which switches to whatever method is needed to get a reasonably
accurate count quickly (stats when there are no wheres we can't
predict, sampling otherwise if the involved tables are large, and a
normal count in other cases.)


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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Practical error logging for very large COPY statements
Следующее
От: Bob Ippolito
Дата:
Сообщение: Re: PostgreSQL 8.1.0 catalog corruption