Re: Hardware/OS recommendations for large databases (

Поиск
Список
Период
Сортировка
От Greg Stark
Тема Re: Hardware/OS recommendations for large databases (
Дата
Msg-id 877jayknii.fsf@stark.xeocode.com
обсуждение исходный текст
Ответ на Re: Hardware/OS recommendations for large databases (  (Tom Lane <tgl@sss.pgh.pa.us>)
Список pgsql-performance
Tom Lane <tgl@sss.pgh.pa.us> writes:

> Greg Stark <gsstark@mit.edu> writes:
> > Last I heard the reason count(*) was so expensive was because its state
> > variable was a bigint. That means it doesn't fit in a Datum and has to be
> > alloced and stored as a pointer. And because of the Aggregate API that means
> > it has to be allocated and freed for every tuple processed.
>
> There's a hack in 8.1 to avoid the palloc overhead (courtesy of Neil
> Conway IIRC).

ah, cool, missed that.

--
greg

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

Предыдущее
От: Tom Lane
Дата:
Сообщение: Re: Hardware/OS recommendations for large databases (
Следующее
От: "Luke Lonergan"
Дата:
Сообщение: Re: Hardware/OS recommendations for large databases (