--show global status where Variable_name in('com_select','com_insert','com_delete','com_update');
查詢出當前四種操作的總次數:
x1
y1
z1
w1
--select sleep(60)
延時60秒
--show global status where Variable_name in('com_select','com_insert','com_delete','com_update');
一分鐘後四種操作的總次數:
x2
y2
z2
w2
計算每秒 各種操作的次數
每秒查詢: (x1-x2)/60
每秒插入: (y1-y2)/60
每秒刪除: (z1-z2)/60
每秒更新: (w1-w2)/60