| Foreword |
|
xxvii | (2) |
| Introduction |
|
xxix | |
| About This Book |
|
xxix | (1) |
| Why the New Edition? |
|
xxix | (1) |
| How to Use This Book |
|
xxix | (3) |
Essential Chapters |
|
xxx | (1) |
| Road Map |
|
xxx | (1) |
| Section A (Chapters 1-5): Basics of Performance Tuning: Essential Tools |
|
xxx | (1) |
| Section B (Chapters 6-12): Tuning the Performance of Queries |
|
xxxi | (1) |
| Section C (Chapters 13-9): Server and System Tuning |
|
xxxi | (1) |
| SQL Server Release Levels |
|
xxxii | (1) |
| Focus on SQL Server 11.0 |
|
xxxii | (1) |
| Notes for Users of SQL Server 10.0.X and Earlier |
|
xxxii | (1) |
| Related Documents |
|
xxxiii | (1) |
| Example Database |
|
xxxiv | (2) |
| Diagram of the Pubs2 Database |
|
xxxv | (1) |
| If You Need Help |
|
xxxvi | (1) |
| Acknowledgments |
|
xxxvi | (1) |
| About the Author |
|
xxxvii | |
| Section A: Basics of Performance Tuning: Essential Tools |
|
3 | (112) |
|
Chapter 1. Performance Analysis |
|
|
3 | (10) |
|
What Is "Good Performance"? |
|
|
3 | (1) |
|
Designing for Performance |
|
|
3 | (1) |
|
|
|
4 | (5) |
|
|
|
4 | (5) |
|
|
|
5 | (1) |
|
|
|
6 | (1) |
|
|
|
6 | (1) |
|
|
|
7 | (1) |
|
|
|
7 | (1) |
|
|
|
8 | (1) |
|
|
|
8 | (1) |
|
|
|
9 | (1) |
|
Steps in Performance Analysis |
|
|
9 | (4) |
|
Using sp-sysmon to Monitor Performance |
|
|
11 | (2) |
|
Chapter 2. Database Design and Denormalizing for Performance |
|
|
13 | (20) |
|
How Design Is Related to Performance |
|
|
13 | (2) |
|
|
|
13 | (1) |
|
Physical Database Design for SQL Server |
|
|
14 | (1) |
|
|
|
15 | (5) |
|
|
|
16 | (1) |
|
Benefits of Normalization |
|
|
16 | (1) |
|
|
|
17 | (1) |
|
|
|
18 | (1) |
|
|
|
19 | (1) |
|
Denormalizing for Performance |
|
|
20 | (11) |
|
|
|
21 | (2) |
|
Disadvantages of Denormalization |
|
|
22 | (1) |
|
Performance Advantages of Denormalization |
|
|
22 | (1) |
|
Denormalization Decision Tree |
|
|
23 | (1) |
|
Denormalization Techniques |
|
|
23 | (4) |
|
|
|
23 | (1) |
|
|
|
24 | (1) |
|
|
|
25 | (1) |
|
|
|
26 | (1) |
|
|
|
27 | (2) |
|
|
|
27 | (1) |
|
|
|
28 | (1) |
|
Managing Denormalized Data |
|
|
29 | (1) |
|
Using Triggers to Manage Denormalized Data |
|
|
30 | (1) |
|
Using Application Logic to Manage Denormalized Data |
|
|
30 | (1) |
|
|
|
30 | (1) |
|
Next Steps: Understanding Data Storage and Indexing |
|
|
31 | (2) |
|
|
|
33 | (24) |
|
Performance and Object Storage |
|
|
33 | (1) |
|
Performance Tuning Goal: Reducing Disk Reads |
|
|
33 | (1) |
|
Query Processing and Page Reads |
|
|
34 | (1) |
|
|
|
35 | (4) |
|
Row Density on Data Pages |
|
|
36 | (1) |
|
|
|
36 | (1) |
|
|
|
37 | (1) |
|
|
|
38 | (1) |
|
|
|
39 | (3) |
|
Global Allocation Map (GAM) Pages |
|
|
39 | (1) |
|
|
|
40 | (1) |
|
Object Allocation Map (OAM) Pages |
|
|
40 | (1) |
|
|
|
40 | (1) |
|
Relationships Between Objects, OAM Pages, and Allocation Pages |
|
|
41 | (1) |
|
The sysindexes Table and Data Access |
|
|
42 | (1) |
|
Heaps of Data: Tables Without Clustered Indexes |
|
|
43 | (4) |
|
Select Operations on Heaps |
|
|
43 | (1) |
|
Inserting Data into a Heap |
|
|
44 | (2) |
|
Deleting Data from a Heap |
|
|
46 | (1) |
|
Update Operations on Heaps |
|
|
46 | (1) |
|
How SQL Server Performs I/O for Heap Operations |
|
|
47 | (1) |
|
Sequential Prefetch, or Large I/O |
|
|
47 | (1) |
|
Caches and Object Bindings |
|
|
48 | (4) |
|
Heaps, I/O, and Cache Strategies |
|
|
48 | (2) |
|
Overview of Cache Strategies |
|
|
48 | (2) |
|
Select Operations and Caching |
|
|
50 | (1) |
|
Data Modification and Caching |
|
|
50 | (2) |
|
Caching and Inserts on Heaps |
|
|
51 | (1) |
|
Caching and Update and Delete Operations on Heaps |
|
|
51 | (1) |
|
|
|
52 | (1) |
|
Guidelines for Using Heaps |
|
|
52 | (1) |
|
|
|
52 | (1) |
|
Methods for Maintaining Heaps |
|
|
53 | (1) |
|
Reclaiming Space by Creating a Clustered Index |
|
|
53 | (1) |
|
Reclaiming Space Using bcp |
|
|
53 | (1) |
|
The Transaction Log: A Special Heap Table |
|
|
53 | (2) |
|
|
|
55 | (2) |
|
Chapter 4. How Indexes Work |
|
|
57 | (26) |
|
|
|
57 | (1) |
|
|
|
57 | (1) |
|
|
|
58 | (2) |
|
|
|
58 | (2) |
|
|
|
59 | (1) |
|
|
|
59 | (1) |
|
|
|
59 | (1) |
|
|
|
60 | (9) |
|
Clustered Indexes and Select Operations |
|
|
61 | (2) |
|
Clustered Indexes and Insert Operations |
|
|
63 | (1) |
|
Page Splitting on Full Data Pages |
|
|
63 | (2) |
|
Exceptions to Page Splitting |
|
|
65 | (1) |
|
Page Splitting on Index Pages |
|
|
65 | (1) |
|
Performance Impacts of Page Splitting |
|
|
65 | (1) |
|
|
|
66 | (1) |
|
Clustered Indexes and Delete Operations |
|
|
66 | (3) |
|
Deleting the Last Row on a Page |
|
|
67 | (2) |
|
|
|
69 | (1) |
|
|
|
69 | (8) |
|
|
|
70 | (1) |
|
Row IDs and the Offset Table |
|
|
70 | (2) |
|
Nonclustered Index Structure |
|
|
72 | (1) |
|
Nonclustered Indexes and Select Operations |
|
|
73 | (1) |
|
Nonclustered Index Performance |
|
|
74 | (1) |
|
Nonclustered Indexes and Insert Operations |
|
|
75 | (1) |
|
Nonclustered Indexes and Delete Operations |
|
|
76 | (1) |
|
|
|
77 | (2) |
|
|
|
77 | (1) |
|
|
|
78 | (1) |
|
|
|
79 | (3) |
|
Using Separate Caches for Data and Index Pages |
|
|
81 | (1) |
|
Index Trips Through the Cache |
|
|
82 | (1) |
|
Indexing and the Size of Database Objects |
|
|
82 | (1) |
|
Chapter 5. Estimating the Size of Tables and Indexes |
|
|
83 | (32) |
|
Tools for Sizing Database Objects |
|
|
83 | (3) |
|
Why Should You Care about the Size of Objects? |
|
|
83 | (1) |
|
Effects of Data Modifications on Object Sizes |
|
|
84 | (1) |
|
OAM Pages and Size Statistics |
|
|
84 | (2) |
|
Using sp_spaceused to Display Object Size |
|
|
86 | (2) |
|
Advantages of sp_spaceused |
|
|
87 | (1) |
|
Disadvantages of sp_spaceused |
|
|
88 | (1) |
|
Using dbcc to Display Object Size |
|
|
88 | (3) |
|
|
|
90 | (1) |
|
|
|
91 | (1) |
|
Using sp_estspace to Estimate Object Size |
|
|
91 | (2) |
|
Advantages of sp_estspace |
|
|
92 | (1) |
|
Disadvantages of sp_estspace |
|
|
93 | (1) |
|
Using Formulas to Estimate Object Size |
|
|
93 | (18) |
|
Factors That Can Change Storage Size |
|
|
93 | (1) |
|
Storage Sizes for Datatypes |
|
|
94 | (1) |
|
Calculating the Size of Tables and Clustered Indexes |
|
|
95 | (4) |
|
Step 1: Calculate the Data Row Size |
|
|
95 | (1) |
|
Step 2: Compute the Number of Data Pages |
|
|
96 | (1) |
|
Step 3: Compute the Size of Clustered Index Rows |
|
|
96 | (1) |
|
Step 4: Compute the Number of Clustered Index Pages |
|
|
97 | (1) |
|
Step 5: Compute the Total Number of Index Pages |
|
|
98 | (1) |
|
Step 6: Calculate Allocation Overhead and Total Pages |
|
|
98 | (1) |
|
Example: Calculating the Size of a 9,000,000-Row Table |
|
|
99 | (2) |
|
Calculating the Data Row Size (Step 1) |
|
|
99 | (1) |
|
Calculating the Number of Data Pages (Step 2) |
|
|
100 | (1) |
|
Calculating the Clustered Index Row Size (Step 3) |
|
|
100 | (1) |
|
Calculating the Number of Clustered Index Pages (Step 4) |
|
|
100 | (1) |
|
Calculating the Total Number of Index Pages (Step 5) |
|
|
100 | (1) |
|
Calculating the Number of OAM Pages and Total Pages (Step 6) |
|
|
100 | (1) |
|
Calculating the Size of Nonclustered Indexes |
|
|
101 | (2) |
|
Step 7: Calculate the Size of the Leaf Index Row |
|
|
101 | (1) |
|
Step 8: Calculate the Number of Leaf Pages in the Index |
|
|
102 | (1) |
|
Step 9: Calculate the Size of the Non-Leaf Rows |
|
|
102 | (1) |
|
Step 10: Calculate the Number of Non-Leaf Pages |
|
|
102 | (1) |
|
Step 11: Calculate the Total Number of Non-Leaf Index Pages |
|
|
103 | (1) |
|
Step 12: Calculate Allocation Overhead and Total Pages |
|
|
103 | (1) |
|
Example: Calculating the Size of a Nonclustered Index |
|
|
103 | (3) |
|
Calculate the Size of the Leaf Index Row (Step 7) |
|
|
104 | (1) |
|
Calculate the Number of Leaf Pages (Step 8) |
|
|
105 | (1) |
|
Calculate the Size of the Non-Leaf Rows (Step 9) |
|
|
105 | (1) |
|
Calculate the Number of Non-Leaf Pages (Step 10) |
|
|
105 | (1) |
|
|
|
106 | (1) |
|
OAM Pages Needed (Step 12) |
|
|
106 | (1) |
|
|
|
106 | (1) |
|
Other Factors Affecting Object Size |
|
|
106 | (3) |
|
Effects of Setting fillfactor to 100 Percent |
|
|
107 | (1) |
|
|
|
107 | (1) |
|
|
|
107 | (1) |
|
Using Average Sizes for Variable Fields |
|
|
107 | (2) |
|
|
|
109 | (1) |
|
|
|
109 | (1) |
|
text and image Data Pages |
|
|
109 | (1) |
|
Advantages of Using Formulas to Estimate Object Size |
|
|
110 | (1) |
|
Disadvantages of Using Formulas to Estimate Object Size |
|
|
110 | (1) |
|
|
|
111 | (4) |
| Section B: Turning the Performance of Queries |
|
115 | (240) |
|
Chapter 6. Indexing for Performance |
|
|
115 | (48) |
|
How Indexes Can Affect Performance |
|
|
115 | (1) |
|
Symptoms of Poor Indexing |
|
|
115 | (4) |
|
Detecting Indexing Problems |
|
|
116 | (3) |
|
Lack of Indexes Is Causing Table Scans |
|
|
116 | (1) |
|
Index Is Not Selective Enough |
|
|
117 | (1) |
|
Index Does Not Support Range Queries |
|
|
117 | (1) |
|
Too Many Indexes Slow Data Modification |
|
|
117 | (1) |
|
Index Entries Are Too Large |
|
|
117 | (2) |
|
Index Limits and Requirements |
|
|
119 | (1) |
|
Tools for Query Analysis and Tuning |
|
|
119 | (3) |
|
Monitoring the Effects of Index Tuning |
|
|
122 | (1) |
|
Indexes and I/O Statistics |
|
|
122 | (5) |
|
|
|
123 | (2) |
|
Queries Reporting Scan Count of 1 |
|
|
123 | (1) |
|
Queries Reporting Scan Count Greater Than 1 |
|
|
123 | (1) |
|
Queries Reporting Scan Count of 0 |
|
|
124 | (1) |
|
|
|
125 | (2) |
|
Logical Reads, Physical Reads, and 2K I/O |
|
|
126 | (1) |
|
Physical Reads and Large I/O |
|
|
126 | (1) |
|
Reads and Writes on Worktables |
|
|
126 | (1) |
|
Effects of Caching on Writes |
|
|
127 | (1) |
|
Effects of Caching on Reads |
|
|
127 | (1) |
|
|
|
127 | (8) |
|
|
|
128 | (2) |
|
Evaluating the Cost of a Table Scan |
|
|
129 | (1) |
|
Evaluating the Cost of Index Access |
|
|
130 | (2) |
|
Evaluating the Cost of a Point Query |
|
|
130 | (1) |
|
Evaluating the Cost of a Range Query |
|
|
130 | (2) |
|
Range Queries with Covering Nonclustered Indexes |
|
|
132 | (2) |
|
Range Queries with Noncovering Nonclustered Indexes |
|
|
134 | (1) |
|
|
|
135 | (3) |
|
Sorts and Clustered Indexes |
|
|
136 | (1) |
|
Sorts and Nonclustered Indexes |
|
|
137 | (1) |
|
Sorts When the Index Covers the Query |
|
|
137 | (1) |
|
|
|
138 | (8) |
|
Index Keys and Logical Keys |
|
|
139 | (1) |
|
Guidelines for Clustered Indexes |
|
|
139 | (1) |
|
Choosing Clustered Indexes |
|
|
139 | (1) |
|
Candidates for Nonclustered Indexes |
|
|
140 | (1) |
|
Other Indexing Guidelines |
|
|
140 | (2) |
|
Choosing Nonclustered Indexes |
|
|
142 | (1) |
|
Performance Price for Data Modification |
|
|
142 | (1) |
|
Choosing Composite Indexes |
|
|
142 | (2) |
|
User Perceptions and Covered Queries |
|
|
143 | (1) |
|
The Importance of Order in Composite Indexes |
|
|
144 | (1) |
|
Advantages of Composite Indexes |
|
|
145 | (1) |
|
Disadvantages of Composite Indexes |
|
|
145 | (1) |
|
|
|
145 | (1) |
|
Techniques for Choosing Indexes |
|
|
146 | (3) |
|
|
|
146 | (1) |
|
Examining Two Queries with Different Indexing Requirements |
|
|
147 | (2) |
|
|
|
149 | (3) |
|
|
|
149 | (2) |
|
|
|
151 | (1) |
|
How the Optimizer Uses the Statistics |
|
|
152 | (1) |
|
How the Optimizer Uses the Distribution Table |
|
|
153 | (1) |
|
How the Optimizer Uses the Density Table |
|
|
153 | (1) |
|
|
|
153 | (3) |
|
Monitoring Index Usage Over Time |
|
|
154 | (1) |
|
Dropping Indexes That Hurt Performance |
|
|
154 | (1) |
|
Index Statistics Maintenance |
|
|
154 | (1) |
|
|
|
155 | (1) |
|
Speeding Index Creation with sorted data |
|
|
156 | (1) |
|
Displaying Information About Indexes |
|
|
156 | (1) |
|
Tips and Tricks for Indexes |
|
|
157 | (1) |
|
Creating Artificial Columns |
|
|
158 | (1) |
|
Keeping Index Entries Short and Avoiding Overhead |
|
|
158 | (1) |
|
Dropping and Rebuilding Indexes |
|
|
158 | (1) |
|
Choosing Fillfactors for Indexes |
|
|
158 | (3) |
|
Disadvantages of Using fillfactor |
|
|
159 | (1) |
|
Advantages of Using fillfactor |
|
|
160 | (1) |
|
Using sp_sysmon to Observe the Effects of Changing fillfactor |
|
|
160 | (1) |
|
Armed to Face the Optimizer |
|
|
161 | (2) |
|
Chapter 7. The SQL Server Query Optimizer |
|
|
163 | (44) |
|
What Is Query Optimization? |
|
|
163 | (1) |
|
SQL Server's Cost-Based Optimizer |
|
|
163 | (2) |
|
Steps in Query Processing |
|
|
164 | (1) |
|
Optimization Problems and their Roots |
|
|
165 | (2) |
|
Working with the Optimizer |
|
|
165 | (1) |
|
How Is "Fast" Determined? |
|
|
166 | (1) |
|
Query Optimization and Plans |
|
|
166 | (1) |
|
Diagnostic Tools for Query Optimization |
|
|
167 | (3) |
|
Using showplan and noexec Together |
|
|
169 | (1) |
|
|
|
169 | (1) |
|
Using set statistics time |
|
|
169 | (1) |
|
|
|
170 | (1) |
|
Search Arguments and Using Indexes |
|
|
171 | (4) |
|
|
|
172 | (3) |
|
Indexable Search Argument Syntax |
|
|
172 | (1) |
|
Search Argument Equivalents |
|
|
173 | (1) |
|
Guidelines for Creating Search Arguments |
|
|
173 | (1) |
|
Adding SARGs to Help the Optimizer |
|
|
174 | (1) |
|
|
|
175 | (10) |
|
|
|
176 | (3) |
|
|
|
176 | (1) |
|
|
|
177 | (1) |
|
Choice of Inner and Outer Tables |
|
|
177 | (2) |
|
Saving I/O Using the Reformatting Strategy |
|
|
179 | (1) |
|
|
|
180 | (1) |
|
Datatype Mismatches and Joins |
|
|
181 | (1) |
|
|
|
182 | (1) |
|
Joins in Queries with More Than Four Tables |
|
|
182 | (3) |
|
Optimization of or clauses and in (values_list) |
|
|
185 | (3) |
|
|
|
185 | (1) |
|
in (values_list) Converts to or Processing |
|
|
185 | (1) |
|
How or Clauses Are Processed |
|
|
185 | (2) |
|
or Clauses and Table Scans |
|
|
186 | (1) |
|
Multiple Matching Index Scans |
|
|
186 | (1) |
|
|
|
186 | (1) |
|
Locking and the OR Strategy |
|
|
187 | (1) |
|
|
|
188 | (1) |
|
Combining max and min Aggregates |
|
|
188 | (1) |
|
|
|
189 | (6) |
|
Flattening in, any, and exists Subqueries |
|
|
189 | (1) |
|
Flattening Expression Subqueries |
|
|
190 | (1) |
|
Materializing Subquery Results |
|
|
191 | (1) |
|
Noncorrelated Expression Subqueries |
|
|
191 | (1) |
|
Quantified Predicate Subqueries Containing Aggregates |
|
|
191 | (1) |
|
|
|
192 | (2) |
|
Subquery Introduced with an and Clause |
|
|
193 | (1) |
|
Subquery Introduced with an or Clause |
|
|
193 | (1) |
|
|
|
194 | (1) |
|
Displaying Subquery Cache Information |
|
|
194 | (1) |
|
|
|
195 | (1) |
|
|
|
195 | (11) |
|
|
|
195 | (5) |
|
|
|
196 | (1) |
|
|
|
197 | (1) |
|
|
|
198 | (2) |
|
|
|
200 | (1) |
|
|
|
201 | (2) |
|
|
|
203 | (3) |
|
Indexing and Update Types |
|
|
204 | (1) |
|
Choosing Fixed-Length Datatypes for Direct Updates |
|
|
205 | (1) |
|
Using max_rows_per_page to Increase Direct Updates |
|
|
205 | (1) |
|
Using sp_sysmon While Tuning Updates |
|
|
206 | (1) |
|
From Observation to Diagnosis and Treatment |
|
|
206 | (1) |
|
Chapter 8. Understanding Query Plans |
|
|
207 | (52) |
|
Diagnostic Tools for Query Optimization |
|
|
207 | (1) |
|
|
|
207 | (2) |
|
Combining showplan and noexec |
|
|
208 | (1) |
|
Echoing Input into Output Files |
|
|
208 | (1) |
|
|
|
209 | (10) |
|
Query Plan Delimiter Message |
|
|
209 | (1) |
|
|
|
210 | (1) |
|
|
|
210 | (1) |
|
|
|
211 | (3) |
|
"FROM TABLE" and Referential Integrity |
|
|
213 | (1) |
|
|
|
214 | (1) |
|
|
|
215 | (1) |
|
|
|
215 | (4) |
|
|
|
215 | (2) |
|
|
|
217 | (1) |
|
"Deferred Index" and "Deferred Varcol" Messages |
|
|
218 | (1) |
|
Using sp_sysmon While Tuning Updates |
|
|
219 | (1) |
|
showplan Messages for Query Clauses |
|
|
219 | (11) |
|
|
|
220 | (1) |
|
Selecting into a Worktable |
|
|
220 | (1) |
|
Grouped Aggregate Message |
|
|
221 | (2) |
|
Grouped Aggregate and group by |
|
|
222 | (1) |
|
|
|
223 | (1) |
|
Ungrouped Aggregate Message |
|
|
224 | (2) |
|
|
|
224 | (1) |
|
|
|
225 | (1) |
|
Messages for order by and distinct |
|
|
226 | (3) |
|
Worktable Message for distinct |
|
|
226 | (2) |
|
Worktable Message for order by |
|
|
228 | (1) |
|
|
|
229 | (1) |
|
|
|
229 | (1) |
|
showplan Messages Describing Access Methods and Caching |
|
|
230 | (12) |
|
|
|
231 | (1) |
|
|
|
232 | (1) |
|
|
|
233 | (1) |
|
|
|
233 | (1) |
|
|
|
233 | (1) |
|
|
|
234 | (1) |
|
|
|
234 | (2) |
|
|
|
236 | (1) |
|
Matching Index Scans Message |
|
|
236 | (2) |
|
|
|
238 | (1) |
|
Conditions for Using a Dynamic Index |
|
|
238 | (1) |
|
|
|
239 | (3) |
|
Trigger "Log Scan" Message |
|
|
242 | (1) |
|
|
|
242 | (1) |
|
|
|
242 | (1) |
|
showplan Messages for Subqueries |
|
|
242 | (15) |
|
Output for Flattened or Materialized Subqueries |
|
|
244 | (2) |
|
|
|
244 | (1) |
|
|
|
245 | (1) |
|
Structure of Subquery showplan Output |
|
|
246 | (3) |
|
Subquery Execution Message |
|
|
249 | (1) |
|
Nesting Level Delimiter Message |
|
|
249 | (1) |
|
Subquery Plan Start Delimiter |
|
|
249 | (1) |
|
Subquery Plan End Delimiter |
|
|
249 | (1) |
|
|
|
249 | (1) |
|
|
|
250 | (1) |
|
Internal Subquery Aggregates |
|
|
250 | (4) |
|
Grouped or Ungrouped Messages |
|
|
251 | (1) |
|
Quantified Predicate Subqueries and the ANY Aggregate |
|
|
251 | (1) |
|
Expression Subqueries and the ONCE Aggregate |
|
|
252 | (1) |
|
Subqueries with distinct and the ONCE-UNIQUE Aggregate |
|
|
253 | (1) |
|
|
|
254 | (3) |
|
Subqueries That Perform Existence Tests |
|
|
255 | (2) |
|
Going Beyond Standard Remedies |
|
|
257 | (2) |
|
Chapter 9. Advanced Optimizing Techniques |
|
|
259 | (26) |
|
What Are Advanced Optimizing Techniques? |
|
|
259 | (1) |
|
Specifying Optimizer Choices |
|
|
259 | (1) |
|
Specifying Table Order in Joins |
|
|
260 | (5) |
|
|
|
260 | (4) |
|
Join Sequence and Scans Required for Each Plan |
|
|
263 | (1) |
|
|
|
264 | (1) |
|
Things to Try Before Using forceplan |
|
|
264 | (1) |
|
Increasing the Number of Tables Considered by the Optimizer |
|
|
265 | (1) |
|
Specifying an Index for a Query |
|
|
265 | (2) |
|
Risks of Specifying Indexes in Queries |
|
|
267 | (1) |
|
Things to Try Before Specifying Indexes |
|
|
267 | (1) |
|
Specifying I/O Size in a Query |
|
|
267 | (3) |
|
Index Type and Prefetching |
|
|
269 | (1) |
|
When prefetch Specification Is Not Followed |
|
|
269 | (1) |
|
|
|
269 | (1) |
|
Specifying the Cache Strategy |
|
|
270 | (1) |
|
Specifying Cache Strategy in select, delete, and update Statements |
|
|
271 | (1) |
|
Controlling Prefetching and Cache Strategies for Database Objects |
|
|
271 | (1) |
|
Getting Information on Cache Strategies |
|
|
272 | (1) |
|
Tuning with dbcc traceon 302 |
|
|
272 | (12) |
|
Invoking the dbcc Trace Facility |
|
|
272 | (1) |
|
General Tips for Tuning with This Trace Facility |
|
|
273 | (1) |
|
Checking for Join Columns and Search Arguments |
|
|
273 | (1) |
|
Determine How the Optimizer Estimates I/O Costs |
|
|
274 | (1) |
|
|
|
274 | (3) |
|
|
|
274 | (1) |
|
|
|
275 | (1) |
|
Identifying the where Clause |
|
|
275 | (1) |
|
|
|
276 | (1) |
|
|
|
276 | (1) |
|
|
|
277 | (2) |
|
|
|
277 | (1) |
|
Index Statistics Used in dbcc 302 |
|
|
278 | (1) |
|
Evaluating Statistics for Search Clauses |
|
|
279 | (1) |
|
Distribution Page Value Matches |
|
|
279 | (1) |
|
Values Between Steps or Out of Range |
|
|
280 | (2) |
|
|
|
280 | (1) |
|
Search Clauses with Unknown Values |
|
|
281 | (1) |
|
Cost Estimates and Selectivity |
|
|
282 | (1) |
|
Estimating Selectivity for Search Clauses |
|
|
283 | (1) |
|
Estimating Selectivity for Join Clauses |
|
|
283 | (1) |
|
|
|
284 | (1) |
|
Chapter 10. Transact-SQL Performance Tips |
|
|
285 | (10) |
|
|
|
285 | (1) |
|
|
|
285 | (1) |
|
|
|
285 | (1) |
|
Variables vs. Parameters in where Clauses |
|
|
286 | (2) |
|
|
|
288 | (1) |
|
or Clauses vs. Unions in Joins |
|
|
288 | (1) |
|
|
|
289 | (1) |
|
|
|
290 | (2) |
|
Null vs. Not Null Character and Binary Columns |
|
|
290 | (1) |
|
Forcing the Conversion to the Other Side of the Join |
|
|
291 | (1) |
|
|
|
292 | (1) |
|
From Query Processing to Reliability |
|
|
292 | (3) |
|
Chapter 11. Locking on SQL Server |
|
|
295 | (40) |
|
|
|
295 | (1) |
|
|
|
296 | (1) |
|
|
|
297 | (1) |
|
Types of Locks in SQL Server |
|
|
297 | (6) |
|
|
|
298 | (2) |
|
|
|
300 | (1) |
|
|
|
301 | (1) |
|
|
|
301 | (1) |
|
|
|
302 | (1) |
|
How Isolation Levels Affect Locking |
|
|
303 | (6) |
|
|
|
303 | (2) |
|
|
|
305 | (1) |
|
|
|
306 | (1) |
|
|
|
306 | (2) |
|
SQL Server Default Isolation Level |
|
|
308 | (1) |
|
Controlling Isolation Levels |
|
|
309 | (4) |
|
Setting Isolation Levels for a Session |
|
|
309 | (1) |
|
Using holdlock, noholdlock, or shared |
|
|
310 | (1) |
|
Using the at isolation Clause |
|
|
310 | (1) |
|
Making Locks More Restrictive |
|
|
311 | (1) |
|
|
|
312 | (1) |
|
Making Locks Less Restrictive |
|
|
312 | (1) |
|
|
|
312 | (1) |
|
|
|
312 | (1) |
|
Examples of Locking and Isolation Levels |
|
|
313 | (2) |
|
|
|
315 | (2) |
|
|
|
316 | (1) |
|
Deadlocks and Concurrency in SQL Server |
|
|
317 | (3) |
|
|
|
318 | (2) |
|
Acquire Locks on Objects In the Same Order |
|
|
319 | (1) |
|
Delaying Deadlock Checking |
|
|
319 | (1) |
|
Locking and Performance of SQL Server |
|
|
320 | (7) |
|
Using sp_sysmon While Reducing Lock Contention |
|
|
321 | (1) |
|
|
|
321 | (5) |
|
Keeping Transactions Short |
|
|
322 | (1) |
|
|
|
323 | (1) |
|
Decreasing the Number of Rows per Page |
|
|
324 | (2) |
|
Additional Locking Guidelines |
|
|
326 | (1) |
|
Reporting on Locks and Locking Behavior |
|
|
327 | (2) |
|
Getting Information About Blocked Processes with sp_who |
|
|
327 | (1) |
|
Viewing Locks with sp_lock |
|
|
327 | (1) |
|
Observing Locks with sp_sysmon |
|
|
328 | (1) |
|
Configuring Locks and Lock Promotion Thresholds |
|
|
329 | (4) |
|
Configuring SQL Server's Lock Limit |
|
|
329 | (1) |
|
Setting the Lock Promotion Thresholds |
|
|
329 | (4) |
|
Setting Lock Promotion Thresholds Server-Wide |
|
|
331 | (1) |
|
Setting the Lock Promotion Threshold for a Table or Database |
|
|
332 | (1) |
|
|
|
332 | (1) |
|
Dropping Database and Table Settings |
|
|
333 | (1) |
|
Using sp_sysmon While Tuning Lock Promotion Thresholds |
|
|
333 | (1) |
|
Using Cursors for Row-by-Row Processing |
|
|
333 | (2) |
|
Chapter 12. Cursors and Performance |
|
|
335 | (20) |
|
How Cursors Can Affect Performance |
|
|
335 | (2) |
|
|
|
335 | (1) |
|
Set-Oriented vs. Row-Oriented Programming |
|
|
335 | (1) |
|
Cursors: A Simple Example |
|
|
336 | (1) |
|
Resources Required at Each Stage |
|
|
337 | (3) |
|
Memory Use and Execute Cursors |
|
|
339 | (1) |
|
Cursor Modes: Read-Only and Update |
|
|
340 | (1) |
|
|
|
340 | (1) |
|
Index Use and Requirements for Cursors |
|
|
340 | (1) |
|
Comparing Performance With and Without Cursors |
|
|
341 | (4) |
|
Sample Stored Procedure: Without a Cursor |
|
|
341 | (1) |
|
Sample Stored Procedure With a Cursor |
|
|
342 | (1) |
|
Cursor vs. Non-Cursor Performance Comparison |
|
|
343 | (1) |
|
Cursor vs. Non-Cursor Performance Explanation |
|
|
344 | (1) |
|
Locking with Read-Only Cursors |
|
|
345 | (1) |
|
Locking with Update Cursors |
|
|
345 | (2) |
|
Update Cursors: Experiment Results |
|
|
346 | (1) |
|
Isolation Levels and Cursors |
|
|
347 | (1) |
|
Optimizing Tips for Cursors |
|
|
347 | (8) |
|
|
|
348 | (1) |
|
Use union Instead of or Clauses or in Lists |
|
|
348 | (1) |
|
Declare the Cursor's Intent |
|
|
348 | (1) |
|
Specify Column Names in the for update Clause |
|
|
348 | (2) |
|
|
|
350 | (1) |
|
|
|
350 | (1) |
|
Keep Cursors Open Across Commits and Rollbacks |
|
|
350 | (1) |
|
Open Multiple Cursors on a Single Connection |
|
|
350 | (5) |
| Section C: Hardware Tuning Issues and Application Maintenance |
|
355 | (188) |
|
Chapter 13. Controlling Physical Data Placement |
|
|
355 | (22) |
|
How Object Placement Can Improve Performance |
|
|
355 | (2) |
|
Multiuser and Multi-CPU Considerations |
|
|
355 | (1) |
|
Symptoms of Poor Object Placement |
|
|
356 | (1) |
|
|
|
356 | (1) |
|
Using sp_sysmon While Changing Data Placement |
|
|
356 | (1) |
|
|
|
357 | (1) |
|
Guidelines for Improving I/O Performance |
|
|
358 | (5) |
|
Spreading Data Across Disks to Avoid I/O Contention |
|
|
358 | (1) |
|
Isolating Server-Wide I/O from Database I/O |
|
|
359 | (1) |
|
|
|
359 | (1) |
|
Where to Place sybsecurity |
|
|
360 | (1) |
|
Keeping Transaction Logs on a Separate Disk |
|
|
360 | (1) |
|
Mirroring a Device on a Separate Disk |
|
|
361 | (2) |
|
Device Mirroring Performance Issues |
|
|
362 | (1) |
|
|
|
363 | (1) |
|
Creating Objects on Segments |
|
|
363 | (3) |
|
|
|
364 | (1) |
|
Separating Tables and Indexes |
|
|
364 | (1) |
|
Splitting a Large Table Across Devices |
|
|
365 | (1) |
|
Moving Text Storage to a Separate Device |
|
|
365 | (1) |
|
Improving Insert Performance with Partitions |
|
|
366 | (3) |
|
Page Contention for Inserts |
|
|
366 | (1) |
|
How Partitions Address Page Contention |
|
|
367 | (1) |
|
How Partitions Address I/O Contention |
|
|
368 | (1) |
|
Read, Update, and Delete Performance |
|
|
369 | (1) |
|
Partitioning and Unpartitioning Tables |
|
|
369 | (6) |
|
Selecting Tables to Partition |
|
|
370 | (1) |
|
|
|
370 | (1) |
|
Cursors and Partitioned Tables |
|
|
371 | (1) |
|
|
|
371 | (2) |
|
|
|
371 | (2) |
|
|
|
373 | (1) |
|
Getting Information About Partitions |
|
|
373 | (1) |
|
dbcc checktable and dbcc checkdb |
|
|
374 | (1) |
|
|
|
374 | (1) |
|
Changing the Number of Partitions |
|
|
375 | (1) |
|
Partition Configuration Parameters |
|
|
375 | (1) |
|
|
|
375 | (2) |
|
Chapter 14. tempdb Performance Issues |
|
|
377 | (14) |
|
|
|
377 | (1) |
|
How Can tempdb Affect Performance? |
|
|
377 | (1) |
|
Main Solution Areas for tempdb Performance |
|
|
377 | (1) |
|
Types and Use of Temporary Tables |
|
|
378 | (1) |
|
|
|
378 | (1) |
|
|
|
378 | (1) |
|
|
|
379 | (1) |
|
Initial Allocation of tempdb |
|
|
379 | (1) |
|
|
|
380 | (3) |
|
Information for Sizing tempdb |
|
|
381 | (1) |
|
|
|
381 | (2) |
|
|
|
383 | (1) |
|
|
|
383 | (1) |
|
Dropping the master Device from tempdb Segments |
|
|
384 | (1) |
|
Spanning Disks Leads to Poor Performance |
|
|
385 | (1) |
|
Binding tempdb to Its Own Cache |
|
|
385 | (1) |
|
Commands for Cache Binding |
|
|
385 | (1) |
|
Temporary Tables and Locking |
|
|
386 | (1) |
|
Minimizing Logging in tempdb |
|
|
386 | (1) |
|
Minimizing Logging with select into |
|
|
386 | (1) |
|
Minimizing Logging via Shorter Rows |
|
|
386 | (1) |
|
Optimizing Temporary Tables |
|
|
387 | (2) |
|
Creating Indexes on Temporary Tables |
|
|
388 | (1) |
|
Breaking tempdb Uses into Multiple Procedures |
|
|
388 | (1) |
|
Creating Nested Procedures with Temporary Tables |
|
|
389 | (1) |
|
|
|
389 | (2) |
|
Chapter 15. Memory Use and Performance |
|
|
391 | (38) |
|
How Memory Affects Performance |
|
|
391 | (1) |
|
|
|
391 | (1) |
|
How Much Memory to Configure |
|
|
392 | (1) |
|
|
|
393 | (1) |
|
|
|
393 | (4) |
|
Getting Information About the Procedure Cache Size |
|
|
395 | (1) |
|
|
|
395 | (1) |
|
|
|
396 | (1) |
|
|
|
396 | (1) |
|
Estimating Stored Procedure Size |
|
|
396 | (1) |
|
Monitoring Procedure Cache Performance |
|
|
397 | (1) |
|
|
|
397 | (1) |
|
|
|
397 | (5) |
|
Default Cache at Installation Time |
|
|
397 | (1) |
|
|
|
398 | (1) |
|
Effect of Data Cache on Retrievals |
|
|
398 | (1) |
|
Effect of Data Modifications on the Cache |
|
|
399 | (1) |
|
|
|
400 | (1) |
|
Testing Data Cache Performance |
|
|
400 | (2) |
|
Cache Hit Ratio for a Single Query |
|
|
401 | (1) |
|
Cache Hit Ratio Information from sp_sysmon |
|
|
401 | (1) |
|
|
|
402 | (7) |
|
Named Data Caches and Performance |
|
|
402 | (1) |
|
Large I/Os and Performance |
|
|
403 | (1) |
|
Types of Queries That Can Benefit From Large I/O |
|
|
404 | (2) |
|
Choosing the Right Mix of I/O Sizes for a Cache |
|
|
405 | (1) |
|
Cache Replacement Strategies |
|
|
406 | (1) |
|
The Optimizer and Cache Choices |
|
|
407 | (1) |
|
Commands to Configure Named Data Caches |
|
|
407 | (1) |
|
Commands for Tuning Query I/O Strategies and Sizes |
|
|
408 | (1) |
|
Named Data Cache Recommendations |
|
|
408 | (1) |
|
|
|
409 | (10) |
|
Cache Configuration Goals |
|
|
410 | (1) |
|
Development Versus Production Systems |
|
|
411 | (1) |
|
Gather Data, Plan, Then Implement |
|
|
411 | (1) |
|
|
|
412 | (1) |
|
Cache Sizing for Special Objects, tempdb and Transaction Logs |
|
|
413 | (4) |
|
Determining Cache Sizes for Special Tables or Indexes |
|
|
413 | (1) |
|
Examining tempdb's Cache Needs |
|
|
413 | (1) |
|
Examining Cache Needs for Transaction Logs |
|
|
414 | (1) |
|
Choosing the I/O Size for the Transaction Log |
|
|
415 | (1) |
|
Configuring for Large Log I/O Size |
|
|
416 | (1) |
|
Further Tuning Tips for Log Caches |
|
|
416 | (1) |
|
Basing Data Pool Sizes on Query Plans and I/O |
|
|
417 | (1) |
|
Checking I/O Size for Queries |
|
|
417 | (1) |
|
Configuring Buffer Wash Size |
|
|
418 | (1) |
|
Overhead of Pool Configuration and Binding Objects |
|
|
419 | (1) |
|
Pool Configuration Overhead |
|
|
419 | (1) |
|
|
|
419 | (1) |
|
Maintaining Data Cache Performance for Large I/O |
|
|
420 | (3) |
|
Causes for High Large I/O Counts |
|
|
420 | (2) |
|
Using sp_sysmon to Check Large I/O Performance |
|
|
422 | (1) |
|
Re-Creating Indexes to Eliminate Fragmentation |
|
|
423 | (1) |
|
Using Fillfactor for Data Cache Performance |
|
|
423 | (1) |
|
|
|
423 | (2) |
|
Tuning the Recovery Interval |
|
|
424 | (1) |
|
Housekeeper Task's Effects on Recovery Time |
|
|
425 | (1) |
|
|
|
425 | (2) |
|
|
|
425 | (1) |
|
Auditing Performance Guidelines |
|
|
426 | (1) |
|
Interconnections among Systems: Analyzing Networks |
|
|
427 | (2) |
|
Chapter 16. Networks and Performance |
|
|
429 | (14) |
|
How SQL Server Uses the Network |
|
|
429 | (1) |
|
|
|
429 | (1) |
|
Potential Network-Based Performance Problems |
|
|
430 | (1) |
|
Basic Questions About Networks and Performance |
|
|
430 | (1) |
|
|
|
430 | (1) |
|
Using sp_sysmon While Changing Network Configuration |
|
|
431 | (1) |
|
Changing Network Packet Sizes |
|
|
431 | (3) |
|
Large Packet Sizes vs. Default-Size User Connections |
|
|
432 | (1) |
|
Number of Packets Is Important |
|
|
432 | (1) |
|
Point of Diminishing Returns |
|
|
432 | (1) |
|
Client Commands for Larger Packet Sizes |
|
|
433 | (1) |
|
Evaluation Tools with SQL Server |
|
|
434 | (1) |
|
Evaluation Tools Outside of SQL Server |
|
|
434 | (1) |
|
Techniques for Reducing Network Traffic |
|
|
434 | (2) |
|
Server-Based Techniques for Reducing Traffic |
|
|
434 | (2) |
|
Using Stored Procedures to Reduce Network Traffic |
|
|
435 | (1) |
|
Ask for Only the Information You Need |
|
|
435 | (1) |
|
Fill Up Packets When Using Cursors |
|
|
436 | (1) |
|
|
|
436 | (1) |
|
|
|
436 | (1) |
|
Impact of Other Server Activities |
|
|
436 | (2) |
|
|
|
437 | (1) |
|
Single User vs. Multiple Users |
|
|
437 | (1) |
|
Guidelines for Improving Network Performance |
|
|
438 | (4) |
|
Choose the Right Packet Size for the Task |
|
|
438 | (2) |
|
Isolate Heavy Network Users |
|
|
440 | (1) |
|
Set tcp no delay on TCP Networks |
|
|
440 | (1) |
|
Configure Multiple Network Listeners |
|
|
440 | (2) |
|
From Networks to CPUs: Analyzing Processing Efficiency |
|
|
442 | (1) |
|
Chapter 17. Using CPU Resources Effectively |
|
|
443 | (14) |
|
CPU Resources and Performance |
|
|
443 | (1) |
|
Task Management on SQL Server |
|
|
443 | (3) |
|
|
|
446 | (3) |
|
|
|
446 | (1) |
|
Using sp_monitor to See CPU Usage |
|
|
446 | (1) |
|
|
|
447 | (1) |
|
Operating System Commands and CPU Usage |
|
|
447 | (1) |
|
|
|
447 | (1) |
|
Determining When to Configure Additional Engines |
|
|
448 | (1) |
|
Measuring CPU Usage from the Operating System |
|
|
448 | (1) |
|
Distributing Network I/O Across All Engines |
|
|
449 | (1) |
|
Enabling Engine-to-CPU Affinity |
|
|
449 | (2) |
|
How the Housekeeper Task Improves CPU Utilization |
|
|
451 | (2) |
|
Side Effects of the Housekeeper Task |
|
|
451 | (1) |
|
Configuring the Housekeeper Task |
|
|
452 | (1) |
|
Changing the Percentage by Which Writes Can Increase |
|
|
452 | (1) |
|
Disabling the Housekeeper Task |
|
|
452 | (1) |
|
Allowing the Housekeeper Task to Work Continuously |
|
|
452 | (1) |
|
Checking Housekeeper Effectiveness |
|
|
453 | (1) |
|
Multiprocessor Application Design Guidelines |
|
|
453 | (2) |
|
|
|
453 | (1) |
|
|
|
453 | (1) |
|
Adjusting the fillfactor for create index Commands |
|
|
453 | (1) |
|
Setting max_rows_per_page |
|
|
454 | (1) |
|
|
|
454 | (1) |
|
|
|
454 | (1) |
|
Real-World Context: Maintenance Activities and Performance |
|
|
455 | (2) |
|
Chapter 18. Maintenance Activities and Performance |
|
|
457 | (10) |
|
Maintenance Activities That Affect Performance |
|
|
457 | (1) |
|
Creating or Altering a Database |
|
|
457 | (1) |
|
|
|
458 | (3) |
|
Configuring SQL Server to Speed Sorting |
|
|
459 | (1) |
|
|
|
459 | (1) |
|
Increasing the Number of Sort Buffers and Sort Pages |
|
|
460 | (1) |
|
Dumping the Database After Creating an Index |
|
|
460 | (1) |
|
Creating a Clustered Index on Sorted Data |
|
|
460 | (1) |
|
|
|
461 | (1) |
|
|
|
461 | (1) |
|
|
|
461 | (1) |
|
|
|
461 | (1) |
|
Using Thresholds to Prevent Running Out of Log Space |
|
|
461 | (1) |
|
|
|
462 | (1) |
|
|
|
462 | (1) |
|
|
|
462 | (2) |
|
|
|
463 | (1) |
|
|
|
463 | (1) |
|
Improving Bulk Copy Performance |
|
|
463 | (1) |
|
Replacing the Data in a Large Table |
|
|
463 | (1) |
|
Adding Large Amounts of Data to a Table |
|
|
464 | (1) |
|
Use Partitions and Multiple Copy Processes |
|
|
464 | (1) |
|
|
|
464 | (1) |
|
Database Consistency Checker |
|
|
464 | (1) |
|
Regular Monitoring as a Maintenance Activity |
|
|
465 | (2) |
|
Chapter 19. Monitoring SQL Server Performance with sp_sysmon |
|
|
467 | (76) |
|
|
|
467 | (1) |
|
|
|
468 | (1) |
|
Using sp_sysmon to View Performance Information |
|
|
469 | (5) |
|
|
|
469 | (1) |
|
|
|
469 | (1) |
|
|
|
470 | (1) |
|
|
|
471 | (2) |
|
|
|
472 | (1) |
|
|
|
472 | (1) |
|
Interpreting sp_sysmon Data |
|
|
473 | (1) |
|
Per Second and Per Transaction Data |
|
|
473 | (1) |
|
Percent of Total and Count Data |
|
|
473 | (1) |
|
|
|
473 | (1) |
|
|
|
474 | (1) |
|
Sample Interval and Time Reporting |
|
|
474 | (1) |
|
|
|
474 | (6) |
|
Sample Output for Kernel Utilization |
|
|
474 | (1) |
|
|
|
475 | (2) |
|
|
|
477 | (1) |
|
|
|
477 | (2) |
|
|
|
478 | (1) |
|
|
|
478 | (1) |
|
|
|
478 | (1) |
|
Average Network I/Os per Check |
|
|
478 | (1) |
|
|
|
479 | (1) |
|
|
|
479 | (1) |
|
|
|
479 | (1) |
|
Average Disk I/Os Returned |
|
|
480 | (1) |
|
|
|
480 | (7) |
|
Sample Output for Task Management |
|
|
480 | (1) |
|
|
|
481 | (1) |
|
Task Context Switches by Engine |
|
|
481 | (1) |
|
Task Context Switches Due To |
|
|
482 | (5) |
|
|
|
482 | (1) |
|
|
|
482 | (1) |
|
|
|
482 | (1) |
|
|
|
483 | (1) |
|
|
|
483 | (1) |
|
|
|
484 | (1) |
|
|
|
484 | (1) |
|
|
|
484 | (1) |
|
|
|
485 | (1) |
|
|
|
485 | (1) |
|
|
|
486 | (1) |
|
|
|
486 | (1) |
|
|
|
486 | (1) |
|
|
|
487 | (1) |
|
|
|
487 | (1) |
|
|
|
487 | (6) |
|
Sample Output for Transaction Profile |
|
|
487 | (1) |
|
|
|
488 | (2) |
|
|
|
488 | (2) |
|
|
|
490 | (3) |
|
|
|
490 | (2) |
|
|
|
492 | (1) |
|
|
|
492 | (1) |
|
|
|
493 | (5) |
|
Sample Output for Transaction Management |
|
|
493 | (1) |
|
ULC Flushes to Transaction Log |
|
|
494 | (1) |
|
|
|
494 | (1) |
|
|
|
495 | (1) |
|
|
|
495 | (1) |
|
By System Log Record and By Other |
|
|
495 | (1) |
|
|
|
495 | (1) |
|
|
|
496 | (1) |
|
|
|
496 | (1) |
|
|
|
497 | (1) |
|
|
|
498 | (1) |
|
Transaction Log Allocations |
|
|
498 | (1) |
|
Avg # Writes per Log Page |
|
|
498 | (1) |
|
|
|
498 | (8) |
|
Sample Output for Index Management |
|
|
498 | (1) |
|
|
|
499 | (2) |
|
Inserts and Updates Requiring Maintenance to Indexes |
|
|
500 | (1) |
|
Deletes Requiring Maintenance |
|
|
500 | (1) |
|
RID Updates from Clustered Split |
|
|
501 | (1) |
|
|
|
501 | (5) |
|
Reducing Page Splits for Ascending-Key Inserts |
|
|
502 | (1) |
|
Default Data Page Splitting |
|
|
502 | (1) |
|
Effects of Ascending Inserts |
|
|
503 | (1) |
|
Setting Ascending Inserts Mode for a Table |
|
|
504 | (1) |
|
|
|
504 | (1) |
|
|
|
505 | (1) |
|
|
|
505 | (1) |
|
|
|
506 | (1) |
|
|
|
506 | (6) |
|
Sample Output for Lock Management |
|
|
506 | (2) |
|
|
|
508 | (1) |
|
|
|
508 | (1) |
|
|
|
508 | (1) |
|
|
|
508 | (1) |
|
|
|
509 | (1) |
|
|
|
509 | (1) |
|
|
|
510 | (1) |
|
|
|
510 | (1) |
|
|
|
511 | (1) |
|
|
|
511 | (1) |
|
|
|
511 | (1) |
|
Average Deadlocks per Search |
|
|
512 | (1) |
|
|
|
512 | (1) |
|
|
|
512 | (15) |
|
Sample Output for Data Cache Management |
|
|
515 | (1) |
|
Cache Statistics Summary (All Caches) |
|
|
516 | (4) |
|
|
|
516 | (1) |
|
|
|
517 | (1) |
|
|
|
517 | (1) |
|
|
|
518 | (1) |
|
|
|
518 | (1) |
|
|
|
519 | (1) |
|
Cache Management By Cache |
|
|
520 | (7) |
|
|
|
520 | (1) |
|
|
|
520 | (1) |
|
Cache Search, Hit, and Miss Information |
|
|
521 | (1) |
|
|
|
522 | (2) |
|
|
|
524 | (1) |
|
|
|
525 | (1) |
|
|
|
526 | (1) |
|
|
|
527 | (1) |
|
|
|
527 | (1) |
|
Procedure Cache Management |
|
|
527 | (1) |
|
Sample Output for Procedure Cache Management |
|
|
527 | (1) |
|
|
|
528 | (1) |
|
Procedure Reads from Disk |
|
|
528 | (1) |
|
|
|
528 | (1) |
|
|
|
528 | (1) |
|
|
|
528 | (1) |
|
Sample Output for Memory Management |
|
|
528 | (1) |
|
|
|
529 | (1) |
|
|
|
529 | (1) |
|
|
|
529 | (3) |
|
Sample Output for Recovery Management |
|
|
529 | (1) |
|
|
|
529 | (2) |
|
Number of Normal Checkpoints |
|
|
530 | (1) |
|
Number of Free Checkpoints |
|
|
530 | (1) |
|
|
|
531 | (1) |
|
Average Time per Normal Checkpoint |
|
|
531 | (1) |
|
Average Time per Free Checkpoint |
|
|
531 | (1) |
|
Increasing the Housekeeper Batch Limit |
|
|
531 | (1) |
|
|
|
532 | (5) |
|
Sample Output for Disk I/O Management |
|
|
532 | (1) |
|
|
|
533 | (1) |
|
|
|
534 | (1) |
|
|
|
534 | (1) |
|
Server Configuration Limit |
|
|
534 | (1) |
|
Engine Configuration Limit |
|
|
534 | (1) |
|
|
|
535 | (1) |
|
Requested and Completed Disk I/Os |
|
|
535 | (1) |
|
Total Requested Disk I/Os |
|
|
535 | (1) |
|
|
|
535 | (1) |
|
|
|
536 | (1) |
|
|
|
536 | (1) |
|
|
|
536 | (1) |
|
Device Semaphore Granted and Waited |
|
|
537 | (1) |
|
|
|
537 | (6) |
|
Sample Output for Network I/O Management |
|
|
538 | (1) |
|
Total Requested Network I/Os |
|
|
539 | (1) |
|
|
|
540 | (1) |
|
Total TDS Packets Received |
|
|
540 | (1) |
|
|
|
540 | (1) |
|
Average Bytes Rec'd per Packet |
|
|
540 | (1) |
|
|
|
540 | (1) |
|
|
|
540 | (1) |
|
Average Bytes Sent per Packet |
|
|
540 | (1) |
|
|
|
540 | (3) |
| Glossary |
|
543 | (30) |
| Bibliography |
|
573 | (2) |
| Performance Tuning |
|
573 | (1) |
| Client/Server |
|
573 | (1) |
| Sybase Transact-SQL |
|
573 | (1) |
| SQL Server 11.0 |
|
573 | (1) |
| SQL Server 11.0 |
|
573 | (2) |
| Index |
|
575 | |