Mysql is a relational database management system that can be used in development. When the amount of data is relatively large, it is found to be slow during query. At this time, it is necessary to optimize the SQL statement. Today's introduction A way to optimize sql.
1. First I create a table, then add some data, and write a stored procedure to write the data,
2. After writing the data, let’s query the data to see how long it will take
## 3. Let’s check how much data there is in this table
The most frequent index type of B-Tree
#
The above is the detailed content of A detailed introduction to how to add an index in MySQL. For more information, please follow other related articles on the PHP Chinese website!