mysql database | database optimization
1. Common Strategies
-
Avoid using select *
-
Use left and right joins instead of subqueries
-
Joint index instead of temporary table
-
Try to use transactions
-
Try to use foreign keys
-
When using the index, try not to use it,
or
>
etc., don't use it if you can query without a range -
varchar instead of char
-
Implicit conversion of data types
- Implicit conversion of data type: operations such as splicing cause data type to change, such as:
click to see more implicit conversions
- Implicit conversion of data type: operations such as splicing cause data type to change, such as: