Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us> writes:
> Greg Stark <gsstark(at)mit(dot)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.
In response to
pgsql-performance by date
|Next:||From: Luke Lonergan||Date: 2005-11-24 17:07:40|
|Subject: Re: Hardware/OS recommendations for large databases (|
|Previous:||From: Tom Lane||Date: 2005-11-24 16:25:28|
|Subject: Re: Hardware/OS recommendations for large databases ( |