全部产品
Search
文档中心

云原生数据库 PolarDB:DescribeDrdsSlowSqls - 查看慢SQL

更新时间:Jul 10, 2026

查看DRDS慢SQL。

调试

您可以在OpenAPI Explorer中直接运行该接口,免去您计算签名的困扰。运行成功后,OpenAPI Explorer可以自动生成SDK代码示例。

授权信息

当前API暂无授权信息透出。

请求参数

名称类型必填描述示例值
DrdsInstanceIdstring

实例 ID。

drds***************
DbNamestring

数据库名称。

test_db
ExeTimelong

SQL 执行时间,单位为毫秒(ms)。

1000
StartTimelong

SQL 查询结束时间,格式为 Unix 时间戳,单位为毫秒(UTC 时间)。

1568269711000
EndTimelong

SQL 查询开始时间,格式为 Unix 时间戳,单位为毫秒(UTC 时间)。

1568267711000
PageNumberinteger

页数。

1
PageSizeinteger

每页记录数。

20

返回参数

名称类型描述示例值
object
PageSizeinteger

每页记录数。

20
PageNumberinteger

页数。

1
RequestIdstring

请求 ID。

509BDE17-505A-4B3B-854D-30D3F0******
Totalinteger

总记录数。

1
Successboolean

请求是否成功。

true
Itemsarray<object>

慢 SQL 详情。

Itemobject
SendTimelong

慢 SQL 发送时间,单位为毫秒(ms)。

1568267711
Hoststring

执行机器的 IP。

10.0.***.***
Sqlstring

慢 SQL 内容。

SELECT count(1) from payment_order where order_status = '08';
ResponseTimelong

响应时间,单位为毫秒(ms)。

1568267711
Schemastring

数据库名称。

user

示例

正常返回示例

JSON格式

{
  "PageSize": 20,
  "PageNumber": 1,
  "RequestId": "509BDE17-505A-4B3B-854D-30D3F0******",
  "Total": 1,
  "Success": true,
  "Items": {
    "Item": [
      {
        "SendTime": 1568267711,
        "Host": "10.0.***.***",
        "Sql": "SELECT   count(1) from   payment_order where   order_status = '08';",
        "ResponseTime": 1568267711,
        "Schema": "user"
      }
    ]
  }
}

错误码

HTTP status code错误码错误信息描述
400ActionUnauthorizedThe specified action is not available for you指定的action未授权,请您先做RAM授权再进行操作。
404InvalidDRDSInstanceId.NotFoundThe DrdsInstanceId provided does not exist in our records.-
404InvalidDbName.NotFoundThe Drds DbName provided does not exist in our records.-
500InternalErrorThe request processing has failed due to some unknown error.请求失败,内部错误

访问错误中心查看更多错误码。

变更历史

变更时间变更内容概要操作
2025-03-07OpenAPI 错误码发生变更、OpenAPI 入参发生变更查看变更详情