Queries a slow SQL query.
Debugging
Request parameters
Parameter | Type | Required | Example | Description |
---|---|---|---|---|
Action | String | Yes | DescribeDrdsSlowSqls |
The operation that you want to perform. Set the value to DescribeDrdsSlowSqls. |
DbName | String | Yes | test_db |
The name of the database. |
DrdsInstanceId | String | Yes | drds*************** |
The ID of the PolarDB-X 1.0 instance. |
EndTime | Long | Yes | 1568267711000 |
The start time of the SQL query. Specify the time in the UNIX timestamp format. The time must be in UTC. Unit: ms. |
ExeTime | Long | Yes | 1000 |
The SQL execution time. Unit: ms. |
StartTime | Long | Yes | 1568269711000 |
The end time of the SQL query. Specify the time in the UNIX timestamp format. The time must be in UTC. Unit: ms. |
PageNumber | Integer | No | 1 |
The number of the page to return. |
PageSize | Integer | No | 20 |
The number of entries to return on each page. |
Response parameters
Parameter | Type | Example | Description |
---|---|---|---|
Items | Array of Item |
Indicates the details of the slow SQL query. |
|
Item | |||
Host | String | 10.0.***.*** |
Indicates the IP address of the execution machine. |
ResponseTime | Long | 1568267711 |
Indicates the response time. Unit: ms. |
Schema | String | user |
Indicates the name of the database. |
SendTime | Long | 1568267711 |
Indicates the time when the slow SQL query was sent. Unit: ms. |
Sql | String | SELECT count(1) from payment_order where order_status = '08'; |
Indicates the content of the slow SQL query. |
PageNumber | Integer | 1 |
Indicates the page number of the returned page. |
PageSize | Integer | 20 |
Indicates the number of entries returned on each page. |
RequestId | String | 509BDE17-505A-4B3B-854D-30D3F0****** |
Indicates the ID of the request. |
Success | Boolean | true |
Indicates whether the request is successful. |
Total | Integer | 1 |
Indicates the total number of entries. |
Examples
Sample requests
http(s)://drds.cn-hangzhou.aliyuncs.com/?Action=DescribeDrdsSlowSqls
&DbName=test_db
&DrdsInstanceId=drds***************
&EndTime=1568267711000
&ExeTime=1000
&StartTime=1568269711000
&<Common request parameters>
Sample success responses
XML
format
<DescribeDrdsSlowSqlsReponse>
<RequestId>509BDE17-505A-4B3B-854D-30D3F0******</RequestId>
<PageSize>20</PageSize>
<PageNumber>1</PageNumber>
<Total>1</Total>
<Items>
<Item>
<SendTime>1568267711</SendTime>
<Schema>user</Schema>
<ResponseTime>1568267711</ResponseTime>
<Host>10.0.***.***</Host>
<Sql>SELECT count(1) from payment_order where order_status = '08';</Sql>
</Item>
</Items>
<Success>true</Success>
</DescribeDrdsSlowSqlsReponse>
JSON
format
{
"DescribeDrdsSlowSqlsReponse": {
"RequestId": "509BDE17-505A-4B3B-854D-30D3F0******",
"PageSize": 20,
"PageNumber": 1,
"Total": 1,
"Items": {
"Item": {
"SendTime": 1568267711,
"Schema": "user",
"ResponseTime": 1568267711,
"Host": "10.0.***.***",
"Sql": "SELECT count(1) from payment_order where order_status = '08';"
}
},
"Success": true
}
}
Error codes
HttpCode | Error code | Error message | Description |
---|---|---|---|
400 | ActionUnauthorized | The specified action is not available for you | The error message returned because you are not granted permissions to perform this operation. Grant the required permissions to the Resource Access Management (RAM) user that you want to use to perform this operation. |
For a list of error codes, visit the API Error Center.