mysql_stat中条目的含义是什么?

R_U*_*ser 2 php mysql statistics

mysql_stat()用PHP 调用了函数,它给了我以下结果:

  • 正常运行时间:7733455
  • 主题:1
  • 问题:2218231
  • 慢查询:1552
  • 开放时间:14989
  • 同花表:1
  • 开放表:6
  • 每秒查询平均值:0.287

我在6天前创建了数据库,但是uptime建议,这是近90天前(或者这是服务器的最后一次重启?)

查询的阈值是slow query多少?

我可以以某种方式检查,哪些查询慢?

怎么可能open Tables是6,如果我的数据库中只有3个表?

什么是条目的含义Threads,OpensFlush tables

是否可以重置统计数据?

s.w*_*dit 7

由于PHP DOCSmysql不鼓励使用扩展名.请mysqli改用.

字段的含义:

   o   Uptime

       The number of seconds the MySQL server has been running.

   o   Threads

       The number of active threads (clients).

   o   Questions

       The number of questions (queries) from clients since the server was
       started.

   o   Slow queries

       The number of queries that have taken more than long_query_time
       seconds. (MySQL DOSC "The Slow Query Log" section).

   o   Opens

       The number of tables the server has opened.

   o   Flush tables

       The number of flush-*, refresh, and reload commands the server has
       executed.

   o   Open tables

       The number of tables that currently are open.

   o   Memory in use

       The amount of memory allocated directly by mysqld. This value is
       displayed only when MySQL has been compiled with safemalloc, which
       is available only before MySQL 5.5.6.

   o   Maximum memory used

       The maximum amount of memory allocated directly by mysqld. This
       value is displayed only when MySQL has been compiled with
       safemalloc, which is available only before MySQL 5.5.6.
Run Code Online (Sandbox Code Playgroud)

要重置此值#> mysqladmin flush-host,请在mysql服务器终端中使用.