Slow update SQL - Mailing list pgsql-sql

From Ken Hill
Subject Slow update SQL
Date
Msg-id 1139881725.3183.2.camel@localhost.localdomain
Whole thread Raw
Responses Re: Slow update SQL  (Michael Fuhr <mike@fuhr.org>)
List pgsql-sql
I'm experiencing a very slow query. The table contains 611,564 rows of data. I vaccumed the table:<br /><br /> VACUUM
ANALYZEncccr10;<br /><br /> SELECT count(*) FROM ncccr10;<br /> count<br /> --------<br /> 611564<br /> (1 row)<br
/><br/> When I try to analyze the query plan with:<br /><br /> EXPLAIN ANALYZE<br /> UPDATE ncccr10<br /> SET key =
facilityno||'-'||<br/> lastname||'-'||<br /> sex||'-'||<br /> ssno||'-'||<br /> birthdate||'-'||<br />
primarysit||'-'||<br/> dxdate||'-'||<br /> morphology3<br /> WHERE date_part('year',dxdate) > '2000';<br /><br />
Thequery just never finishes (even 1 hour later). The colum key100 is indexed, and I'm setting the value of this<br />
columnfrom other columns. Why is this so slow? <br /><br /> 

pgsql-sql by date:

Previous
From: Mark Fenbers
Date:
Subject: group by complications
Next
From: Michael Fuhr
Date:
Subject: Re: Slow update SQL