Re: count(*) slow on large tables - Mailing list pgsql-performance

From Rod Taylor
Subject Re: count(*) slow on large tables
Date
Msg-id 1065381109.23288.196.camel@jester
Whole thread Raw
In response to Re: count(*) slow on large tables  (Josh Berkus <josh@agliodbs.com>)
List pgsql-performance
> And for those GUIs, wouldn't it be 97% as good to run an ANALYZE and give the
> approximate record counts for large tables?

Interfaces which run a COUNT(*) like that are broken by design. They
fail to consider the table may really be a view which of course could
not be cached with results like that and may take days to load a full
result set (we had some pretty large views in an old billing system).

Attachment

pgsql-performance by date:

Previous
From: Josh Berkus
Date:
Subject: Re: count(*) slow on large tables
Next
From: Christopher Browne
Date:
Subject: Re: reindex/vacuum locking/performance?