The DescribeSlowLogRecords operation queries the details of slow query logs.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
clickhouse:DescribeSlowLogRecords |
list |
*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 of the time range to query. The time is in the yyyy-MM-dd hh:mm:ss format and is displayed in UTC. |
2023-09-11 16:00:00 |
| EndTime |
string |
No |
The end of the time range to query. The time is in the yyyy-MM-dd hh:mm:ss format and is displayed in UTC. |
2023-09-15 16:00:00 |
| QueryDurationMs |
string |
No |
The execution duration of the slow query. The minimum value is 1000. The unit is milliseconds. |
3000 |
| PageSize |
integer |
No |
The number of entries to return on each page. Valid values:
|
30 |
| PageNumber |
integer |
No |
The page number. |
1 |
| ComputingGroupId |
string |
No |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
Schema of Response |
||
| RequestId |
string |
The request ID. |
DF203CC8-5F68-5E3F-8050-3C77DD65731A |
| Data |
object |
The returned data. |
|
| DBInstanceID |
integer |
The cluster ID. |
cc-bp100p4q1g9z32**** |
| DBInstanceName |
string |
The cluster name. |
集群测试 |
| TotalCount |
integer |
The total number of entries. |
1 |
| 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 and is displayed in UTC. |
2023-09-11 16:00:00 |
| InitialQueryId |
string |
The query ID. |
'ae915a3ad30e77e67a7215d05b658cc6' |
| ReadRows |
integer |
The number of rows read. |
10 |
| InitialAddress |
string |
The source address of the query. |
0:0:0:0:0:ffff:1edd65ea |
| Query |
string |
The queried statement. |
select * from test |
| MemoryUsage |
integer |
The peak memory usage for the query. Unit: bytes. |
4941696 |
| Type |
string |
The type of the slow query log. |
ExceptionWhileProcessing |
| ReadBytes |
integer |
The size of the scanned data. Unit: bytes. |
4507128020832 |
| InitialUser |
string |
The user who initiated the query. |
bany |
| QueryDurationMs |
integer |
The execution duration of the slow query. The minimum value is 1000. The unit is milliseconds. |
3000 |
| ResultBytes |
integer |
The size of the result data. Unit: bytes. |
10 |
Examples
Success response
JSON format
{
"RequestId": "DF203CC8-5F68-5E3F-8050-3C77DD65731A",
"Data": {
"DBInstanceID": 0,
"DBInstanceName": "集群测试",
"TotalCount": 1,
"ResultSet": [
{
"QueryStartTime": "2023-09-11 16:00:00",
"InitialQueryId": "'ae915a3ad30e77e67a7215d05b658cc6'",
"ReadRows": 10,
"InitialAddress": "0:0:0:0:0:ffff:1edd65ea",
"Query": "select * from test",
"MemoryUsage": 4941696,
"Type": "ExceptionWhileProcessing",
"ReadBytes": 4507128020832,
"InitialUser": "bany",
"QueryDurationMs": 3000,
"ResultBytes": 10
}
]
}
}
Error codes
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.