Slow update SQL

Поиск
Список
Период
Сортировка
От Ken Hill
Тема Slow update SQL
Дата
Msg-id 1139881725.3183.2.camel@localhost.localdomain
обсуждение исходный текст
Ответы Re: Slow update SQL
Список 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 по дате отправления:

Предыдущее
От: Mark Fenbers
Дата:
Сообщение: group by complications
Следующее
От: Michael Fuhr
Дата:
Сообщение: Re: Slow update SQL