接口功能介绍
查询实例慢日志详细情况。
接口约束
无
URI
GET /v1/open-api/slow-query/detail
路径参数
无
Query参数
参数 | 是否必填 | 参数类型 | 说明 | 示例 | 下级对象 |
---|---|---|---|---|---|
checksum | 是 | BigInteger | 校验值,可通过**查询RDS实例慢日志统计情况**接口获得 |
请求参数
请求头header参数
无
请求体body参数
无
响应参数
参数 | 是否必填 | 参数类型 | 说明 | 示例 | 下级对象 |
---|---|---|---|---|---|
statusCode | 是 | Integer | 返回码 | 0 | |
message | 是 | String | 返回消息 | ||
returnObj | 是 | Object | 返回对象 | returnObj |
表 returnObj
参数 | 是否必填 | 参数类型 | 说明 | 示例 | 下级对象 |
---|---|---|---|---|---|
fingerprint | 是 | String | 执行sql模板 | ||
sample | 是 | String | 执行sql | ||
userMax | 是 | String | 系统用户 | ||
tsMin | 是 | Date | 首次出现时间 | ||
tsMax | 是 | Date | 最近出现时间 | ||
tsCnt | 是 | Float | 查询次数 | ||
host | 是 | String | 主机IP | ||
slowquerylogfileMax | 是 | String | 慢日志路径 | ||
rowsExaminedMax | 是 | Float | 参加运算的记录总行数 | ||
rowsSentMax | 是 | Float | 结果最大记录数 | ||
lockTimeMax | 是 | Float | 锁等待时间最大 | ||
queryTimeMin | 是 | Float | 查询最小时间 | ||
firstSeen | 是 | Long | 首次出现时间戳 | ||
checksumBig | 是 | BigDecimal | sql校验值 | ||
resId | 是 | Integer | 资源id | ||
port | 是 | String | 端口 | ||
queryTimeMax | 是 | Float | 查询最大时间 |
请求示例
请求头header
无
请求体body
无
响应示例
{
"statusCode": 0,
"message": "SUCCESS",
"returnObj": [{
"lockTimeMax": 0.000135,
"userMax": "RDS_agent",
"queryTimeMin": 0.058583,
"firstSeen": 1657271692000,
"checksumBig": 13033281393153367040,
"tsMin": 1657271692000,
"resId": 5,
"sample": "SELECT\n CONCAT(table_schema, '/', table_name), engine\nFROM information_schema.tables\nWHERE engine NOT IN (\n 'MyISAM', 'InnoDB', 'CSV', 'MRG_MYISAM'\n)\nAND table_schema NOT IN (\n 'performance_schema', 'information_schema', 'mysql'\n)",
"port": "9095",
"queryTimeMax": 0.058583,
"fingerprint": "select concat(table_schema, ?, table_name), engine from information_schema.tables where engine not in(?+) and table_schema not in(?+)",
"host": "192.168.203.131",
"rowsSentMax": 0.0,
"slowquerylogfileMax": "/tmp/_teledb_mysqldata_mysql_data9095_logs_slow.log",
"rowsExaminedMax": 103.0,
"tsCnt": 998.0,
"tsMax": 1657271692000
}]
}
状态码
状态码 | 描述 |
---|---|
0 | 请求响应成功 |
错误码
错误码 | 描述 |
---|---|
2001 | 参数异常,失败原因见message |
3001 | 业务异常,失败原因见message |
5001 | 请求响应失败,失败原因见message |