Re: Hardware/OS recommendations for large databases ( - Mailing list pgsql-performance

From Greg Stark
Subject Re: Hardware/OS recommendations for large databases (
Date
Msg-id [email protected]
Whole thread Raw
In response to Re: Hardware/OS recommendations for large databases (  (Tom Lane <[email protected]>)
List pgsql-performance
Tom Lane <[email protected]> writes:

> Greg Stark <[email protected]> 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 by date:

Previous
From: Tom Lane
Date:
Subject: Re: Hardware/OS recommendations for large databases (
Next
From: "Luke Lonergan"
Date:
Subject: Re: Hardware/OS recommendations for large databases (