SELECT count(*) Generating Lots of Write Activity

From: "Logan Bowers" <logan(at)zillow(dot)com>
To: <pgsql-general(at)postgresql(dot)org>
Subject: SELECT count(*) Generating Lots of Write Activity
Date: 2005-08-02 01:43:23
Message-ID: 85CE4E3FD2EC2C4E8AAE39916AC1A383069E34D3@ms07.mse2.exchange.ms
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hello,

I'm potentially having a strange performance problem. I have a BIG
table: ~100M, ~1KB rows. I do a SELECT count(*) from it (I know it will
be slow) and as I watch procinfo on my DB server I see a huge amount of
write activity. Thus,

1) Why does this statement generate any writes at all?

2) Is it possible to tweak something to make it avoid doing so?

3) Are my tools lying to me (i.e. procinfo is wrong)?

Thanks!

Oh, and our server configuration is:

Postgres 8.0.1, Linux 2.6, AMD64, 4GB RAM, and 3TB of storage (two RAID5
volumes striped together)

Logan Bowers

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tom Lane 2005-08-02 01:54:22 Re: feeding big script to psql
Previous Message hisatomo 2005-08-02 01:28:19 could not bind IPv6 socket