Muutke küpsiste eelistusi

Expert SQL Server Transactions and Locking: Concurrency Internals for SQL Server Practitioners 1st ed. [Pehme köide]

  • Formaat: Paperback / softback, 320 pages, kõrgus x laius: 254x178 mm, kaal: 647 g, 144 Illustrations, black and white, 1 Paperback / softback
  • Ilmumisaeg: 09-Oct-2018
  • Kirjastus: APress
  • ISBN-10: 1484239563
  • ISBN-13: 9781484239568
Teised raamatud teemal:
  • Pehme köide
  • Hind: 51,29 €*
  • * hind on lõplik, st. muud allahindlused enam ei rakendu
  • Tavahind: 68,39 €
  • Säästad 25%
  • Raamatu kohalejõudmiseks kirjastusest kulub orienteeruvalt 3-4 nädalat
  • Kogus:
  • Lisa ostukorvi
  • Tasuta tarne
  • Tellimisaeg 2-4 nädalat
  • Lisa soovinimekirja
  • Formaat: Paperback / softback, 320 pages, kõrgus x laius: 254x178 mm, kaal: 647 g, 144 Illustrations, black and white, 1 Paperback / softback
  • Ilmumisaeg: 09-Oct-2018
  • Kirjastus: APress
  • ISBN-10: 1484239563
  • ISBN-13: 9781484239568
Teised raamatud teemal:
Master SQL Server’s Concurrency Model so you can implement high-throughput systems that deliver transactional consistency to your application customers. This book explains how to troubleshoot and address blocking problems and deadlocks, and write code and design database schemas to minimize concurrency issues in the systems you develop.

SQL Server’s Concurrency Model is one of the least understood parts of the SQL Server Database Engine. Almost every SQL Server system experiences hard-to-explain concurrency and blocking issues, and it can be extremely confusing to solve those issues without a base of knowledge in the internals of the Engine. While confusing from the outside, the SQL Server Concurrency Model is based on several well-defined principles that are covered in this book.

Understanding the internals surrounding SQL Server’s Concurrency Model helps you build high-throughput systems in multi-user environments. This book guides you through the Concurrency Model and elaborates how SQL Server supports transactional consistency in the databases. The book covers all versions of SQL Server, including Microsoft Azure SQL Database, and it includes coverage of new technologies such as In-Memory OLTP and Columnstore Indexes.


What You'll Learn
  • Know how transaction isolation levels affect locking behavior and concurrency
  • Troubleshoot and address blocking issues and deadlocks
  • Provide required data consistency while minimizing concurrency issues
  • Design efficient transaction strategies that lead to scalable code
  • Reduce concurrency problems through good schema design
  • Understand concurrency models for In-Memory OLTP and Columnstore Indexes
  • Reduce blocking during index maintenance, batch data load, and similar tasks

Who This Book Is For

SQL Server developers, database administrators, and application architects who are developing highly-concurrent applications. The book is for anyone interested in the technical aspects of creating and troubleshooting high-throughput systems that respond swiftly to user requests.



Tagline: Building high-throughput systems with transactional consistency
About the Author xi
About the Technical Reviewer xiii
Acknowledgments xv
Introduction xvii
Chapter 1 Data Storage and Access Methods
1(24)
Anatomy of a Table
2(6)
Heap Tables
8(3)
Clustered Indexes and B-Trees
11(6)
Composite Indexes
17(1)
Nonclustered Indexes
18(4)
Indexes with Included Columns
22(2)
Summary
24(1)
Chapter 2 Transaction Management and Concurrency Models
25(22)
Transactions
25(2)
Pessimistic and Optimistic Concurrency
27(1)
Transaction Isolation Levels
28(1)
Working with Transactions
29(17)
Transaction Types
29(5)
Error Handling
34(7)
Nested Transactions and Savepoints
41(5)
Summary
46(1)
Chapter 3 Lock Types
47(26)
Major Lock Types
47(10)
Exclusive (X) Locks
50(1)
Intent (I*) Locks
51(2)
Update (U) locks
53(2)
Shared (S) locks
55(2)
Lock Compatibility, Behavior, and Lifetime
57(7)
Transaction Isolation Levels and Data Consistency
64(2)
Locking-Related Table Hints
66(3)
Conversion Locks
69(3)
Summary
72(1)
Chapter 4 Blocking in the System
73(36)
General Troubleshooting Approach
73(1)
Troubleshooting Blocking Issues in Real Time
74(8)
Collecting Blocking Information for Further Analysis
82(6)
Blocking Monitoring with Event Notifications
88(19)
Summary
107(2)
Chapter 5 Deadlocks
109(28)
Classic Deadlock
109(2)
Deadlock Due to Non-Optimized Queries
111(3)
Key Lookup Deadlock
114(1)
Deadlock Due to Multiple Updates of the Same Row
115(7)
Deadlock Troubleshooting
122(7)
Deadlock Due to IGNORE_DUP_KEY Index Option
129(5)
Reducing the Chance of Deadlocks
134(2)
Summary
136(1)
Chapter 6 Optimistic Isolation Levels
137(22)
Row Versioning Overview
137(1)
Optimistic Transaction Isolation Levels
138(9)
Read Committed Snapshot Isolation Level
139(1)
Snapshot Isolation Level
140(7)
Version Store Behavior and Monitoring
147(6)
Row Versioning and Index Fragmentation
153(3)
Summary
156(3)
Chapter 7 Lock Escalation
159(16)
Lock Escalation Overview
159(6)
Lock Escalation Troubleshooting
165(8)
Summary
173(2)
Chapter 8 Schema and Low-Priority Locks
175(16)
Schema Locks
175(4)
Lock Queues and Lock Compatibility
179(7)
Low-Priority Locks
186(2)
Summary
188(3)
Chapter 9 Lock Partitioning
191(12)
Lock Partitioning Overview
191(4)
Deadlocks Due to Lock Partitioning
195(6)
Summary
201(2)
Chapter 10 Application Locks
203(10)
Application Locks Overview
203(1)
Application Lock Usage
204(7)
Summary
211(2)
Chapter 11 Designing Transaction Strategies
213(12)
Transaction Strategy Design Considerations
213(4)
Choosing Transaction Isolation Level
217(1)
Patterns That Reduce Blocking
218(5)
Summary
223(2)
Chapter 12 Troubleshooting Concurrency Issues
225(44)
SQL Server Execution Model
225(9)
Lock Waits
234(9)
LCK_M_U Wait Type
235(4)
LCK_M_S Wait Type
239(1)
LCK_M_X Wait Type
239(1)
LCK_M_SCH_S and LCK_M_SCH_M Wait Types
240(1)
Intent LCK_M_I* Wait Types
241(1)
Locking Waits: Summary
242(1)
Data Management Views
243(9)
sys.db_exec_requests View
243(2)
sys.db_os_waiting_tasks View
245(1)
sys.db_exec_session_wait_stats view and wait_info xEvent
245(1)
sys.db_db_index_operational_stats and sys.dm_db_index_usage_stats Views
246(6)
Blocking Chains
252(3)
AlwaysOn Availability Groups and Blocking
255(8)
Synchronous Commit Latency
256(4)
Readable Secondaries and Row Versioning
260(3)
Working with the Blocking Monitoring Framework
263(4)
Summary
267(2)
Chapter 13 In-Memory OLTP Concurrency Model
269(26)
In-Memory OLTP Overview
269(3)
Multi-Version Concurrency Control
272(2)
Transaction Isolation Levels in In-Memory OLTP
274(8)
Cross-Container Transactions
282(2)
Transaction Lifetime
284(7)
Referential Integrity Enforcement
291(2)
Additional Resources
293(1)
Summary
293(2)
Chapter 14 Locking in Columnstore Indexes
295(18)
Column-Based Storage Overview
295(2)
Columnstore Index Internals Overview
297(3)
Locking Behavior in Columnstore Indexes
300(11)
Inserting Data into Clustered Columnstore Index
302(1)
Updating and Deleting Data from Clustered Columnstore Indexes
303(4)
Nonclustered Columnstore Indexes
307(2)
Tuple Mover and Alter Index Reorganize Locking
309(1)
Wrapping Up
310(1)
Summary
311(2)
Index 313
Dmitri Korotkevitch is a Microsoft Data Platform MVP and Microsoft Certified Master (SQL Server 2008) with many years of IT experience, including years of experience working with Microsoft SQL Server as Application and Database Developer, Database Administrator, and Database Architect. He specializes in the design, development, and performance tuning of complex OLTP systems that handle thousands of transactions per second around the clock. Currently, he works as Director of Database Services at Chewy.com and he provides SQL Server consulting services and training to clients around the world. Dmitri regularly speaks at various Microsoft and SQL PASS events.