Queries the full request data generated by the new version of the performance insight feature of a database instance based on the SQL ID.
Operation description
Before you call this operation, take note of the following items:
- If you use an Alibaba Cloud SDK or a Database Autonomy Service (DAS) SDK to call this API operation, we recommend that you use the latest version of the SDK.
- If you use an SDK to call API operations of DAS, you must set the region ID to cn-shanghai.
- An ApsaraDB RDS for MySQL instance or a PolarDB for MySQL cluster is connected to DAS.
- The new version of the performance insight feature is enabled for the database instance. For more information, see Performance insight (new version).
Debugging
Authorization information
The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action
policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:
- Operation: the value that you can use in the Action element to specify the operation on a resource.
- Access level: the access level of each operation. The levels are read, write, and list.
- Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
- The required resource types are displayed in bold characters.
- If the permissions cannot be granted at the resource level,
All Resources
is used in the Resource type column of the operation.
- Condition Key: the condition key that is defined by the cloud service.
- Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
hdm:GetPfsSqlSummaries | get | *All Resources * |
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
InstanceId | string | No | The instance ID. | rm-uf61swc4cru0b**** |
NodeId | string | No | The node ID. Note
This parameter is required if the database instance is an ApsaraDB RDS for MySQL Cluster Edition instance or a PolarDB for MySQL cluster.
| r-****-db-0 |
SqlId | string | No | The SQL ID. Note
If this parameter is specified, the full request statistics of the specified SQL query are collected. If this parameter is left empty, the full request statistics of the entire database instance are collected.
| 651b56fe9418d48edb8fdf0980ec**** |
Keywords | string | No | The keywords of the SQL template. Separate multiple keywords with spaces. | select update |
StartTime | long | No | The beginning of the time range to query. Set this parameter to a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC. | 1675833788056 |
EndTime | long | No | The end of the time range to query. Set this parameter to a UNIX timestamp representing the number of milliseconds that have elapsed since January 1, 1970, 00:00:00 UTC. Note
The end time must be later than the start time. You can view the data of up to seven days within the last month.
| 1679297005999 |
OrderBy | string | No | The field by which to sort the returned entries. Default value: count.
| count |
Asc | boolean | No | Specifies whether to sort the returned entries in ascending order. Default value: false. Valid values:
| false |
PageNo | integer | No | The page number. Pages start from page 1. Default value: 1. | 1 |
PageSize | integer | No | The number of entries per page. Default value: 10. Valid values: 1 to 100. | 10 |
Response parameters
Examples
Sample success responses
JSON
format
{
"Message": "Successful",
"RequestId": "54F3DBAE-9420-511A-9C29-265E8C04****",
"Data": {
"Total": 264,
"List": [
{
"UserId": "196278346919****",
"Psql": "select ?",
"InstanceId": "rm-2ze8g2am97624****",
"NodeId": "r-x****-db-0",
"SqlType": "SELECT",
"LogicId": 58275984,
"SqlId": "2e8147b5ca2dfc640dfd5e43d96a****",
"Timestamp": 1643040000000,
"RtRate": 0.1384,
"CountRate": 0.0586,
"FullScan": true,
"Count": 100000,
"ErrCount": 0,
"WarnCount": 0,
"TotalLatency": 60913.256,
"MaxLatency": 36.233,
"AvgLatency": 0.1717,
"RowsSent": 0,
"RowsSendAvg": 0,
"RowsExamined": 100,
"RowsExaminedAvg": 0,
"RowsAffected": 0,
"RowsAffectedAvg": 0,
"TmpTables": 0,
"TmpDiskTables": 0,
"RowsSorted": 0,
"SortMergePasses": 0,
"PhysicalReads": 0,
"PhysicalAsyncReads": 0,
"SemisyncDelayTime": 0.12,
"RowsSentAvg": 0.52,
"LogicReads": 0,
"RedoWrites": 0,
"DataWriteTime": 0,
"DataWrites": 0,
"DataReadTime": 0,
"DataReads": 0,
"RwlockOsWaits": 0,
"RwlockSpinRounds": 0,
"RwlockSpinWaits": 0,
"MutexWaits": 1,
"MutexSpins": 1,
"TransactionLockTime": 0,
"ServerLockTime": 0,
"CpuTime": 0,
"ElapsedTime": 0,
"Id": 26186357,
"SelectScanAvg": 0,
"SelectRangeAvg": 0,
"SelectFullJoinAvg": 0,
"SelectFullRangeJoinAvg": 0,
"SortScanAvg": 0,
"SortRowsAvg": 0,
"TmpTablesAvg": 0,
"TmpDiskTablesAvg": 0,
"FirstTime": 1659308149000,
"LastTime": 1661306520000,
"LockLatencyAvg": 0,
"TimerWaitAvg": 0,
"SortRangeAvg": 0,
"CpuRate": 0,
"Db": "testDB",
"Tables": [
"test_table"
]
}
],
"PageNo": 1,
"PageSize": 10,
"Extra": "None"
},
"Code": 200,
"Success": true
}
Error codes
HTTP status code | Error code | Error message |
---|---|---|
400 | InvalidParams | The request parameters are invalid. |
403 | NoPermission | You are not authorized to do this action. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|