Re: select count(*) on large tables

From: Tom Lane <tgl(at)sss(dot)pgh(dot)pa(dot)us>
To: Cosimo Streppone <cosimo(at)streppone(dot)it>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: select count(*) on large tables
Date: 2004-04-08 14:09:07
Message-ID: 13441.1081433347@sss.pgh.pa.us
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

Cosimo Streppone <cosimo(at)streppone(dot)it> writes:
> Is there an estimate time for this issue to be resolved?

Approximately never. It's a fundamental feature of Postgres' design.

As noted by Dennis, you can look at the pg_class statistics if a recent
estimate is good enough, or you can build user-level tracking tools if
you'd rather have fast count(*) than concurrent update capability. But
don't sit around waiting for the developers to "fix this bug", because
it isn't a bug and it isn't going to be fixed.

regards, tom lane

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message Bruce Momjian 2004-04-08 14:52:33 Re: data=writeback
Previous Message list 2004-04-08 13:01:06 Re: data=writeback