2022-10-27 403
MySQL变量很多,其中有一些MySQL变量非常值得我们注意,下面就为您介绍一些值得我们重点学习的MySQL变量,供您参考。
1 Threads_connected 首先需要注意的,想得到这个变量的值不能show variables like ‘Threads_connected’;而是 show status like ‘Threads_connected'(下面的变值也是这样的); 意思:变量的值是表示当前有多少个客户连接该mysql服务器 引申:连接数是否过多,网络时候存在问题!特别是在pconnect的情况下:)
2 Created_tmp_disk_tables 意思:在硬盘上建立的临时表数目 引申:如果这个值比较大的话,那么查询时需要建立临时表(CREATE TEMPORARY TABLE)的操作 就要消耗更多的时间
3 Handler_read_first 意思:读表索引的第一行 引申:如果这个值变化比较大的话,可以认为表索引建立的有问题,全索引的扫描操作比较多
4 Innodb_buffer_pool_wait_free 意思:This variable indicates the number of times MySQL has to wait for memory pages to be flus 引申:If this variable is high, it suggests that MySQL’s memory buffer is incorrectly configured for the amount of writes the server is currently performing. 不了解这个:)
5 Key_reads 意思:读文件系统上面的索引的次数 引申:如果这个值太大的话,就需要考虑key cache设置是否正常了
6 Max_used_connections 意思:重起后到现在最大连接数 引申:服务器负载和可能需要调节的连接数
7 Open_tables 意思:当前打开的表的数目 引申:如果这个值很低,table cache很大,则减小table cache的设置是没有问题的,如果这个值很大,并接近了table cache的值,我们就需要加大talbe cache的设置
8 Select_full_join 意思:全连接的查询数目 引申:数值过大,需要建立更多的索引来避免
9 Slow_queries 意思:慢查询的数目 引申:过大的话就要察看慢查询的日志,并且检查sql语句书写是否恰当
10 Uptime 意思:运行时间,单位秒 引申:This value is useful to analyze server uptime, as well as to generate reports on overall system performance. A consistent low value indicates that the server is being frequently restarted, thereby causing frequent interruptions to client service.
原文链接:https://77isp.com/post/4326.html
=========================================
https://77isp.com/ 为 “云服务器技术网” 唯一官方服务平台,请勿相信其他任何渠道。
数据库技术 2022-03-28
网站技术 2022-11-26
网站技术 2023-01-07
网站技术 2022-11-17
Windows相关 2022-02-23
网站技术 2023-01-14
Windows相关 2022-02-16
Windows相关 2022-02-16
Linux相关 2022-02-27
数据库技术 2022-02-20
抠敌 2023年10月23日
嚼餐 2023年10月23日
男忌 2023年10月22日
瓮仆 2023年10月22日
簿偌 2023年10月22日
扫码二维码
获取最新动态