pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Greg Stark <gsstark@mit.edu>
To: Tom Lane <tgl@sss.pgh.pa.us>
Cc: Greg Stark <gsstark@mit.edu>
Cc: Mark Kirkwood <markir@paradise.net.nz>
Cc: Luke Lonergan <llonergan@greenplum.com>
Cc: stange@rentec.com, Dave Cramer <pg@fastcrypt.com>
Cc: Joshua Marsh <icub3d@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Hardware/OS recommendations for large databases (
Date: 24 Nov 2005 11:40:21 -0500
Message-ID: <877jayknii.fsf@stark.xeocode.com> (raw)
In-Reply-To: <14286.1132849528@sss.pgh.pa.us>
References: <BFAAB702.1460D%llonergan@greenplum.com>
	<438583C8.4050809@paradise.net.nz>
	<87d5kqkpd2.fsf@stark.xeocode.com>
	<14286.1132849528@sss.pgh.pa.us>

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




view thread (173+ messages)  latest in thread

Message-ID: <877jayknii.fsf@stark.xeocode.com>
Permalink:  ../877jayknii.fsf@stark.xeocode.com/
Also on:    postgresql.org/message-id/877jayknii.fsf@stark.xeocode.com

 · 

reply

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Reply to all the recipients using the --to and --cc options:
  reply via email

  To: pgsql-performance@postgresql.org
  Cc: gsstark@mit.edu, tgl@sss.pgh.pa.us, markir@paradise.net.nz, llonergan@greenplum.com, pg@fastcrypt.com, icub3d@gmail.com
  Subject: Re: Hardware/OS recommendations for large databases (
  In-Reply-To: <877jayknii.fsf@stark.xeocode.com>

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox