Book description
Queries not running fast enough? Wondering about the in-memory database features in 2014? Tired of phone calls from frustrated users? Grant Fritchey's book SQL Server Query Performance Tuning is the answer to your SQL Server query performance problems. The book is revised to cover the very latest in performance optimization features and techniques, especially including the newly-added, in-memory database features formerly known under the code name Project Hekaton. This book provides the tools you need to approach your queries with performance in mind.
SQL Server Query Performance Tuning leads you through understanding the causes of poor performance, how to identify them, and how to fix them. You’ll learn to be proactive in establishing performance baselines using tools like Performance Monitor and Extended Events. You’ll learn to recognize bottlenecks and defuse them before the phone rings. You’ll learn some quick solutions too, but emphasis is on designing for performance and getting it right, and upon heading off trouble before it occurs. Delight your users. Silence that ringing phone. Put the principles and lessons from SQL Server Query Performance Tuning into practice today.
Guides in troubleshooting and eliminating of bottlenecks that frustrate users
Table of contents
- Cover
- Title
- Copyright
- Contents at a Glance
- Contents
- About the Author
- About the Technical Reviewer
- Acknowledgments
- Introduction
-
Chapter 1: SQL Query Performance Tuning
- The Performance Tuning Process
- Performance vs. Price
- Performance Baseline
- Where to Focus Efforts
-
SQL Server Performance Killers
- Insufficient Indexing
- Inaccurate Statistics
- Improper Query Design
- Poorly Generated Execution Plans
- Excessive Blocking and Deadlocks
- Non-Set-Based Operations
- Inappropriate Database Design
- Excessive Fragmentation
- Nonreusable Execution Plans
- Frequent Recompilation of Queries
- Improper Use of Cursors
- Improper Configuration of the Database Transaction Log
- Excessive Use or Improper Configuration of tempdb
- Summary
- Chapter 2: Memory Performance Analysis
- Chapter 3: Disk Performance Analysis
- Chapter 4: CPU Performance Analysis
- Chapter 5: Creating a Baseline
- Chapter 6: Query Performance Metrics
- Chapter 7: Analyzing Query Performance
- Chapter 8: Index Architecture and Behavior
- Chapter 9: Index Analysis
- Chapter 10: Database Engine Tuning Advisor
- Chapter 11: Key Lookups and Solutions
- Chapter 12: Statistics, Data Distribution, and Cardinality
- Chapter 13: Index Fragmentation
- Chapter 14: Execution Plan Generation
-
Chapter 15: Execution Plan Cache Behavior
- Analyzing the Execution Plan Cache
- Execution Plan Reuse
- Ad Hoc Workload
- Query Plan Hash and Query Hash
-
Execution Plan Cache Recommendations
- Explicitly Parameterize Variable Parts of a Query
- Create Stored Procedures to Implement Business Functionality
- Code with sp_executesql to Avoid Stored Procedure Maintenance
- Implement the Prepare/Execute Model to Avoid Resending a Query String
- Avoid Ad Hoc Queries
- Prefer sp_executesql Over EXECUTE for Dynamic Queries
- Parameterize Variable Parts of Queries with Care
- Do Not Allow Implicit Resolution of Objects in Queries
- Summary
- Chapter 16: Parameter Sniffing
- Chapter 17: Query Recompilation
- Chapter 18: Query Design Analysis
- Chapter 19: Reduce Query Resource Use
-
Chapter 20: Blocking and Blocked Processes
- Blocking Fundamentals
- Understanding Blocking
- Locks
- Lock Operations and Modes
- Isolation Levels
- Effect of Indexes on Locking
- Capturing Blocking Information
- Blocking Resolutions
- Partition the Contended Data
- Recommendations to Reduce Blocking
- Automation to Detect and Collect Blocking Information
- Summary
- Chapter 21: Causes and Solutions for Deadlocks
- Chapter 22: Row-by-Row Processing
- Chapter 23: Memory-Optimized OLTP Tables and Procedures
- Chapter 24: Database Performance Testing
-
Chapter 25: Database Workload Optimization
- Workload Optimization Fundamentals
- Capturing the Workload
- Analyzing the Workload
- Identifying the Costliest Query
-
Analyzing and Optimizing External Factors
- Analyzing the Connection Options Used by the Application
- Analyzing the Effectiveness of Statistics
- Analyzing the Need for Defragmentation
- Analyzing the Internal Behavior of the Costliest Query
- Analyzing the Query Execution Plan
- Identifying the Costly Steps in the Execution Plan
- Analyzing the Processing Strategy
- Optimizing the Costliest Query
- Modifying the Code
- Fixing the Key Lookup Operation
- Tuning the Second Query
- Creating a Wrapper Procedure
- Analyzing the Effect on Database Workload
- Iterating Through Optimization Phases
- Summary
-
Chapter 26: SQL Server Optimization Checklist
-
Database Design
- Balancing Under- and Overnormalization
- Benefiting from Entity-Integrity Constraints
- Benefiting from Domain and Referential Integrity Constraints
- Adopting Index-Design Best Practices
- Avoiding the Use of the sp_ Prefix for Stored Procedure Names
- Minimizing the Use of Triggers
- Consider Putting Tables into In-Memory Storage
- Configuration Settings
- Database Administration
- Database Backup
-
Query Design
- Use the Command SET NOCOUNT ON
- Explicitly Define the Owner of an Object
- Avoid Nonsargable Search Conditions
- Avoid Arithmetic Expressions on the WHERE Clause Column
- Avoid Optimizer Hints
- Stay Away from Nesting Views
- Ensure No Implicit Data Type Conversions
- Minimize Logging Overhead
- Adopt Best Practices for Reusing Execution Plans
- Adopt Best Practices for Database Transactions
- Eliminate or Reduce the Overhead of Database Cursors
- Natively Compile Stored Procedures
- Summary
-
Database Design
- Index
Product information
- Title: SQL Server Query Performance Tuning,Fourth Edition
- Author(s):
- Release date: September 2014
- Publisher(s): Apress
- ISBN: 9781430267423
You might also like
book
SQL Performance Tuning
is a handbook of practical solutions for busy database professionals charged with managing an organization's critically …
book
SQL Server 2017 Query Performance Tuning: Troubleshoot and Optimize Query Performance
Identify and fix causes of poor performance. You will learn Query Store, adaptive execution plans, and …
book
SQL Server Query Tuning and Optimization
Get well-versed with ready-to-use techniques for creating high-performance queries and applications Key Features Speed up queries …
book
Learn T-SQL Querying
Troubleshoot query performance issues, identify anti-patterns in code, and write efficient T-SQL queries Key Features Discover …