First introduce a few key words
1 Show status indicates the current state data for the database
Show [Session|global] status session is the statistical result of the current connection global is all the statistical results since the database service was started
Show status like ' com_% '; Where com_xxx represents the number of times that the XXX statement was executed we mainly focus on the com_select,com_insert,com_update,com_delete of the several parameters, respectively, the number of queries, number of additions, number of updates, number of deletions
Besides, there are a few other parameters worth noting
Connections: Number of attempts to connect to MySQL server
Uptime: The time the server is working (in seconds)
Slow_queries: Number of slow queries
And then go to the key place. Slow Query
When the slow query is the query time is more than the slow query set time is slow query, such as slow query time set is 10 seconds have a query more than 10 seconds This query is called slow query slow query time can be set by itself
First look at how long slow queries are open for slow queries
Log_slow_queries to determine if the time to open long_query_time slow query is
Turn on Slow query
long_query_time=2
Slow-query-log=on
slow_query_log_file= "C:/Program files/mysql/mysql Server 5.6/mysql_slow_query.log"
These three parameters are placed under [MYSQLLD] and then restart the database service in the query can see the slow query opened
The location problem of MySQL optimization