Re: VERY SLOW UPDATES - Mailing list pgsql-general

From Alfred Perlstein
Subject Re: VERY SLOW UPDATES
Date
Msg-id 20000818091714.P4854@fw.wintelcom.net
Whole thread Raw
In response to VERY SLOW UPDATES  ("Grembowicz, Kenneth" <GrembowiczK@NAVO.NAVY.MIL>)
List pgsql-general
* Grembowicz, Kenneth <GrembowiczK@NAVO.NAVY.MIL> [000818 09:08] wrote:
> This is my situation...
> My table has about 1.6 million records.
> I am trying to use the update command to insert new data.
> However, it is extremely slow--about 2 to 4 seconds per update.
> You can see my problem is I am trying to update 40,000 records.
> Any insight or suggestion would be appreciated.
> -Ken
>
> PS I am currently wrapping my updates in a transaction block and indexes
> have been dropped.

I think that dropping indexes might be a bad idea particularly
since the update must search for the row to be updated and probably
is forced to do a sequential scan.  I would put the index on the
row of your UPDATE's where clause.

-Alfred

pgsql-general by date:

Previous
From: David Shrewsbury
Date:
Subject: vacuum messages
Next
From: "Carl Alexander"
Date:
Subject: New user question -- alternate programmer interfaces?