slow update but have an index

From: Feite Brekeveld <feite(dot)brekeveld(at)osiris-it(dot)nl>
To: "pgsql-general(at)postgresql(dot)org" <pgsql-general(at)postgresql(dot)org>
Subject: slow update but have an index
Date: 2001-08-17 11:08:29
Message-ID: 3B7CFB2D.6418E7E5@osiris-it.nl
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

Hi,

I have a table with no relations to other tables. It has a sequence
number field (integer) and a status field being a char.

There is a unique index on the seqno field.

Now this table has about 80,000 records. I need to update 74,000 status
fields. So I made a dump, and hacked the dump into SQL statements like:

update accounting set status = 'C' where seqno = 1566385;
....
and the other 74,000

This is awfully slow. How come ? The index on the seqno should give
speedy access to the record.

Thanks,

--
Feite Brekeveld
feite(dot)brekeveld(at)osiris-it(dot)nl
http://www.osiris-it.nl

Responses

Browse pgsql-general by date

  From Date Subject
Next Message Tille, Andreas 2001-08-17 11:16:12 Sparc seems very slow
Previous Message Martijn van Oosterhout 2001-08-17 10:37:44 Re: slow update but have an index