why does count take so long?

From: Joseph Shraibman <jks(at)selectacast(dot)net>
To: pgsql-general(at)postgresql(dot)org
Subject: why does count take so long?
Date: 2003-09-08 01:06:26
Message-ID: 3F5BD612.4040003@selectacast.net
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

On a 7.3.4 database:

explain analyse select count(*) from elog;

Aggregate (cost=223764.05..223764.05 rows=1 width=0) (actual
time=81372.11..81372.11 rows=1 loops=1)
-> Seq Scan on elog (cost=0.00..203012.24 rows=8300724 width=0)
(actual time=3.91..71542.53 rows=8313762 loops=1)
Total runtime: 81378.42 msec
(3 rows)

It looks like the aggregate took 10 secs all by itself. What's taking
so long?

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Ron Dyck 2003-09-08 01:10:53 How do I unsubscribe
Previous Message Tom Lane 2003-09-08 00:57:04 Re: Unixware 713 probs