 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
 |
• |
Optimizer
tips and tricks
|
|
|
|
– |
It’s
smart, but not perfect
|
|
|
|
– |
Only
one index per table per query
|
|
|
|
• |
You may
need to de-normalize to get performance
|
|
|
• |
You may
need to write two queries instead of one
|
|
|
|
– |
Don’t
compute in the WHERE
|
|
|
|
• |
MySQL
doesn’t know how to optimize constant
|
|
|
|
expressions
|
|