2 limitlessx limitlessx 于 2015.07.16 16:08 提问

show profile 中 query end 状态含义 200C

表2000行, id主键,98%update正常,突然有一条很慢, 使用show profile查询的结果是下面这个状态占用时间比较长,
{
"Status": "query end",
"Duration": "1.751142",
"CPU_user": "0.008999",
"CPU_system": "0.003999",
"Context_voluntary": "98",
"Context_involuntary": "0",
"Block_ops_in": "8",
"Block_ops_out": "32",
"Messages_sent": "0",
"Messages_received": "0",
"Page_faults_major": "0",
"Page_faults_minor": "0",
"Swaps": "0",
"Source_function": "mysql_execute_command",
"Source_file": "sql_parse.cc",
"Source_line": "4465"
},
请问这个 "Status": "query end", 状态是什么状态, 这个状态下在执行什么事情?
"Context_voluntary": "98", "Block_ops_in": "8", "Block_ops_out": "32" 这些字段的含义是什么?

大多数时候这些字段都是0, 为什么突然一条这几个字段很高?

2个回答

caozhy
caozhy   Ds   Rxr 2015.07.16 22:21

{
"Status": "query end", 状态
"Duration": "1.751142", 持续时间
"CPU_user": "0.008999", cpu用户
"CPU_system": "0.003999", cpu系统
"Context_voluntary": "98", 上下文主动切换
"Context_involuntary": "0", 上下文被动切换
"Block_ops_in": "8", 阻塞的输入操作
"Block_ops_out": "32", 阻塞的输出操作
"Messages_sent": "0", 消息发出
"Messages_received": "0", 消息接受
"Page_faults_major": "0", 主分页错误
"Page_faults_minor": "0", 次分页错误
"Swaps": "0", 交换次数
"Source_function": "mysql_execute_command", 源功能
"Source_file": "sql_parse.cc", 源文件
"Source_line": "4465" 源代码行
},

limitlessx
limitlessx "Block_ops_in": "8", 阻塞的输入操作 "Block_ops_out": "32", 阻塞的输出操作 , 这两个确定是这个意思吗? 好像和楼下说的不一样
2 年多之前 回复
oyljerry
oyljerry   Ds   Rxr 2015.07.16 16:24

CONTEXT_VOLUNTARY and CONTEXT_INVOLUNTARY indicate how many voluntary and involuntary context switches occurred.

BLOCK_OPS_IN and BLOCK_OPS_OUT indicate the number of block input and output operations.

STATE is the profiling state to which the row measurements apply.

Csdn user default icon
上传中...
上传图片
插入图片