Queries the details of slow query logs for an AnalyticDB for MySQL cluster.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
adb:DescribeSlowLogRecords |
get |
*DBCluster
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| DBClusterId |
string |
Yes |
The ID of the AnalyticDB for MySQL Data Warehouse Edition (V3.0) cluster. Note
Call the DescribeDBClusters operation to query the IDs of all AnalyticDB for MySQL Data Warehouse Edition (V3.0) clusters in the destination region. |
am-bp1rqvm70uh2**** |
| StartTime |
string |
Yes |
The start of the time range to query. Specify the time in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. |
2021-05-20T16:00:00Z |
| EndTime |
string |
Yes |
The end of the time range to query. Specify the time in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC. Note
The end time must be later than the start time. The time range between the start time and the end time cannot exceed 7 days. |
2021-05-27T16:00:00Z |
| DBName |
string |
No |
The name of the database. |
adb_demo |
| PageSize |
integer |
No |
The number of entries to return on each page. Valid values: 30 (default), 50, and 100. |
30 |
| PageNumber |
integer |
No |
The page number. The value must be an integer that is greater than 0. Default value: 1. |
1 |
| ProcessID |
string |
No |
The process ID. |
2021052716044317201616624903453****** |
| Order |
string |
No |
The sorting order of the results. The value is an ordered JSON array. The results are sorted in the order of the objects in the array. Each object contains the
|
[{"Field":"ExecutionStartTime","Type":"Desc"},{"Field":"ScanRows","Type":"Asc"}] |
| Range |
string |
No |
Filters the results by a specified range based on the maximum ( The
Note
|
[{"Field":"ScanSize","Min":"1000000","Max":"10000000"},{"Field":"QueryTime","Min":"1000","Max":"10000"}] |
| State |
string |
No |
The query state. Valid values:
|
Successed |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The list of parameters. |
||
| TotalCount |
string |
The total number of entries. |
100 |
| PageSize |
string |
The number of entries on the current page. |
30 |
| RequestId |
string |
The request ID. |
D7559209-7EC3-41E1-8F78-156990****** |
| PageNumber |
string |
The page number. |
1 |
| DBClusterId |
string |
The ID of the AnalyticDB for MySQL Data Warehouse Edition (V3.0) cluster. |
am-bp1rqvm70uh2**** |
| Items |
object |
||
| SlowLogRecord |
array<object> |
The list of slow query log details. |
|
|
object |
The list of parameters. |
||
| HostAddress |
string |
The IP address of the client that is used to connect to the database. |
172.16.**.** |
| ScanTime |
integer |
The total time consumed to scan data. This value is the sum of the time consumed by the TableScanNode tasks on all nodes. Unit: milliseconds (ms). |
10 |
| SQLText |
string |
The details of the SQL statement. |
INSERT OVERWRITE INTO hdfs_import_external\nSELECT *\nFROM adb_hdfs_import_source |
| OutputSize |
string |
The amount of output data generated by the task. Unit: bytes. |
0.009 |
| PeakMemoryUsage |
string |
The peak memory usage for executing the SQL statement. Unit: KB. |
431.447 |
| State |
string |
The execution state of the SQL statement. |
SUCCESSED |
| WallTime |
integer |
The total CPU time consumed by all operators in the query on all nodes. Unit: milliseconds (ms). |
6100 |
| ScanSize |
string |
The amount of scanned data. Unit: KB. |
0.035 |
| ExecutionStartTime |
string |
The start time of the execution. The time is in the yyyy-MM-ddTHH:mm:ssZ format. The time is displayed in UTC. |
2021-05-27T08:04:43Z |
| QueryTime |
integer |
The execution duration of the SQL statement. Unit: milliseconds (ms). |
2344 |
| ReturnRowCounts |
integer |
The number of rows returned. |
1 |
| ScanRows |
integer |
The number of rows scanned from the data source. |
3 |
| ParseRowCounts |
integer |
The number of rows parsed. |
0 |
| DBName |
string |
The name of the database. |
adb_demo |
| PlanningTime |
integer |
The time consumed to generate the execution plan. Unit: milliseconds (ms). |
12 |
| QueueTime |
integer |
The amount of time that the query waited in a queue before execution. Unit: milliseconds (ms). |
0 |
| UserName |
string |
The username. |
test |
| ProcessID |
string |
The process ID. |
2021052716044317201616624903453****** |
Examples
Success response
JSON format
{
"TotalCount": "100",
"PageSize": "30",
"RequestId": "D7559209-7EC3-41E1-8F78-156990******",
"PageNumber": "1",
"DBClusterId": "am-bp1rqvm70uh2****",
"Items": {
"SlowLogRecord": [
{
"HostAddress": "172.16.**.**",
"ScanTime": 10,
"SQLText": "INSERT OVERWRITE INTO hdfs_import_external\\nSELECT *\\nFROM adb_hdfs_import_source",
"OutputSize": "0.009",
"PeakMemoryUsage": "431.447",
"State": "SUCCESSED",
"WallTime": 6100,
"ScanSize": "0.035",
"ExecutionStartTime": "2021-05-27T08:04:43Z",
"QueryTime": 2344,
"ReturnRowCounts": 1,
"ScanRows": 3,
"ParseRowCounts": 0,
"DBName": "adb_demo",
"PlanningTime": 12,
"QueueTime": 0,
"UserName": "test",
"ProcessID": "2021052716044317201616624903453******"
}
]
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 404 | InvalidDBCluster.NotFound | The DBClusterId provided does not exist in our records. | The specified DBClusterId parameter does not exist. Make sure that the DBClusterId value is valid. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.