Speed issues with update

From: Lorenz Bateman <lorenz(at)ivision(dot)co(dot)uk>
To: pgsql-general(at)postgresql(dot)org
Cc: Nick Ludlam <nick(at)ivision(dot)co(dot)uk>, Alaric Snell <alaric(at)ivision(dot)co(dot)uk>
Subject: Speed issues with update
Date: 2000-11-01 13:43:40
Message-ID: Pine.GSO.4.21.0011011334470.4981-100000@avengers
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

I'm using 'PostgreSQL 7.0.2 on i386-unknown-freebsdelf4.0, compiled by
cc'.

The problem is that the following statement takes approx 3hrs on a table
with approx 136,000 records.

update table_name set state = 10 where pid is null;

pid is indexed. The result from an explain on the statement is as
follows...

Seq Scan on table_name (cost=0.00..8668.56 rows=45348 width=310)

When the query is running, disk io is minimal, but cpu is maxed.

Can anyone suggest a solution or a way of finding where pg is spending all
the cpu time?

Thanks

Loz

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Robert D. Nelson 2000-11-01 13:48:00 RE: postgres on redhat 7.0
Previous Message Poul L. Christiansen 2000-11-01 13:25:10 Re: Query caching