获取慢SQL表中的列
所有文档
menu

云数据库 RDS

获取慢SQL表中的列

接口说明

获取慢SQL表中的列

请求结构

GET /v{version}/instance/{instanceId}/smartdba/slowsql/{sqlId}/{schema}/{table} HTTP/1.1
HOST: rds.bj.baidubce.com
Content-Type: application/json
Authorization: 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 列数据类型

请求示例

GET /v1/instance/rds-xXE6pdR1/smartdba/slowsql/a23310a5-432d-433d-86ae-b00b1f9b4f3a/db1/tb1  HTTP/1.1
HOST: rds.bj.baidubce.com
Content-Type: application/json
Authorization: bce-auth-v1/f81d3b34e48048fbb2634dc7882d7e21/2017-11-21T04:17:29Z/3600/host/74c506f68c65e26c633bfa104c863fffac5190fdec1ec24b7c03eb5d67d2e1de

返回示例

{
    "list": [
        {
            "schema": "db1",
            "table": "tb1",
            "charset": "",
            "collation": "",
            "column": "id",
            "comment": "",
            "defaultValue": "",
            "extra": "",
            "key": "PRI",
            "nullable": "NO",
            "position": 1,
            "type": "int(11)"
        }
    ]
}
上一篇
获取慢SQL中的表
下一篇
获取慢SQL表中的索引