Mengambil data tren log kueri lambat instans secara asinkron.
Deskripsi operasi
Before you call this operation, make sure that you understand the billing methods and pricing of DAS.
The following prerequisites must be met:
-
You must enable DAS Enterprise Edition or the smart operations and maintenance (O&M) service for the instance. 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. Then, the complete result is returned.
Coba sekarang
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
hdm:DescribeSlowLogHistogramAsync |
get |
*全部资源
|
None | None |
Parameter permintaan
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
ID Instansiasi basis data. |
rm-2ze8g2am97624**** |
| NodeId |
string |
No |
ID node. Catatan
Untuk instans PolarDB Basis Data Relasional Cloud-Native for MySQL, Anda harus menentukan ID node. |
r-****-db-0 |
| StartTime |
integer |
Yes |
Awal rentang pengatur waktu yang akan dikueri. Tentukan pengatur waktu sebagai Stempel waktu UNIX dalam milidetik. |
1596177993000 |
| EndTime |
integer |
Yes |
Akhir rentang pengatur waktu yang akan dikueri. Tentukan pengatur waktu sebagai Stempel waktu UNIX dalam milidetik. Catatan
Pengatur waktu akhir harus lebih lambat dari pengatur waktu mulai. |
1662518540764 |
| Filters |
array<object> |
No |
Daftar kondisi filter kueri. |
|
|
object |
No |
The following values are supported for the Key parameter: 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 username. To specify multiple usernames, separate them with commas. dbName: The database name. To specify multiple database names, separate them with commas. |
||
| Key |
string |
No |
The filter key. |
None |
| Value |
string |
No |
The value of the filter parameter. |
None |
Elemen respons
|
Element |
Type |
Description |
Example |
|
object |
|||
| Code |
string |
The HTTP status code returned. |
200 |
| Message |
string |
The message returned. Catatan
If the request is successful, Successful is returned. If the request fails, an error message is returned. |
Successful |
| RequestId |
string |
The ID of the request. |
B6D17591-B48B-4D31-9CD6-9B9796B2**** |
| Success |
string |
Indicates whether the request was successful. Valid values:
|
true |
| Data |
object |
The detailed data of the asynchronous task. |
|
| RequestKey |
string |
The key of the request parameter. |
无 |
| ResultId |
string |
The ID of the asynchronous task result. |
async__20ee808e72257f16a4fe024057ca**** |
| State |
string |
The state of the asynchronous task. Valid values:
|
SUCCESS |
| IsFinish |
boolean |
Indicates whether the asynchronous task is complete. |
true |
| Data |
object |
The returned 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. Catatan
This parameter is supported only for ApsaraDB for MongoDB instances. |
|
|
object |
The trend metrics. Catatan
This parameter is supported only for ApsaraDB for MongoDB instances. |
||
| InsId |
string |
The ID of the instance role. Catatan
This parameter is supported only for ApsaraDB for MongoDB instances. |
2492 |
| InsRole |
string |
The instance role. Catatan
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 |
10 |
|
| TotalCount |
integer |
20 |
|
| 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. Catatan
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. Catatan
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. Catatan
This parameter is supported only for ApsaraDB for MongoDB instances. |
|
|
integer |
The number of scanned index rows. Catatan
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. Catatan
This parameter is supported only for ApsaraDB for MongoDB instances. |
|
|
number |
The average number of scanned index rows. Catatan
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. Catatan
This parameter is supported only for ApsaraDB for MongoDB instances. |
|
|
integer |
The maximum number of scanned index rows. Catatan
This parameter is supported only for ApsaraDB for MongoDB instances. |
[ 384, 256, 0, 207030, 4, 256 ] |
|
| DocExamined |
array |
The number of scanned documents. Catatan
This parameter is supported only for ApsaraDB for MongoDB instances. |
|
|
integer |
The number of scanned documents. Catatan
This parameter is supported only for ApsaraDB for MongoDB instances. |
[ 256, 207023, 0, 128, 0, 0 ] |
|
| AvgDocExamined |
array |
The average number of scanned documents. Catatan
This parameter is supported only for ApsaraDB for MongoDB instances. |
|
|
number |
The average number of scanned documents. Catatan
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. Catatan
This parameter is supported only for ApsaraDB for MongoDB instances. |
|
|
integer |
The maximum number of scanned documents. Catatan
This parameter is supported only for ApsaraDB for MongoDB instances. |
[ 256, 207023, 0, 128, 0, 0 ] |
|
| ReturnNum |
array |
The number of returned rows. Catatan
This parameter is supported only for ApsaraDB for MongoDB instances. |
|
|
integer |
The number of returned rows. Catatan
This parameter is supported only for ApsaraDB for MongoDB instances. |
[ 256, 207023, 0, 128, 0, 0 ] |
|
| AvgReturnNum |
array |
The average number of returned rows. Catatan
This parameter is supported only for ApsaraDB for MongoDB instances. |
|
|
number |
The average number of returned rows Catatan
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. Catatan
This parameter is supported only for ApsaraDB for MongoDB instances. |
|
|
integer |
The maximum number of returned rows. Catatan
This parameter is supported only for ApsaraDB for MongoDB instances. |
[ 256, 207023, 0, 128, 0, 0 ] |
|
| IOWrites |
array |
The number of I/O writes. Catatan
This parameter is supported only for ApsaraDB RDS for SQL Server instances. |
|
|
integer |
The number of I/O writes. Catatan
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. Catatan
This parameter is supported only for ApsaraDB RDS for SQL Server instances. |
|
|
number |
The average number of I/O writes. Catatan
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. Catatan
This parameter is supported only for ApsaraDB RDS for SQL Server instances. |
|
|
integer |
The maximum number of I/O writes. Catatan
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. Catatan
This parameter is supported only for ApsaraDB RDS for SQL Server instances. |
|
|
integer |
The number of rows affected by the last statement. Catatan
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. Catatan
This parameter is supported only for ApsaraDB RDS for SQL Server instances. |
|
|
number |
The average number of rows affected by the last statement. Catatan
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. Catatan
This parameter is supported only for ApsaraDB RDS for SQL Server instances. |
|
|
integer |
The maximum number of rows affected by the last statement. Catatan
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. Catatan
This parameter is supported only for ApsaraDB RDS for SQL Server instances. |
|
|
integer |
The number of logical reads. Catatan
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. Catatan
This parameter is supported only for ApsaraDB RDS for SQL Server instances. |
|
|
number |
The average number of logical reads. Catatan
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. Catatan
This parameter is supported only for ApsaraDB RDS for SQL Server instances. |
|
|
integer |
The maximum number of logical reads. Catatan
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. Catatan
This parameter is supported only for ApsaraDB RDS for SQL Server instances. |
|
|
integer |
The number of physical reads. Catatan
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. Catatan
This parameter is supported only for ApsaraDB RDS for SQL Server instances. |
|
|
number |
The average number of physical reads. Catatan
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. Catatan
This parameter is supported only for ApsaraDB RDS for SQL Server instances. |
|
|
integer |
The maximum number of physical reads. Catatan
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. Catatan
This parameter is supported only for ApsaraDB RDS for SQL Server instances. |
|
|
integer |
The number of affected rows. Catatan
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. Catatan
This parameter is supported only for ApsaraDB RDS for SQL Server instances. |
|
|
number |
The average number of affected rows. Catatan
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. Catatan
This parameter is supported only for ApsaraDB RDS for SQL Server instances. |
|
|
integer |
The maximum number of affected rows. Catatan
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). Catatan
This parameter is supported only for ApsaraDB RDS for SQL Server instances. |
|
|
number |
The CPU time. Unit: seconds (s). Catatan
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). Catatan
This parameter is supported only for ApsaraDB RDS for SQL Server instances. |
|
|
number |
The average CPU time. Unit: seconds (s). Catatan
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). Catatan
This parameter is supported only for ApsaraDB RDS for SQL Server instances. |
|
|
number |
The maximum CPU time. Unit: seconds (s). Catatan
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 |
5 |
|
| ErrorCode |
integer |
The error code. |
10910 |
| Message |
string |
The error message. |
Successful |
| Timestamp |
integer |
The time when the request was made. |
1645668213000 |
Contoh
Respons sukses
JSONformat
{
"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": 10
}
],
"TotalCount": 20,
"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": 5
},
"ErrorCode": 10910,
"Message": "Successful",
"Timestamp": 1645668213000
}
}
Kode kesalahan
|
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. |
Lihat Error Codes untuk daftar lengkap.
Catatan rilis
Lihat Release Notes untuk daftar lengkap.