Asynchronously retrieves the slow log trend data of an instance.
Operation description
Before you call this operation, make sure that you fully understand the billing methods and pricing of DAS.
The following prerequisites must be met to call this operation:
The instance must have DAS Enterprise Edition or the smart operations and maintenance (O&M) service enabled. The smart O&M service is not yet published.
Use the latest version of the Alibaba Cloud SDK or the DAS SDK.
When you use an SDK to call the DAS service, set the region to cn-shanghai.
This is an asynchronous operation. A complete result is not returned immediately. If the isFinish parameter in the response is false, wait 1 second and call the operation again. Repeat the call until the isFinish parameter is true, at which point the complete result is returned.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
hdm:DescribeSlowLogHistogramAsync |
get |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
The ID of the database instance. |
rm-2ze8g2am97624**** |
| NodeId |
string |
No |
The node ID. Note
For PolarDB for MySQL instances, you must provide the node ID. |
r-****-db-0 |
| StartTime |
integer |
Yes |
The start time of the query. Specify the time as a UNIX timestamp. Unit: milliseconds. |
1596177993000 |
| EndTime |
integer |
Yes |
The end time of the query. Specify the time as a UNIX timestamp. Unit: milliseconds. Note
The end time of the query must be later than the start time. |
1662518540764 |
| Filters |
array<object> |
No |
A list of query filter conditions. |
|
|
object |
No |
The following parameters are supported for Key: hostAddress: The source address. To specify multiple addresses, separate them with commas. sqlId: The SQL ID. To specify multiple IDs, separate them with commas. user: The user. To specify multiple users, separate them with commas. dbName: The database. To specify multiple databases, separate them with commas. |
||
| Key |
string |
No |
The filter parameter. |
None |
| Value |
string |
No |
The value of the filter parameter. |
None |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| Code |
string |
The returned status code. |
200 |
| Message |
string |
The message returned for the request. Note
This parameter returns Successful if the request is successful. If the request fails, it returns an error message, such as an error code. |
Successful |
| RequestId |
string |
The request ID. |
B6D17591-B48B-4D31-9CD6-9B9796B2**** |
| Success |
string |
Indicates whether the request was successful:
|
true |
| Data |
object |
AsyncResult<histogram>. |
|
| RequestKey |
string |
The key of the request parameter. |
无 |
| ResultId |
string |
The result ID. |
async__20ee808e72257f16a4fe024057ca**** |
| State |
string |
The current status:
|
SUCCESS |
| IsFinish |
boolean |
Indicates whether the task is complete. |
true |
| Data |
object |
The data. |
|
| Total |
integer |
The total number of records returned. |
1 |
| Count |
array |
The trend of the number of slow query logs. |
|
|
integer |
The number of slow query logs. |
100 |
|
| Ts |
array |
This parameter is used only by relational databases. |
|
|
integer |
The time when the first event occurred, which is a UNIX timestamp. Unit: milliseconds. |
[ 1735098480000, 1735098540000, 1735098600000, 1735098660000, 1735098720000, 1735098780000 ] |
|
| TsEnd |
array |
This parameter is reserved. |
|
|
integer |
The end timestamp of the query. |
暂无 |
|
| Item |
array<object> |
The trend metrics. |
|
|
array<object> |
The name of the item. |
||
| NodeId |
string |
The node ID. |
r-bp1hi0wg57s3n0i3n8-db-0 |
| Count |
array |
The number of slow query logs. |
|
|
integer |
The number of slow query logs. |
100 |
|
| InsItems |
array<object> |
The trend metrics. Note
This parameter is supported only for ApsaraDB for MongoDB instances. |
|
|
object |
The trend metrics. Note
This parameter is supported only for ApsaraDB for MongoDB instances. |
||
| InsId |
string |
The ID of the instance role. Note
This parameter is supported only for ApsaraDB for MongoDB instances. |
2492 |
| InsRole |
string |
The instance role. Note
This parameter is supported only for ApsaraDB for MongoDB instances. |
userAdmin |
| Count |
array |
The number of executions. |
|
|
integer |
The number of executions. |
1 |
|
| TotalCount |
integer |
||
| TotalCount |
integer |
||
| InsRole |
string |
||
| Rt |
array |
The total execution duration. Unit: seconds. |
|
|
number |
The total execution duration. Unit: seconds. |
[ 2.306, 1.141, 0.0, 4.538, 1.247, 1.972 ] |
|
| AvgRt |
array |
The average execution duration. |
|
|
number |
The average execution duration. |
[ 1.593, 2.306, 1.141, 0.0, 1.5127, 1.247 ] |
|
| MaxRt |
array |
The maximum execution duration. Unit: seconds. |
|
|
number |
The maximum execution duration. Unit: seconds. |
[ 1.593, 2.306, 1.141, 14.115 0.0, 1.972 ] |
|
| LockTime |
array |
The total lock wait duration. Unit: seconds. |
|
|
number |
The total lock wait duration. Unit: seconds. |
[ 1.051, 1.007, 0.0, 0.755, 0.096, 0.0 ] |
|
| AvgLockTime |
array |
The average lock wait duration. Unit: seconds. |
|
|
number |
The average lock wait duration. Unit: seconds. |
[ 1.051, 0.0, 0.3357, 0.755, 0.324, 0.814 ] |
|
| MaxLockTime |
array |
The maximum lock wait duration. Unit: seconds. |
|
|
number |
The maximum lock wait duration. Unit: seconds. |
[ 1.051, 1.007, 0.755, 0.0, 0.05, 0.656 ] |
|
| RowsExamined |
array |
The total number of scanned rows. Note
This parameter is supported by the following database engines: ApsaraDB RDS for MySQL, ApsaraDB RDS for PostgreSQL, and PolarDB for MySQL. |
|
|
integer |
The total number of scanned rows. Note
This parameter is supported by the following database engines: ApsaraDB RDS for MySQL, ApsaraDB RDS for PostgreSQL, and PolarDB for MySQL. |
[ 256, 1, 512, 0, 1476678, 24430 ] |
|
| AvgRowsExamined |
array |
The average number of scanned rows. |
|
|
number |
The average number of scanned rows. |
[ 256.0, 256.3333, 512.0, 370860.1111, 0.0, 1.0 ] |
|
| MaxRowsExamined |
array |
The maximum number of scanned rows. |
|
|
integer |
The maximum number of scanned rows. |
[ 256, 1, 512, 0, 1476678, 24430 ] |
|
| RowsSent |
array |
The number of returned rows. |
|
|
integer |
The number of returned rows. |
[ 384, 256, 0, 207030, 4, 256 ] |
|
| AvgRowsSent |
array |
The average number of returned rows. |
|
|
number |
The average number of returned rows. |
[ 128.0, 0.0, 256.0, 25878.75, 192.0, 72.7778 ] |
|
| MaxRowsSent |
array |
The maximum number of returned rows. |
|
|
integer |
The maximum number of returned rows. |
[ 256, 207023, 0, 128, 0, 0 ] |
|
| KeysExamined |
array |
The number of scanned index rows. Note
This parameter is supported only for ApsaraDB for MongoDB instances. |
|
|
integer |
The number of scanned index rows. Note
This parameter is supported only for ApsaraDB for MongoDB instances. |
[ 384, 256, 0, 207030, 4, 256 ] |
|
| AvgKeysExamined |
array |
The average number of scanned index rows. Note
This parameter is supported only for ApsaraDB for MongoDB instances. |
|
|
number |
The average number of scanned index rows. Note
This parameter is supported only for ApsaraDB for MongoDB instances. |
[ 128.0, 0.0, 256.0, 25878.75, 192.0, 72.7778 ] |
|
| MaxKeysExamined |
array |
The maximum number of scanned index rows. Note
This parameter is supported only for ApsaraDB for MongoDB instances. |
|
|
integer |
The maximum number of scanned index rows. Note
This parameter is supported only for ApsaraDB for MongoDB instances. |
[ 384, 256, 0, 207030, 4, 256 ] |
|
| DocExamined |
array |
The number of scanned documents. Note
This parameter is supported only for ApsaraDB for MongoDB instances. |
|
|
integer |
The number of scanned documents. Note
This parameter is supported only for ApsaraDB for MongoDB instances. |
[ 256, 207023, 0, 128, 0, 0 ] |
|
| AvgDocExamined |
array |
The average number of scanned documents. Note
This parameter is supported only for ApsaraDB for MongoDB instances. |
|
|
number |
The average number of scanned documents. Note
This parameter is supported only for ApsaraDB for MongoDB instances. |
[ 128.0, 0.0, 256.0, 25878.75, 192.0, 72.7778 ] |
|
| MaxDocExamined |
array |
The maximum number of scanned documents. Note
This parameter is supported only for ApsaraDB for MongoDB instances. |
|
|
integer |
The maximum number of scanned documents. Note
This parameter is supported only for ApsaraDB for MongoDB instances. |
[ 256, 207023, 0, 128, 0, 0 ] |
|
| ReturnNum |
array |
The number of returned rows. Note
This parameter is supported only for ApsaraDB for MongoDB instances. |
|
|
integer |
The number of returned rows. Note
This parameter is supported only for ApsaraDB for MongoDB instances. |
[ 256, 207023, 0, 128, 0, 0 ] |
|
| AvgReturnNum |
array |
The average number of returned rows. Note
This parameter is supported only for ApsaraDB for MongoDB instances. |
|
|
number |
The average number of returned rows Note
This parameter is supported only for ApsaraDB for MongoDB instances. |
[ 128.0, 0.0, 256.0, 25878.75, 192.0, 72.7778 ] |
|
| MaxReturnNum |
array |
The maximum number of returned rows. Note
This parameter is supported only for ApsaraDB for MongoDB instances. |
|
|
integer |
The maximum number of returned rows. Note
This parameter is supported only for ApsaraDB for MongoDB instances. |
[ 256, 207023, 0, 128, 0, 0 ] |
|
| IOWrites |
array |
The number of I/O writes. Note
This parameter is supported only for ApsaraDB RDS for SQL Server instances. |
|
|
integer |
The number of I/O writes. Note
This parameter is supported only for ApsaraDB RDS for SQL Server instances. |
[ 256, 207023, 0, 128, 0, 0 ] |
|
| AvgIOWrites |
array |
The average number of I/O writes. Note
This parameter is supported only for ApsaraDB RDS for SQL Server instances. |
|
|
number |
The average number of I/O writes. Note
This parameter is supported only for ApsaraDB RDS for SQL Server instances. |
[ 384, 256, 0, 207030, 4, 256 ] |
|
| MaxIOWrites |
array |
The maximum number of I/O writes. Note
This parameter is supported only for ApsaraDB RDS for SQL Server instances. |
|
|
integer |
The maximum number of I/O writes. Note
This parameter is supported only for ApsaraDB RDS for SQL Server instances. |
[ 256, 1, 512, 0, 1476678, 24430 ] |
|
| LastRowsCountAffected |
array |
The number of rows affected by the last statement. Note
This parameter is supported only for ApsaraDB RDS for SQL Server instances. |
|
|
integer |
The number of rows affected by the last statement. Note
This parameter is supported only for ApsaraDB RDS for SQL Server instances. |
[ 256, 207023, 0, 128, 0, 0 ] |
|
| AvgLastRowsCountAffected |
array |
The average number of rows affected by the last statement. Note
This parameter is supported only for ApsaraDB RDS for SQL Server instances. |
|
|
number |
The average number of rows affected by the last statement. Note
This parameter is supported only for ApsaraDB RDS for SQL Server instances. |
[ 1.593, 2.306, 1.141, 0.0, 1.5127, 1.247 ] |
|
| MaxLastRowsCountAffected |
array |
The maximum number of rows affected by the last statement. Note
This parameter is supported only for ApsaraDB RDS for SQL Server instances. |
|
|
integer |
The maximum number of rows affected by the last statement. Note
This parameter is supported only for ApsaraDB RDS for SQL Server instances. |
[ 1, 1, 3, 1, 2, 3 ] |
|
| LogicalIOReads |
array |
The number of logical reads. Note
This parameter is supported only for ApsaraDB RDS for SQL Server instances. |
|
|
integer |
The number of logical reads. Note
This parameter is supported only for ApsaraDB RDS for SQL Server instances. |
[ 384, 256, 0, 207030, 4, 256 ] |
|
| AvgLogicalIOReads |
array |
The average number of logical reads. Note
This parameter is supported only for ApsaraDB RDS for SQL Server instances. |
|
|
number |
The average number of logical reads. Note
This parameter is supported only for ApsaraDB RDS for SQL Server instances. |
[ 1.593, 2.306, 1.141, 0.0, 1.5127, 1.247 ] |
|
| MaxLogicalIOReads |
array |
The maximum number of logical reads. Note
This parameter is supported only for ApsaraDB RDS for SQL Server instances. |
|
|
integer |
The maximum number of logical reads. Note
This parameter is supported only for ApsaraDB RDS for SQL Server instances. |
[ 124, 2, 24, 251, 191, 721 ] |
|
| PhysicalIOReads |
array |
The number of physical reads. Note
This parameter is supported only for ApsaraDB RDS for SQL Server instances. |
|
|
integer |
The number of physical reads. Note
This parameter is supported only for ApsaraDB RDS for SQL Server instances. |
[ 324, 22, 254, 251, 191, 721 ] |
|
| AvgPhysicalIOReads |
array |
The average number of physical reads. Note
This parameter is supported only for ApsaraDB RDS for SQL Server instances. |
|
|
number |
The average number of physical reads. Note
This parameter is supported only for ApsaraDB RDS for SQL Server instances. |
[ 128.0, 0.0, 256.0, 25878.75, 192.0, 72.7778 ] |
|
| MaxPhysicalIOReads |
array |
The maximum number of physical reads. Note
This parameter is supported only for ApsaraDB RDS for SQL Server instances. |
|
|
integer |
The maximum number of physical reads. Note
This parameter is supported only for ApsaraDB RDS for SQL Server instances. |
[ 314, 242, 114, 351, 191, 721 ] |
|
| RowsCountAffected |
array |
The number of affected rows. Note
This parameter is supported only for ApsaraDB RDS for SQL Server instances. |
|
|
integer |
The number of affected rows. Note
This parameter is supported only for ApsaraDB RDS for SQL Server instances. |
[ 34, 42, 14, 51, 91, 71 ] |
|
| AvgRowsCountAffected |
array |
The average number of affected rows. Note
This parameter is supported only for ApsaraDB RDS for SQL Server instances. |
|
|
number |
The average number of affected rows. Note
This parameter is supported only for ApsaraDB RDS for SQL Server instances. |
[ 1.593, 2.306, 1.141, 14.115, 0.0, 1.783, 0.0, 1.972 ] |
|
| MaxRowsCountAffected |
array |
The maximum number of affected rows. Note
This parameter is supported only for ApsaraDB RDS for SQL Server instances. |
|
|
integer |
The maximum number of affected rows. Note
This parameter is supported only for ApsaraDB RDS for SQL Server instances. |
[ 714, 442, 314, 151, 291, 521 ] |
|
| CPUTime |
array |
The CPU time. Unit: seconds (s). Note
This parameter is supported only for ApsaraDB RDS for SQL Server instances. |
|
|
number |
The CPU time. Unit: seconds (s). Note
This parameter is supported only for ApsaraDB RDS for SQL Server instances. |
[ 1.051, 1.007, 0.755, 0.0, 0.05, 0.656 ] |
|
| AvgCPUTime |
array |
The average CPU time. Unit: seconds (s). Note
This parameter is supported only for ApsaraDB RDS for SQL Server instances. |
|
|
number |
The average CPU time. Unit: seconds (s). Note
This parameter is supported only for ApsaraDB RDS for SQL Server instances. |
[ 2.306, 1.141, 0.0, 4.538, 1.247, 0.0 ] |
|
| MaxCPUTime |
array |
The maximum CPU time. Unit: seconds (s). Note
This parameter is supported only for ApsaraDB RDS for SQL Server instances. |
|
|
number |
The maximum CPU time. Unit: seconds (s). Note
This parameter is supported only for ApsaraDB RDS for SQL Server instances. |
[ 2.306, 1.141, 0.0, 4.538, 1.247, 0.0 ] |
|
| Rows |
array |
||
|
integer |
|||
| AvgRows |
array |
||
|
number |
|||
| MaxRows |
array |
||
|
integer |
|||
| Frows |
array |
||
|
integer |
|||
| AvgFrows |
array |
||
|
number |
|||
| MaxFrows |
array |
||
|
integer |
|||
| Scnt |
array |
||
|
integer |
|||
| AvgScnt |
array |
||
|
number |
|||
| MaxScnt |
array |
||
|
integer |
|||
| TotalCount |
integer |
||
| ErrorCode |
integer |
The error code. |
10910 |
| Message |
string |
The error message. |
Successful |
| Timestamp |
integer |
The time of the request. |
1645668213000 |
Examples
Success response
JSON format
{
"Code": "200",
"Message": "Successful",
"RequestId": "B6D17591-B48B-4D31-9CD6-9B9796B2****",
"Success": "true",
"Data": {
"RequestKey": "无",
"ResultId": "async__20ee808e72257f16a4fe024057ca****",
"State": "SUCCESS",
"IsFinish": true,
"Data": {
"Total": 1,
"Count": [
100
],
"Ts": [
0
],
"TsEnd": [
0
],
"Item": [
{
"NodeId": "r-bp1hi0wg57s3n0i3n8-db-0",
"Count": [
100
],
"InsItems": [
{
"InsId": "2492",
"InsRole": "userAdmin",
"Count": [
1
],
"TotalCount": 0
}
],
"TotalCount": 0,
"InsRole": ""
}
],
"Rt": [
0
],
"AvgRt": [
0
],
"MaxRt": [
0
],
"LockTime": [
0
],
"AvgLockTime": [
0
],
"MaxLockTime": [
0
],
"RowsExamined": [
0
],
"AvgRowsExamined": [
0
],
"MaxRowsExamined": [
0
],
"RowsSent": [
0
],
"AvgRowsSent": [
0
],
"MaxRowsSent": [
0
],
"KeysExamined": [
0
],
"AvgKeysExamined": [
0
],
"MaxKeysExamined": [
0
],
"DocExamined": [
0
],
"AvgDocExamined": [
0
],
"MaxDocExamined": [
0
],
"ReturnNum": [
0
],
"AvgReturnNum": [
0
],
"MaxReturnNum": [
0
],
"IOWrites": [
0
],
"AvgIOWrites": [
0
],
"MaxIOWrites": [
0
],
"LastRowsCountAffected": [
0
],
"AvgLastRowsCountAffected": [
0
],
"MaxLastRowsCountAffected": [
0
],
"LogicalIOReads": [
0
],
"AvgLogicalIOReads": [
0
],
"MaxLogicalIOReads": [
0
],
"PhysicalIOReads": [
0
],
"AvgPhysicalIOReads": [
0
],
"MaxPhysicalIOReads": [
0
],
"RowsCountAffected": [
0
],
"AvgRowsCountAffected": [
0
],
"MaxRowsCountAffected": [
0
],
"CPUTime": [
0
],
"AvgCPUTime": [
0
],
"MaxCPUTime": [
0
],
"Rows": [
0
],
"AvgRows": [
0
],
"MaxRows": [
0
],
"Frows": [
0
],
"AvgFrows": [
0
],
"MaxFrows": [
0
],
"Scnt": [
0
],
"AvgScnt": [
0
],
"MaxScnt": [
0
],
"TotalCount": 0
},
"ErrorCode": 10910,
"Message": "Successful",
"Timestamp": 1645668213000
}
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParams | The request parameters are invalid. | |
| 403 | NoPermission | You are not authorized to do this action. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.