更新时间:2021-06-24 14:39:01
coverpage
Title Page
Copyright and Credits
Learn T-SQL Querying
About Packt
Why subscribe?
Packt.com
Foreword
Contributors
About the authors
About the reviewers
Packt is searching for authors like you
Preface
Who this book is for
What this book covers
To get the most out of this book
Download the example code files
Download the color images
Conventions used
Get in touch
Reviews
Section 1: Query Processing Fundamentals
Anatomy of a Query
Building blocks of a T-SQL statement
SELECT
DISTINCT
TOP
FROM
INNER JOIN
OUTER JOIN
CROSS JOIN
APPLY
WHERE
ORDER BY
GROUP BY
HAVING
Logical statement processing flow
Summary
Understanding Query Processing
Query compilation essentials
Query optimization essentials
Query execution essentials
Plan caching and reuse
Stored procedures
Ad hoc plan caching
Parameterization
Simple parameterization
Forced parameterization
The sp_executesql procedure
Prepared statements
How query processing impacts plan reuse
The importance of parameters
Security
Performance
Parameter sniffing
To cache or not to cache
Mechanics of the Query Optimizer
Introducing the Cardinality Estimator
Understanding the query optimization workflow
The Trivial Plan stage
The Exploration stage
Transaction Processing
Quick plan
Full optimization
Knobs for query optimization
Section 2: Dos and Donts of T-SQL
Exploring Query Execution Plans
Accessing a query plan
Navigating a query plan
Query plan operators of interest
Blocking versus non-blocking operators
Data-access operators
Table Scan
Clustered Index Scan
NonClustered Index Scan
NonClustered Index Seek
Clustered Index Seek
Lookups
RID Lookups
Key Lookups
Columnstore Index Scan
Joins
Nested Loops joins
Merge Joins
Hash Match joins
Adaptive Joins
Spools
Sorts and aggregation
Sorts
Stream aggregation
Hash aggregation
Query plan properties of interest
Plan-level properties
Cardinality estimation model version
Degree of Parallelism*
Memory Grant*
MemoryGrantInfo
Optimization Level