context switches
* IPC - displays counts for messages sent and received
* MEMORY - is not currently implemented
* PAGE FAULTS - displays counts for major and minor page faults
* SOURCE - displays the names of functions from the source code, together
with the name and line number of the file in which the function occurs
* SWAPS - displays swap counts
查询时间跟cpu的使用
mysql> select min(seq) seq,state,count(*) numb_ops,
round(sum(duration),5) sum_dur, round(avg(duration),5) avg_dur,
round(sum(cpu_user),5) sum_cpu, round(avg(cpu_user),5) avg_cpu
from information_schema.profiling
where query_id = 7
group by state
order by seq;
关闭此功能
mysql> set profiling=0;
mysql> show variables like 'profiling%';
+------------------------+-------+
| Variable_name | Value |
+------------------------+-------+
| profiling | OFF |
| profiling_history_size | 15 |
+------------------------+-------+