When it comes to updating all rows in a table, does the method of locking matter for performance?
Posted
by Evan Carroll
on Stack Overflow
See other posts from Stack Overflow
or by Evan Carroll
Published on 2010-06-06T16:41:48Z
Indexed on
2010/06/06
16:52 UTC
Read the original article
Hit count: 267
Question is a follow up to this.
The SQL in question was
UPDATE stats SET visits = (visits+1)
And the question is, for the purpose of performance, does it matter if you lock all rows in stats
in comparison to locking the table stats
? Or, if the database uses a page-lock rather than a table/row lock?
© Stack Overflow or respective owner