mysql 计算距离 性能_MySQL性能计算_MySQL

bitsCN.com

MySQL性能计算

##################################################################################

QPS(Queries Per Second):

mysql> show /*!50000 global */ status like 'Questions';

mysql> show /*!50000 global */ status like 'Queries';

QPS = Questions(or Queries) / Seconds

##################################################################################

TPS(Transactions Per Second):

mysql> show status like 'Com_commit';

mysql> show status like 'Com_rollback';

#分布式事务相关应加上下面2个变量值

mysql> show status like 'Com_xa_commit';

mysql> show status like 'Com_xa_rollback';

TPS = ( Com_commit + Com_rollback ) / Seconds

##################################################################################

Key Buffer(MyISAM表索引Cache):

mysql> show status like 'Key_reads';

mysql> show status like 'Key_read_requests';

mysql> show status like 'Key_writes';

mysql> show status like 'Key_write_requests';

Key Buffer Read 命中率 = ( 1 - Key_reads / Key_read_requests ) * 100%

Key Buffer Write 命中率 = ( 1 - Key_writes / Key_write_requests ) * 100%

##################################################################################

Innodb Buffer Pool:

mysql> show status like 'Innodb_buffer_pool_reads';

mysql> show status like 'Innodb_buffer_pool_read_requests';

Innodb Buffer Pool Read 命中率 = ( 1 - Innodb_buffer_pool_reads/Innodb_buffer_pool_read_requests ) * 100%

mysql> show innodb status /G

##################################################################################

Query Cache:

mysql> show status like 'Qcache_hits';

mysql> show status like 'Qcache_inserts';

Query Cache 命中率 = ( Qcache_hits / ( Qcache_hits + Qcache_inserts ) ) * 100%;

##################################################################################

Table Cache:

mysql> show status like 'Open_tables';

mysql> show status like 'Opened_tables';

Table Cache 命中率 = ( Open_tables / Opened_tables ) * 100%

##################################################################################

Thread Cache:

mysql> show status like 'connections';

mysql> show status like 'Threads_created';

Thread Cache 命中率 = ( 1 - Threads_created / Connections ) * 100%

#################################################################################bitsCN.com

本条技术文章来源于互联网,如果无意侵犯您的权益请点击此处反馈版权投诉

本文系统来源:php中文网

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值