PHPMyAdmin 如何获取查询静态信息?
How PHPMyAdmin get query statics?
亲爱的朋友们:我正在为客户端开发一个 php 服务器监视器。监视器的其中一个部分与 MySQL 有关。
在 PHPmyadmin 中,服务器状态 > 状态查询部分显示查询数量。我认为这是从 "SHOW STATUS" mysql 命令中提取的。但是...不同!
当我在 PHPmyadmin 中进入服务器状态 > 服务器状态变量部分时,系统显示与 "Status Queries" 部分相同的值。
但是当我得到 "SHOW STATUS" 命令的结果时,值是不一样的。
我的英语水平太差,无法正确解释案例。所以,我将展示一个例子:
在 Server Status > Status Queries 我可以看到,在 table:
Sentences | # | per hour| %
---------------------------------
select | 365 | 51.4 |25.29
set option | 266 | 37.4 |18.43
当我转到“服务器状态”>“服务器状态变量”时,我可以看到:
Variable | Value | Description
---------------------------------
Com select | 365 | Blah Blah....
Com set Option | 266 | Blah Blah....
但是如果我运行"SHOW STATUS",我得到:
Variable | Value
-----------------------------
com_select | 1
com_set_Option | 2
而且,在这一点上,我的大脑爆炸了....
你能赐教吗?
PD:再次抱歉,如果我的英语太差...
使用:
SHOW GLOBAL STATUS;
获取server status values如PhpMyAdmin
所示
With a GLOBAL modifier, the statement displays the global status values. A global status variable may represent status for some aspect of the server itself (for example, Aborted_connects), or the aggregated status over all connections to MySQL (for example, Bytes_received and Bytes_sent). If a variable has no global value, the session value is displayed.
With a SESSION modifier, the statement displays the status variable values for the current connection. If a variable has no session value, the global value is displayed. LOCAL is a synonym for SESSION.
If no modifier is present, the default is SESSION.
亲爱的朋友们:我正在为客户端开发一个 php 服务器监视器。监视器的其中一个部分与 MySQL 有关。
在 PHPmyadmin 中,服务器状态 > 状态查询部分显示查询数量。我认为这是从 "SHOW STATUS" mysql 命令中提取的。但是...不同!
当我在 PHPmyadmin 中进入服务器状态 > 服务器状态变量部分时,系统显示与 "Status Queries" 部分相同的值。 但是当我得到 "SHOW STATUS" 命令的结果时,值是不一样的。
我的英语水平太差,无法正确解释案例。所以,我将展示一个例子: 在 Server Status > Status Queries 我可以看到,在 table:
Sentences | # | per hour| %
---------------------------------
select | 365 | 51.4 |25.29
set option | 266 | 37.4 |18.43
当我转到“服务器状态”>“服务器状态变量”时,我可以看到:
Variable | Value | Description
---------------------------------
Com select | 365 | Blah Blah....
Com set Option | 266 | Blah Blah....
但是如果我运行"SHOW STATUS",我得到:
Variable | Value
-----------------------------
com_select | 1
com_set_Option | 2
而且,在这一点上,我的大脑爆炸了.... 你能赐教吗? PD:再次抱歉,如果我的英语太差...
使用:
SHOW GLOBAL STATUS;
获取server status values如PhpMyAdmin
所示With a GLOBAL modifier, the statement displays the global status values. A global status variable may represent status for some aspect of the server itself (for example, Aborted_connects), or the aggregated status over all connections to MySQL (for example, Bytes_received and Bytes_sent). If a variable has no global value, the session value is displayed.
With a SESSION modifier, the statement displays the status variable values for the current connection. If a variable has no session value, the global value is displayed. LOCAL is a synonym for SESSION.
If no modifier is present, the default is SESSION.