Re: why does count take so long?

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Greg Stark <gsstark(at)mit(dot)edu>
Cc: pgsql-general(at)postgresql(dot)org
Subject: Re: why does count take so long?
Date: 2003-09-08 21:47:48
Message-ID: 4269.1063057668@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Greg Stark <gsstark(at)mit(dot)edu> writes:
> Things like count(*) could use int4 until it overflows though.

I don't see a reasonable way for an aggregate to change state datatype
on the fly; otherwise this would be a great solution.

> Is int4 a pass-by-value datatype on 32-bit machines?

Yeah. Not too long ago, count() used int4, but we got some complaints
about it overflowing on big tables.

regards, tom lane

In response to

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Greg Stark 2003-09-08 21:55:43 Re: Can I use PostgreSQL to develop a self-organizing
Previous Message Ron Johnson 2003-09-08 21:40:16 Re: About GPL and proprietary software