MySQL性能指标

栏目: 数据库 · 发布时间: 7年前

内容简介:最近在魔改MySQL性能收集器

最近在魔改 MySQL 性能收集器 mysqld-exporter ,接触到一些MySQL常见的性能指标,好好地记录下来学习学习:

SHOW GLOBAL STATUS 中:

mysql root@192.168.175.132:(none)> show variables  like '%slow_query_log%';
+---------------------+--------------------------------+
| Variable_name       | Value                          |
+---------------------+--------------------------------+
| slow_query_log      | OFF                            |
| slow_query_log_file | /var/lib/mysql/ubuntu-slow.log |
+---------------------+--------------------------------+
2 rows in set
Time: 0.017s
  • Innodb_row_lock_current_waits 是InnoDB当前被等待的行锁的数量
  • Threads_connectedThreads_created 是当前打开的线程数和总共创建的线程数
  • Questions 是总共执行的语句数
  • Connections 是总共的连接数
  • Com_select , Com_insert , Com_update , Com_delete , Com_replace 则是分别对应 SELECT , INSERT , UPDATE , DELETE , REPLACE 语句的数量
  • Qcache_hits 是缓存命中量
  • Select_full_join 是全表连接的数量

SHOW VARIABLES\G 中:

  • max_connections 是最大连接数

SHOW SLAVE STATUS\G 中:

  • Seconds_Behind_Master 是主从之间的延时

当然了,这些指标其实文档上全都有,但是很久不读文档,或者没有DBA那么熟悉文档的话,这样记录一下就还是有用的。


以上就是本文的全部内容,希望对大家的学习有所帮助,也希望大家多多支持 码农网

查看所有标签

猜你喜欢:

本站部分资源来源于网络,本站转载出于传递更多信息之目的,版权归原作者或者来源机构所有,如转载稿涉及版权问题,请联系我们

Computational Geometry

Computational Geometry

Mark de Berg、Otfried Cheong、Marc van Kreveld、Mark Overmars / Springer / 2008-4-16 / USD 49.95

This well-accepted introduction to computational geometry is a textbook for high-level undergraduate and low-level graduate courses. The focus is on algorithms and hence the book is well suited for st......一起来看看 《Computational Geometry》 这本书的介绍吧!

在线进制转换器
在线进制转换器

各进制数互转换器

RGB CMYK 转换工具
RGB CMYK 转换工具

RGB CMYK 互转工具

HEX CMYK 转换工具
HEX CMYK 转换工具

HEX CMYK 互转工具