Update taking forever

Started by Oliver Weichholdover 17 years ago2 messagesgeneral
Jump to latest
#1Oliver 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

#2Jan Otto
asche@me.com
In reply to: Oliver Weichhold (#1)
Re: Update taking forever

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