SQL Server Concurrency: Locking, Blocking and Row Versioning

简介:
本书适用于任何使用SQL Server的程序员,管理员甚至用户,他们希望了解SQL Server如何管理多个会话,以及导致过度阻塞的原因。它也适用于那些需要了解如何解决阻塞和死锁问题的SQL Server专业人员。
如果您已经智能地设计了SQL代码,并实现了明智的索引策略,那么在隔离测试时,您的查询很有可能会 “飞”。然而,在现实世界中,多个进程可以同时访问相同的数据,SQL Server经常不得不让一个进程等待,牺牲并发性和性能,以便所有进程都能成功,而不会破坏数据完整性。事务是并发的核心。我解释了它们的ACID属性、指示多个事务同时访问相同数据时可接受行为的事务隔离级别,以及SQL Server用于调解并发访问的乐观和悲观模型。悲观并发是SQL Server的默认值,它使用锁来避免并发问题。我解释了所有不同的锁及其兼容性。我展示了如何使用提示和绑定连接来控制锁定,以及如何解决过多的阻塞和死锁问题。乐观并发使用行版本来支持并发。我解释了行版本控制的工作原理,介绍了SQL Server的两个基于快照的隔离级别,并提供了有关更新冲突等问题的故障排除提示。您的应用程序可以有世界级的索引和查询,但他们不会帮助你,如果你不能得到你的数据,因为另一个应用程序已经锁定。这就是为什么每个DBA和开发人员都必须了解SQL Server并发,以及如何解决任何问题。希望我的书有所帮助!
英文简介:
This book is for anyone using SQL Server as a programmer, an administrator, or even a user, who wants to understand how SQL Server manages multiple sessions, and what causes excessive blocking. It is also for those SQL Server professionals who need to know how to troubleshoot and solve blocking and deadlocking problems.
If you've designed your SQL code intelligently, and implemented a sensible indexing strategy, there's a good chance your queries will "fly", when tested in isolation. In the real world, however, where multiple processes can access the same data at the same time, SQL Server often has to make one process wait, sacrificing concurrency and performance, in order that in order that all can succeed, without destroying data integrity. Transactions are at the heart of concurrency. I explain their ACID properties, the transaction isolation levels that dictate the acceptable behaviors when multiple transactions access the same data simultaneously, and SQL Server's optimistic and pessimistic models for mediating concurrent access. Pessimistic concurrency, SQL Server's default, uses locks to avoid concurrency problems. I explain all the different locks and their compatibility. I show how to control locking with hints and bound connections, and how to troubleshoot excessive blocking and deadlocking. Optimistic concurrency uses row versions to support concurrency. I explain how row versioning works, cover SQL Server's two Snapshot-based isolation levels and offer troubleshooting tips for issues such as update conflicts. Your application can have world-class indexes and queries, but they won't help you if you can't get your data, because another application has it locked. That's why every DBA and developer must understand SQL Server concurrency, and how to troubleshoot any issues. I hope my book helps!
- 书名
- SQL Server Concurrency: Locking, Blocking and Row Versioning
- 译名
- SQL Server 并发:锁定、阻止和行版本控制
- 语言
- 英语
- 年份
- 2012
- 页数
- 181页
- 大小
- 24.64 MB
- 标签
- SQL
- 下载
SQL Server Concurrency: Locking, Blocking and Row Versioning.pdf
- 密码
- 65536
最后更新:2025-04-12 23:57:35