0%


Troubleshoot slow-performing queries and make them run faster. Database administrators and SQL developers are constantly under pressure to provide more speed. This new edition has been redesigned and rewritten from scratch based on the last 15 years of learning, knowledge, and experience accumulated by the author. The book Includes expanded information on using extended events, automatic execution plan correction, and other advanced features now available in SQL Server. These modern features are covered while still providing the necessary fundamentals to better understand how statistics and indexes affect query performance.

The book gives you knowledge and tools to help you identify poorly performing queries and understand the possible causes of that poor performance. The book also provides mechanisms for resolving the issues identified, whether on-premises, in containers, or on cloud platform providers. You’ll learn about key fundamentals, such as statistics, data distribution, cardinality, and parameter sniffing. You’ll learn to analyze and design your indexes and your queries using best practices that ward off performance problems before they occur. You’ll also learn to use important modern features, such as Query Store to manage and control execution plans, the automated performance tuning feature set, and memory-optimized OLTP tables and procedures. You will be able to troubleshoot in a systematic way. Query tuning doesn’t have to be difficult. This book helps you to make it much easier.



What You Will Learn
  • Use Query Store to understand and easily change query performance
  • Recognize and eliminate bottlenecks leading to slow performance
  • Tune queries whether on-premises, in containers, or on cloud platform providers
  • Implement best practices in T-SQL to minimize performance risk
  • Design in the performance that you need through careful query and index design
  • Understand how built-in, automatic tuning can assist your performance enhancement efforts
  • Protect query performance during upgrades to the newer versions of SQL Server


Who This Book Is For

Developers and database administrators with responsibility for query performance in SQL Server environments, and anyone responsible for writing or creating T-SQL queries and in need of insight into bottlenecks (including how to identify them, understand them, and eliminate them)

Table of Contents

  1. Cover
  2. Front Matter
  3. 1. Query Performance Tuning
  4. 2. Execution Plan Generation and the Query Optimizer
  5. 3. Methods for Capturing Query Performance Metrics
  6. 4. Analyzing Query Behavior Using Execution Plans
  7. 5. Statistics, Data Distribution, and Cardinality
  8. 6. Using Query Store for Query Performance and Execution Plans
  9. 7. Execution Plan Cache Behavior
  10. 8. Query Recompilation
  11. 9. Index Architecture
  12. 10. Index Behaviors
  13. 11. Key Lookups and Solutions
  14. 12. Dealing with Index Fragmentation
  15. 13. Parameter-Sensitive Queries: Causes and Solutions
  16. 14. Query Design Analysis
  17. 15. Reduce Query Resource Use
  18. 16. Blocking and Blocked Processes
  19. 17. Causes and Solutions For Deadlocks
  20. 18. Row-by-Row Processing from Cursors and Other Causes
  21. 19. Memory-Optimized OLTP Tables and Procedures
  22. 20. Graph Databases
  23. 21. Intelligent Query Processing
  24. 22. Automated Tuning in Azure and SQL Server
  25. 23. A Query Tuning Methodology
  26. Back Matter
3.23.101.60