 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
| • |
Query optimization
|
|
|
|
– |
Enable the slow query log
|
|
|
|
– |
Learn to use and read EXPLAIN output
|
|
|
– |
Understand how indexes help
|
|
|
|
• |
The “leftmost prefix” rule
|
|
|
|
– |
Don’t ask for unnecessary data
|
|
|
|
• |
SELECT * syndrome
|
|
|
|
– |
Use the query cache (4.0+)
|
|
|
|
– |
Try re-phrasing queries
|
|