Skip site navigation (1) Skip section navigation (2)

Re: Various performance questions

From: Greg Stark <gsstark(at)mit(dot)edu>
To: Neil Conway <neilc(at)samurai(dot)com>
Cc: Greg Stark <gsstark(at)mit(dot)edu>, Dror Matalon <dror(at)zapatec(dot)com>,PostgreSQL Performance <pgsql-performance(at)postgresql(dot)org>
Subject: Re: Various performance questions
Date: 2003-10-27 17:56:44
Message-ID: 877k2qy36r.fsf@stark.dyndns.tv (view raw or flat)
Thread:
Lists: pgsql-performance
Neil Conway <neilc(at)samurai(dot)com> writes:

> On Sun, 2003-10-26 at 22:49, Greg Stark wrote:
> > What version of postgres is this?. In 7.4 (and maybe 7.3?) count() uses an
> > int8 to store its count so it's not limited to 4 billion records.
> > Unfortunately int8 is somewhat inefficient as it has to be dynamically
> > allocated repeatedly.
> 
> Uh, what? Why would an int8 need to be "dynamically allocated
> repeatedly"?

Perhaps I'm wrong, I'm extrapolating from a comment Tom Lane made that
profiling showed that the bulk of the cost in count() went to allocating
int8s. He commented that this could be optimized by having count() and sum()
bypass the regular api. I don't have the original message handy.

-- 
greg


In response to

Responses

pgsql-performance by date

Next:From: Greg StarkDate: 2003-10-27 18:01:12
Subject: Re: Very Poor Insert Performance
Previous:From: Greg StarkDate: 2003-10-27 17:53:56
Subject: Re: vacuum locking

Privacy Policy | About PostgreSQL
Copyright © 1996-2014 The PostgreSQL Global Development Group