Update taking forever

Поиск
Список
Период
Сортировка
Искать

Update taking forever

От:
"Oliver Weichhold" <oliver@weichhold.com>
Дата:
The below statement is now running for 18 hours on a table with ~8 Million Rows, no triggers no fancy stuff. The database is otherwise performing very well and the server is a development server that's currently idle except for the update statement. Any suggestions why it takes so long to update a couple million rows?

update characters set last_update = null

Note: 'last_update' is a timestamp column but the column does not seem to influence the time it takes to complete the update.

--
Oliver

Re: Update taking forever

От:
Jan Otto <asche@me.com>
Дата:
Hi Oliver,

> currently idle except for the update statement. Any suggestions why  
> it takes so long to update a couple million rows?
>
> update characters set last_update = null

Try to update only rows that not already null.

update characters set last_update = null where last_update is not null;

Jan





FAQ