About the Author |
|
xv | |
About the Technical Reviewers |
|
xvii | |
Acknowledgments |
|
xix | |
Introduction |
|
xxi | |
|
Chapter 1 How SQL Server Works |
|
|
1 | (20) |
|
|
1 | (2) |
|
|
3 | (1) |
|
|
3 | (1) |
|
|
3 | (2) |
|
|
5 | (3) |
|
|
8 | (1) |
|
|
8 | (1) |
|
|
9 | (3) |
|
|
12 | (1) |
|
|
13 | (1) |
|
|
13 | (1) |
|
|
14 | (1) |
|
|
15 | (1) |
|
|
15 | (1) |
|
|
16 | (1) |
|
|
16 | (1) |
|
|
17 | (1) |
|
|
18 | (1) |
|
|
19 | (2) |
|
Chapter 2 Analyzing Wait Statistics |
|
|
21 | (24) |
|
|
22 | (4) |
|
|
26 | (1) |
|
|
26 | (4) |
|
sys.dm_exec_session_wait_stats |
|
|
30 | (1) |
|
|
30 | (2) |
|
System_health Extended Event Session |
|
|
32 | (2) |
|
Example: Analyzing CXPACKET Waits |
|
|
34 | (3) |
|
|
37 | (2) |
|
|
39 | (1) |
|
|
39 | (1) |
|
PAGELATCH_ and PAGEIOI_ATCH_ |
|
|
39 | (1) |
|
|
39 | (1) |
|
|
39 | (1) |
|
|
39 | (1) |
|
|
40 | (1) |
|
|
40 | (1) |
|
|
40 | (1) |
|
|
40 | (1) |
|
|
40 | (2) |
|
|
42 | (1) |
|
|
43 | (1) |
|
|
43 | (2) |
|
Chapter 3 The Query Store |
|
|
45 | (26) |
|
|
45 | (1) |
|
|
45 | (2) |
|
How the Query Store Can Help |
|
|
47 | (1) |
|
|
47 | (1) |
|
|
47 | (1) |
|
Application/Hardware Changes |
|
|
47 | (1) |
|
Identify Expensive Queries |
|
|
47 | (1) |
|
Identify Ad Hoc Workloads |
|
|
48 | (1) |
|
|
48 | (2) |
|
Enabling, Purging, and Disabling the Query Store |
|
|
50 | (5) |
|
|
55 | (4) |
|
Performance Troubleshooting |
|
|
59 | (2) |
|
|
61 | (3) |
|
|
64 | (1) |
|
|
65 | (2) |
|
|
67 | (2) |
|
|
69 | (2) |
|
Chapter 4 SQL Server Configuration |
|
|
71 | (14) |
|
|
71 | (2) |
|
Standard Automatic Statistics Update |
|
|
73 | (1) |
|
Trace Flag 2371 and SQL Server 2016 |
|
|
73 | (1) |
|
|
73 | (1) |
|
Query Optimizer Hotfixes and Trace Flag 4199 |
|
|
74 | (1) |
|
Max Degree of Parallelism |
|
|
75 | (2) |
|
Cost Threshold for Parallelism |
|
|
77 | (1) |
|
Instant File Initialization |
|
|
77 | (1) |
|
|
78 | (1) |
|
Optimize for Ad Hoc Workloads |
|
|
79 | (1) |
|
|
80 | (1) |
|
|
80 | (1) |
|
|
81 | (1) |
|
Backup Compression Default |
|
|
82 | (1) |
|
Query Governor Cost Limit |
|
|
82 | (1) |
|
Blocked Process Threshold |
|
|
82 | (1) |
|
|
83 | (1) |
|
|
84 | (1) |
|
Chapter 5 Tempdb Troubleshooting and Configuration |
|
|
85 | (16) |
|
|
85 | (3) |
|
Describing tempdb Latch Contention |
|
|
88 | (1) |
|
Fixing tempdb Latch Contention |
|
|
89 | (1) |
|
Using Multiple Data Files |
|
|
89 | (1) |
|
Trace Flags 1117 and 1118 |
|
|
89 | (1) |
|
What Is New in SQL Server 2016 |
|
|
90 | (2) |
|
|
92 | (5) |
|
|
97 | (1) |
|
|
97 | (1) |
|
|
97 | (1) |
|
|
98 | (1) |
|
|
98 | (1) |
|
|
98 | (1) |
|
|
99 | (2) |
|
Chapter 6 SQL Server In-Memory Technologies |
|
|
101 | (30) |
|
|
102 | (1) |
|
What Is New in SQL Server 2016 |
|
|
103 | (1) |
|
|
103 | (3) |
|
|
106 | (2) |
|
Natively Compiled Modules |
|
|
108 | (2) |
|
Changing Tables and Natively Compiled Modules |
|
|
110 | (2) |
|
|
112 | (1) |
|
Memory-Optimized Table Variables |
|
|
113 | (1) |
|
|
114 | (1) |
|
|
114 | (2) |
|
|
116 | (5) |
|
|
121 | (2) |
|
|
123 | (3) |
|
Using Memory-Optimized Tables |
|
|
126 | (3) |
|
|
129 | (2) |
|
Chapter 7 Performance Troubleshooting |
|
|
131 | (24) |
|
|
132 | (1) |
|
Comparing Batches and Transactions |
|
|
133 | (2) |
|
|
135 | (2) |
|
|
137 | (1) |
|
|
137 | (1) |
|
|
137 | (1) |
|
|
137 | (1) |
|
|
138 | (1) |
|
|
138 | (1) |
|
|
139 | (1) |
|
|
140 | (1) |
|
|
140 | (1) |
|
LogicalDisk and PhysicalDisk |
|
|
140 | (1) |
|
SQL Compilations/Sec and Re-compilations/Sec |
|
|
140 | (1) |
|
|
141 | (1) |
|
|
141 | (1) |
|
|
141 | (1) |
|
|
141 | (1) |
|
|
142 | (1) |
|
sys.dm_os_performance_counters |
|
|
142 | (1) |
|
Dynamic Management Views and Functions |
|
|
143 | (1) |
|
sys.dm_io_virtual_file_stats |
|
|
143 | (2) |
|
|
145 | (1) |
|
sys.dm_db_index_usage_stats |
|
|
145 | (1) |
|
|
146 | (1) |
|
sys.dm_db_index_physical_stats |
|
|
146 | (2) |
|
sys.dm_exec_query_optimizer_info |
|
|
148 | (1) |
|
|
148 | (1) |
|
|
149 | (1) |
|
SQL Trace/Extended Events |
|
|
149 | (2) |
|
SQL Server Data Collector |
|
|
151 | (1) |
|
What Is New in SQL Server 2016 |
|
|
152 | (1) |
|
Operator Level Performance Statistics |
|
|
152 | (1) |
|
|
153 | (1) |
|
|
154 | (1) |
|
|
155 | (26) |
|
How SQL Server Uses Indexes |
|
|
156 | (1) |
|
|
157 | (2) |
|
|
159 | (1) |
|
|
160 | (1) |
|
|
160 | (1) |
|
|
161 | (1) |
|
|
162 | (1) |
|
|
162 | (1) |
|
|
163 | (8) |
|
The Missing Indexes Feature |
|
|
171 | (2) |
|
The Database Engine Tuning Advisor |
|
|
173 | (7) |
|
|
180 | (1) |
|
Chapter 9 SQL Server Storage |
|
|
181 | (16) |
|
|
182 | (1) |
|
|
183 | (1) |
|
|
183 | (1) |
|
|
184 | (1) |
|
|
184 | (1) |
|
|
185 | (1) |
|
|
185 | (1) |
|
|
186 | (1) |
|
|
187 | (1) |
|
|
188 | (2) |
|
|
190 | (1) |
|
|
191 | (1) |
|
|
191 | (1) |
|
|
191 | (1) |
|
|
192 | (1) |
|
|
192 | (1) |
|
|
193 | (1) |
|
|
194 | (1) |
|
|
194 | (1) |
|
|
195 | (1) |
|
|
196 | (1) |
Index |
|
197 | |