获取慢SQL表中的列
更新时间:2023-08-22
接口说明
获取慢SQL表中的列
请求结构
Plain Text
1GET /v{version}/instance/{instanceId}/smartdba/slowsql/{sqlId}/{schema}/{table} HTTP/1.1
2HOST: rds.bj.baidubce.com
3Content-Type: application/json
4Authorization: authorization string
请求头域
除公共头域外,无其它特殊头域。
请求参数
参数名称 | 类型 | 是否必选 | 参数位置 | 描述 |
---|---|---|---|---|
version | String | 是 | URL参数 | API 版本号 |
instanceId | String | 是 | URL参数 | 实例ID |
sqlId | String | 是 | URL参数 | SQL标识ID |
schema | String | 是 | URL参数 | 指定数据库 |
table | String | 是 | URL参数 | 指定表 |
返回头域
除公共头域,无其它特殊头域。
返回参数
参数名称 | 类型 | 描述 |
---|---|---|
list | List Array | SQL记录的列表 |
Array字段数据结构说明
参数名称 | 类型 | 描述 |
---|---|---|
charset | String | 字符集 |
collation | String | 排序规则名称 |
column | String | 列的名称 |
comment | String | 列定义中包含的注释 |
defaultValue | String | 列的默认值 |
extra | String | 关于给定列的任何其他可用信息 |
key | String | 列是否被索引。可以是PRI、UNI、MUL |
nullable | String | 列的可空性 |
position | Long | 列在表中的位置 |
schema | String | 数据库名称 |
table | String | 表名 |
type | Long | 列数据类型 |
请求示例
Plain Text
1GET /v1/instance/rds-xXE6pdR1/smartdba/slowsql/a23310a5-432d-433d-86ae-b00b1f9b4f3a/db1/tb1 HTTP/1.1
2HOST: rds.bj.baidubce.com
3Content-Type: application/json
4Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2017-11-21T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de
返回示例
Plain Text
1{
2 "list": [
3 {
4 "schema": "db1",
5 "table": "tb1",
6 "charset": "",
7 "collation": "",
8 "column": "id",
9 "comment": "",
10 "defaultValue": "",
11 "extra": "",
12 "key": "PRI",
13 "nullable": "NO",
14 "position": 1,
15 "type": "int(11)"
16 }
17 ]
18}