mysql的show status和show global status区别

show status                   本次会话的参数状态
show global status        本次MYSQL服务到现在总请求数,即systemctl start mariadb到现在的总请求,systemctl restart mariadb重置该数值

MariaDB [(none)]> show global status like 'com_stmt%';
+-------------------------+-------+
| Variable_name           | Value |
+-------------------------+-------+
| Com_stmt_close          | 1986  |
| Com_stmt_execute        | 1566  |
| Com_stmt_fetch          | 0     |
| Com_stmt_prepare        | 1986  |
| Com_stmt_reprepare      | 0     |
| Com_stmt_reset          | 0     |
| Com_stmt_send_long_data | 0     |
+-------------------------+-------+

 

你可能感兴趣的:(mysql的show status和show global status区别)