开发者

MYSQL Statistics [closed]

It's difficult to tell what is being asked here. This question is ambiguous, vague, incomplete, overly broad, or rhetorical and cannot be reasonably answered in its current form. For help clarifying this question so that it can be reopened, visit the help center. Closed 11 years ago.

I write a class to check some statisti开发者_运维百科cs and I don't know what mean the terms and If they are bad

$array = explode("  ", mysql_stat());
foreach ($array as $value){
    echo $value . "<br />";
}

and output:

Uptime: 4520
Threads: 3
Questions: 295957
Slow queries: 0
Opens: 905
Flush tables: 1
Open tables: 32
Queries per second avg: 65.477

is something wrong ?

PS: any way to find out unclosed mysql connections ??

Thanks!


Are you having problems with database performance, or do you have another reason to write a statistics class? Without knowing what the values mean, they will never be very meaningful to you.

There's an article on techrepublic that helps explain some of the information; you can also check out the official documentation on server status variables here. That may be a good jumping-off point for you.

PS: Threads_connected will give you the number of currently open connections; is that what you're looking for?


The only meaningful metric of performance is user's experience of response time. If this metric indicates a problem use the statistic generated by the RDBMS to help investigate why response is slow.

The statistics by themselves mean nothing but when compared to loading and other details of your DB become meaningful. For instance 'Slow Queries 0' looks good but if you are running a large Data Warehouse 'Slow Queries 1000' might also be a good result.

Tracking the stats over time can be helpful to develop an understanding of normal load and then, when a problem is reported, you can compare to normal operation to determine what is wrong.

And as Problematic said, read up on the meaning of each stat so you can derive the information behind it.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜