﻿{"id":302,"date":"2014-10-24T17:45:21","date_gmt":"2014-10-24T16:45:21","guid":{"rendered":"http:\/\/www.codereview.co\/?p=302"},"modified":"2014-10-23T09:34:55","modified_gmt":"2014-10-23T08:34:55","slug":"sql-server-interview-question-9-what-is-new-in-lock-escalation-in-sql-server-2008","status":"publish","type":"post","link":"http:\/\/www.codereview.co\/index.php\/sql-server-tutorials\/sql-server-interview-question-9-what-is-new-in-lock-escalation-in-sql-server-2008\/","title":{"rendered":"Sql Interview Question #9 : What is new in lock escalation in SQL Server 2008?"},"content":{"rendered":"<p><strong><span style=\"color: #000000;\">Sql Server Interview Question #9 <\/span><\/strong><\/p>\n<p><span style=\"color: #000000;\">What is new in lock escalation in SQL Server 2008?<\/span><!--more--><\/p>\n<p><span style=\"color: #000000;\"><strong>Solution<\/strong><\/span><\/p>\n<p><span style=\"color: #000000;\">Lock escalation is one of the lesser known phenomena inside SQL Server. Often times locking 1 row in a table cost less than locking the entire table. If you are updating thousands of records at once then SQL might find that is less costly to lock the table once rather than locking thousands of individual rows.<\/span><\/p>\n<p><span style=\"color: #000000;\">SQL Server uses this to minimize the overhead of locking too many structures by escalating the locks from just row locks to page locks to table locks. There is now a lock escalation option in the alter table of SQL Server 2008 which allows the disabling of lock escalation on that table.<\/span><\/p>\n<p>&nbsp;<\/p>\n<p><span style=\"color: #000000;\"><strong>Thanks for reading this article,<\/strong><\/span><\/p>\n<p><span style=\"color: #000000;\"><strong>Next steps :<\/strong><\/span><\/p>\n<ol>\n<li><span style=\"color: #000000;\"><strong>Share this with your colleagues because Sharing is Learning<\/strong><\/span><\/li>\n<li><span style=\"color: #000000;\"><strong>Comment below if you need any assistance<\/strong><\/span><\/li>\n<\/ol>\n","protected":false},"excerpt":{"rendered":"<p>Sql Server Interview Question #9 What is new in lock escalation in SQL Server 2008?<\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[65,172,3],"tags":[94,93,180,95,13,12,92],"_links":{"self":[{"href":"http:\/\/www.codereview.co\/index.php\/wp-json\/wp\/v2\/posts\/302"}],"collection":[{"href":"http:\/\/www.codereview.co\/index.php\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.codereview.co\/index.php\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.codereview.co\/index.php\/wp-json\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/www.codereview.co\/index.php\/wp-json\/wp\/v2\/comments?post=302"}],"version-history":[{"count":4,"href":"http:\/\/www.codereview.co\/index.php\/wp-json\/wp\/v2\/posts\/302\/revisions"}],"predecessor-version":[{"id":393,"href":"http:\/\/www.codereview.co\/index.php\/wp-json\/wp\/v2\/posts\/302\/revisions\/393"}],"wp:attachment":[{"href":"http:\/\/www.codereview.co\/index.php\/wp-json\/wp\/v2\/media?parent=302"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.codereview.co\/index.php\/wp-json\/wp\/v2\/categories?post=302"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.codereview.co\/index.php\/wp-json\/wp\/v2\/tags?post=302"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}