MySQL 5.5官方文档:

http://dev.mysql.com/doc/refman/5.5/en/server-status-variables.html#statvar_Com_xxx

Com_xxx

The Com_xxx statement counter variables indicate the number of times each xxx statement has been executed. There is one status variable for each type of statement. For example, Com_delete and Com_update count DELETE and UPDATEstatements, respectively. Com_delete_multi and Com_update_multi are similar but apply to DELETE and UPDATEstatements that use multiple-table syntax.

If a query result is returned from query cache, the server increments the Qcache_hits status variable, not Com_select. See Section 8.9.3.4, “Query Cache Status and Maintenance”.

All of the Com_stmt_xxx variables are increased even if a prepared statement argument is unknown or an error occurred during execution. In other words, their values correspond to the number of requests issued, not to the number of requests successfully completed.

The Com_stmt_xxx status variables are as follows:

  • Com_stmt_prepare

  • Com_stmt_execute

  • Com_stmt_fetch

  • Com_stmt_send_long_data

  • Com_stmt_reset

  • Com_stmt_close

Those variables stand for prepared statement commands. Their names refer to the COM_xxx command set used in the network layer. In other words, their values increase whenever prepared statement API calls such asmysql_stmt_prepare()mysql_stmt_execute(), and so forth are executed. However, Com_stmt_prepare,Com_stmt_execute and Com_stmt_close also increase for PREPAREEXECUTE, or DEALLOCATE PREPARE, respectively. Additionally, the values of the older statement counter variables Com_prepare_sqlCom_execute_sql, and Com_dealloc_sql increase for the PREPAREEXECUTE, and DEALLOCATE PREPARE statements.Com_stmt_fetch stands for the total number of network round-trips issued when fetching from cursors.

Com_stmt_reprepare indicates the number of times statements were automatically reprepared by the server after metadata changes to tables or views referred to by the statement. A reprepare operation incrementsCom_stmt_reprepare, and also Com_stmt_prepare.

“COM_ 这个类别代表着所有 MySQL 所执行过的指令,通常与 MySQL protocol 相关。在正常的情况下,你会希望这个类别所占的比例越低越好,因为当这个数值很高的时候就表示 MySQL 正忙碌于无关紧要的事情上。”

[MySQL]关于Com_状态的更多相关文章

  1. Mysql 连接sleep状态问题解决。

    昨日mysql总是出问题,各种程序在运行时,出现了连接已断开的问题.  导致此问题的原因: 1. 最大连接数 2. 网络问题 3. mysql服务器资源问题 然而,上面最常见的3个问题都没有出现.后来 ...

  2. 监控mysql主从同步状态脚本

    监控mysql主从同步状态脚本 示例一: cat check_mysql_health #!/bin/sh slave_is=($(mysql -S /tmp/mysql3307.sock -uroo ...

  3. nagios 实现Mysql 主从同步状态的监控

    一.系统环境 主机名 IP nagios 192.168.15.111 mysql_s 192.168.15.21 二.操作步骤 2.1 mysql_s端的配置 2.1.1 编写check_mysql ...

  4. Mysql 查看连接数,状态 最大并发数(赞)

    Mysql 查看连接数,状态 最大并发数(赞)   -- show variables like '%max_connections%'; 查看最大连接数 set global max_connect ...

  5. 解读show slave status 命令判断MySQL复制同步状态

    解读show slave status 命令判断MySQL复制同步状态 1. show slave status命令可以显示主从同步的状态 MySQL> show slave status \G ...

  6. 监控mysql主从同步状态是否异常

    监控mysql主从同步状态是否异常,如果异常,则发生短信或邮寄给管理员 标签:监控mysql主从同步状态是否异常 阶段1:开发一个守护进程脚本每30秒实现检测一次. 阶段2:如果同步出现如下错误号(1 ...

  7. Mysql 查看连接数,状态及最大并发数(转载)

    -- show variables like '%max_connections%'; 查看最大连接数 set global max_connections=1000 重新设置   mysql> ...

  8. MySQL 分析服务器状态

    标签:MYSQL/数据库/性能优化/调优 概述 文章简单介绍了通过一些查询命令分析当前服务器的状态. 目录 概述 获取服务器整体的性能状态 SQL操作计数 总结 步骤 获取服务器整体的性能状态 首先对 ...

  9. 第13章 MySQL服务器的状态--高性能MySQL学习笔记

    13.1 系统变量 -- 服务器配置变量 MySQL通过SHOW VARIABLES  SQL命令显示许多系统变量. 13.2 状态变量--SHOW STATUS SHOW STATUS 命令会在一个 ...

随机推荐

  1. Webpack探索【4】--- entry和output详解

    本文主要讲entry和output相关内容.

  2. SpringMVC请求流程

    Spring结构图 SpringMVC请求流程图 SpringMVC请求流程图语述: request--->DispatcherServler(中央调度器/前端控制器)---> Handl ...

  3. 使用微软官方U盘制作软件来安装纯净版windows

    第一步:下载一个制作U启的工具;windows-usb-dvd-download-tool 微软官网:https://www.microsoft.com/en-us/download/windows- ...

  4. 内存写越界导致破环堆结构引起的崩溃问题定位经验[如报错malloc(): memory corruption或free(): invalid next size]

    前段时间开发的一个后端C模块上线后,线上出core,初始时,因为訪问压力不大,所以崩溃是上线3天左右出现的.当时用gdb跟进调用堆栈并检查源代码,发现出core位置的代码沒有啥问题.因为当时开发任务较 ...

  5. sqlalchemy——多表操作

    一对多:一对一 # one -- many class Students(Base): __tablename__ = "students" sid = Column(Intege ...

  6. ERROR 2003 (HY000): Can't connect to MySQL server on 'ip地址' (110)

    用windows能远程连接数据库服务器,用ubuntu就报错,怎么都连不上,报这个错ERROR 2003 (HY000): Can't connect to MySQL server on 'ip地址 ...

  7. 每天一个Linux命令(23)chmod命令

        chmod命令用来变更文件或目录的权限. 在UNIX系统家族里,文件或目录权限的控制分别以读取.写入.执行3种一般权限来区分,另有3种特殊权限可供运用.用户可以使用chmod指令去变更文件与目 ...

  8. P4240 毒瘤之神的考验

    题目 P4240 毒瘤之神的考验 神仙题\(emmm\) 前置 首先有一个很神奇的性质: \(\varphi(ij)=\dfrac{\varphi(i)\varphi(j)gcd(i,j)}{\var ...

  9. python有哪些关键字?让他自己“吐”出来!

    通过调用库来输出!for循环控制! 源代码: import keyword c = 0 for i in keyword.kwlist: print(i) c += 1 代码截图: 哈哈,关键字: F ...

  10. shell正则

    第五天 REGEXP:REGular EXPressionPattern: 正则表达式: Basic REGEXP:基本 Extended REGEXP:扩展 基本正则表达式: 字符匹配类:.: 任意 ...