I have a table with 23.5 million rows and 20 columns. I updated the table to set one of the columns to null. This query took an hour to complete. Granted, I don’t have an amazingly fast database server, but is this update time normal? I didn’t have an index on this table when I ran the update. How much would that have helped?
Thanks in advance!
Considering it updated ALL rows, an index wouldn’t have helped any.
Were there reads going on at the same time? Updates cause row level locking, even if brief, could cause a lot of traffic and waiting in the transaction log.