Home >Database >Mysql Tutorial >What does mysql's Explain command do?
Concept
1. Explain is used to analyze the SELECT query statement. Developers can optimize the query statement by analyzing the Explain results.
Function
2. Through the explain command, we can learn how the SQL is executed, and then parsing the explain results can help us use better indexes. Finally optimize it!
Through the explain command we can know the following information: table reading order, type of data reading operation, which indexes can be used, which indexes are actually used, references between tables, how many are in each table Information such as rows queried by the optimizer.
Example
explain select * from table_user ;
The above is the detailed content of What does mysql's Explain command do?. For more information, please follow other related articles on the PHP Chinese website!