Preface |
|
ix | |
|
|
1 | (34) |
|
A True Story of False Performance |
|
|
2 | (1) |
|
|
3 | (1) |
|
|
4 | (1) |
|
|
4 | (2) |
|
|
6 | (2) |
|
|
8 | (3) |
|
|
11 | (1) |
|
|
11 | (13) |
|
Metadata and the Application |
|
|
24 | (1) |
|
|
24 | (1) |
|
Average, Percentile, and Maximum |
|
|
25 | (2) |
|
Improving Query Response Time |
|
|
27 | (1) |
|
Direct Query Optimization |
|
|
27 | (1) |
|
Indirect Query Optimization |
|
|
28 | (1) |
|
|
29 | (1) |
|
Performance Affects Customers |
|
|
29 | (1) |
|
Before and After Code Changes |
|
|
29 | (1) |
|
|
30 | (1) |
|
|
30 | (2) |
|
|
32 | (1) |
|
Practice: Identify Slow Queries |
|
|
33 | (2) |
|
|
35 | (56) |
|
Red Herrings of Performance |
|
|
37 | (1) |
|
|
37 | (2) |
|
|
39 | (1) |
|
MySQL Indexes: A Visual Introduction |
|
|
40 | (1) |
|
InnoDB Tables Are Indexes |
|
|
41 | (4) |
|
|
45 | (4) |
|
Leftmost Prefix Requirement |
|
|
49 | (2) |
|
EXPLAIN: Query Execution Plan |
|
|
51 | (3) |
|
|
54 | (6) |
|
|
60 | (5) |
|
|
65 | (6) |
|
|
71 | (1) |
|
|
71 | (9) |
|
Indexing: How to Think Like MySQL |
|
|
80 | (1) |
|
|
80 | (1) |
|
|
81 | (1) |
|
|
82 | (1) |
|
|
83 | (1) |
|
It Was a Good Index Until |
|
|
84 | (1) |
|
|
84 | (1) |
|
Excessive, Duplicate, and Unused |
|
|
85 | (1) |
|
|
86 | (1) |
|
It's a Trap! (When MySQL Chooses Another Index) |
|
|
87 | (1) |
|
|
87 | (2) |
|
|
89 | (1) |
|
Practice: Find Duplicate Indexes |
|
|
90 | (1) |
|
|
91 | (32) |
|
|
92 | (1) |
|
|
92 | (4) |
|
|
96 | (1) |
|
|
96 | (1) |
|
|
97 | (1) |
|
|
97 | (7) |
|
|
104 | (11) |
|
|
115 | (1) |
|
|
115 | (1) |
|
|
115 | (3) |
|
|
118 | (1) |
|
|
118 | (1) |
|
|
119 | (1) |
|
|
120 | (1) |
|
Practice: Audit Query Data Access |
|
|
121 | (2) |
|
|
123 | (28) |
|
|
124 | (1) |
|
Performance Destabilizes at the Limit |
|
|
125 | (5) |
|
|
130 | (1) |
|
|
131 | (2) |
|
|
133 | (1) |
|
|
133 | (1) |
|
|
134 | (2) |
|
|
136 | (1) |
|
|
136 | (1) |
|
|
137 | (1) |
|
|
138 | (1) |
|
|
139 | (1) |
|
|
139 | (1) |
|
|
140 | (1) |
|
|
140 | (1) |
|
|
141 | (4) |
|
|
145 | (1) |
|
|
146 | (1) |
|
|
147 | (1) |
|
|
148 | (2) |
|
|
150 | (1) |
|
Practice: Describe an Access Pattern |
|
|
150 | (1) |
|
|
151 | (24) |
|
Why a Single Database Does Not Scale |
|
|
152 | (1) |
|
|
152 | (3) |
|
|
155 | (1) |
|
|
156 | (1) |
|
|
157 | (1) |
|
|
158 | (1) |
|
|
159 | (1) |
|
Sharding: A Brief Introduction |
|
|
160 | (1) |
|
|
161 | (1) |
|
|
162 | (5) |
|
|
167 | (3) |
|
|
170 | (1) |
|
|
170 | (1) |
|
|
171 | (1) |
|
|
172 | (1) |
|
|
172 | (1) |
|
|
173 | (1) |
|
|
173 | (2) |
|
|
175 | (58) |
|
Query Performance Versus Server Performance |
|
|
177 | (3) |
|
Normal and Stable: The Best Database Is a Boring Database |
|
|
180 | (1) |
|
Key Performance Indicators |
|
|
181 | (1) |
|
|
182 | (1) |
|
|
182 | (1) |
|
|
183 | (1) |
|
|
183 | (1) |
|
|
184 | (1) |
|
|
185 | (1) |
|
|
186 | (1) |
|
|
186 | (1) |
|
|
187 | (1) |
|
|
188 | (2) |
|
|
190 | (1) |
|
|
191 | (5) |
|
|
196 | (3) |
|
|
199 | (1) |
|
|
200 | (1) |
|
|
201 | (1) |
|
|
202 | (1) |
|
|
203 | (1) |
|
|
204 | (1) |
|
|
205 | (18) |
|
|
223 | (1) |
|
|
223 | (2) |
|
Wild Goose Chase (Thresholds) |
|
|
225 | (1) |
|
Alert on User Experience and Objective Limits |
|
|
226 | (2) |
|
|
228 | (2) |
|
|
230 | (1) |
|
Practice: Review Key Performance Indicators |
|
|
231 | (1) |
|
Practice: Review Alerts and Thresholds |
|
|
232 | (1) |
|
|
233 | (26) |
|
|
234 | (1) |
|
|
235 | (2) |
|
|
237 | (1) |
|
|
238 | (2) |
|
|
240 | (1) |
|
|
240 | (1) |
|
|
241 | (1) |
|
|
241 | (1) |
|
|
241 | (1) |
|
|
242 | (2) |
|
Semisynchronous Replication |
|
|
244 | (2) |
|
Reducing Lag: Multithreaded Replication |
|
|
246 | (4) |
|
|
250 | (2) |
|
|
252 | (2) |
|
|
254 | (1) |
|
Practice: Monitor Subsecond Lag |
|
|
255 | (4) |
|
|
259 | (38) |
|
|
260 | (2) |
|
Record and Next-Key Locks |
|
|
262 | (4) |
|
|
266 | (3) |
|
|
269 | (4) |
|
|
273 | (3) |
|
|
276 | (4) |
|
|
280 | (2) |
|
|
282 | (1) |
|
Large Transactions (Transaction Size) |
|
|
282 | (1) |
|
Long-Running Transactions |
|
|
283 | (1) |
|
|
284 | (1) |
|
|
285 | (1) |
|
|
286 | (1) |
|
Active Transactions: Latest |
|
|
286 | (4) |
|
Active Transactions: Summary |
|
|
290 | (1) |
|
Active Transaction: History |
|
|
291 | (1) |
|
Committed Transactions: Summary |
|
|
292 | (2) |
|
|
294 | (1) |
|
Practice: Alert on History List Length |
|
|
295 | (1) |
|
Practice: Examine Row Locks |
|
|
296 | (1) |
|
|
297 | (10) |
|
Split-Brain Is the Greatest Risk |
|
|
297 | (2) |
|
Data Drift Is Real but Invisible |
|
|
299 | (1) |
|
|
299 | (1) |
|
|
300 | (1) |
|
MySQL Extends Standard SQL |
|
|
301 | (1) |
|
|
301 | (1) |
|
Applications Do Not Fail Gracefully |
|
|
302 | (1) |
|
High Performance MySQL Is Difficult |
|
|
303 | (1) |
|
Practice: Identify the Guardrails that Prevent Split-Brain |
|
|
303 | (2) |
|
Practice: Check for Data Drift |
|
|
305 | (1) |
|
|
306 | (1) |
|
|
307 | (8) |
|
|
308 | (2) |
|
|
310 | (2) |
|
Network and Storage Latency |
|
|
312 | (1) |
|
|
313 | (2) |
|
|
315 | (1) |
Practice: Try MySQL in the Cloud |
|
315 | (2) |
Index |
|
317 | |