You can call the DescribeSlowLogTrend operation to query slow log trends.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
clickhouse:DescribeSlowLogTrend |
none |
*EnterpriseDBCluster
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| RegionId |
string |
No |
The region ID. |
cn-hangzhou |
| DBInstanceId |
string |
Yes |
The cluster ID. |
cc-bp100p4q1g9z3**** |
| StartTime |
string |
No |
The start time of the query. The time is in the yyyy-MM-dd hh:mm:ss format. The time is in UTC. |
2023-04-13 17:48:00 |
| EndTime |
string |
No |
The end time of the query. The time is in the yyyy-MM-dd hh:mm:ss format. The time is in UTC. |
2023-06-07 10:03:00 |
| QueryDurationMs |
string |
No |
The execution duration of a slow SQL query, in milliseconds. The minimum value is 1000. |
3000 |
| Product |
string |
No |
The product code. |
clickhouse |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
The request ID. |
7D3ECB0E-98CA-5E08-A9CA-F70C5A1E9BDF |
| Data |
object |
The response data. |
|
| DBInstanceID |
integer |
The cluster ID. |
cc-bp100p4q1g9z3**** |
| DBInstanceName |
string |
The cluster name. |
集群测试 |
| ResultSet |
array<object> |
The result set. |
|
|
object |
The result set. |
||
| QueryStartTime |
string |
The start time of the query. The time is in the yyyy-MM-dd hh:mm:ss format. The time is in UTC. |
2023-04-13 17:48:00 |
| MaxQueryDurationMs |
integer |
The maximum execution duration of a slow SQL query, in milliseconds. The minimum value is 1000. |
3000 |
| Cnt |
integer |
The total number of SQL queries in the specified time range. |
1 |
| MinQueryDurationMs |
integer |
The minimum execution duration of a slow SQL query, in milliseconds. The minimum value is 1000. |
1000 |
| AvgQueryDurationMs |
integer |
The average execution duration of a slow SQL query, in milliseconds. The minimum value is 1000. |
2000 |
Examples
Success response
JSON format
{
"RequestId": "7D3ECB0E-98CA-5E08-A9CA-F70C5A1E9BDF",
"Data": {
"DBInstanceID": 0,
"DBInstanceName": "集群测试",
"ResultSet": [
{
"QueryStartTime": "2023-04-13 17:48:00",
"MaxQueryDurationMs": 3000,
"Cnt": 1,
"MinQueryDurationMs": 1000,
"AvgQueryDurationMs": 2000
}
]
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.