Show profile It is disabled by default , It is used to record the time spent by queries running in the server and other data related to query execution status changes .
The current system is win10,Mysql The version is 8.0.15
1. View the current profiling To configure
show variables like 'profiling%'
2. Modify... At the session level profiling To configure
set profiling =1
I'm executing this sentence is , Back to me
0 row(s) affected, 1 warning(s): 1287 '@@profiling' is deprecated and will be removed in a future release.
Look at the tip , It seems that the later version profiling There will be changes
3. see profile Record
show profiles
When a query is submitted to the server , This tool records profiling information to a temporary table , And give each query a from 1 The starting integer identifier .
4. To drill down into the distribution of the execution time of a query
show profile for query < Integer identifier >
Is learning , If there are mistakes or deficiencies , Please point out the communication .