Re: more problems with count(*) on large table - Mailing list pgsql-general

From Gregory Stark
Subject Re: more problems with count(*) on large table
Date
Msg-id 87bqbi91du.fsf@oxford.xeocode.com
Whole thread Raw
In response to Re: more problems with count(*) on large table  (Mike Charnoky <noky@nextbus.com>)
List pgsql-general
"Mike Charnoky" <noky@nextbus.com> writes:

> Here is the output from EXPLAIN ANALYZE.  This is the same query run
> back to back, first time takes 42 minutes, second time takes less than 2
> minutes!

That doesn't really sound strange at all. It sounds like you have a very slow
disk and very large amount of memory. 40 minutes to scan 11.4M records sounds
kind of high to me though.

How wide are these records anyways? That is, what is the table definition for
this table? If this is a single consumer drive 42 minutes sounds about right
for 2k wide records being randomly accessed.

--
  Gregory Stark
  EnterpriseDB          http://www.enterprisedb.com

pgsql-general by date:

Previous
From: Alan Hodgson
Date:
Subject: Re: Upgrading PG
Next
From: "Joshua D. Drake"
Date:
Subject: Re: Upgrading PG