You can call this API to retrieve the list of data on the SQL execution performance collected by the diagnostic system.
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 |
---|---|---|---|---|
oceanbase:DescribeOasTopSQLList | get | *All Resources * |
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
InstanceId | string | Yes | The ID of the OceanBase cluster. | ob317v4uif**** |
TenantId | string | Yes | The ID of the tenant. | t4louaeei**** |
StartTime | string | Yes | The start time of querying the TOPSQL parameter. | 2023-04-12T04:38:38Z |
EndTime | string | Yes | The end time of querying the TOPSQL parameter. The value must be UTC time in the format of YYYY-MM-DDThh:mm:ssZ. | 2023-04-12T05:38:38Z |
DbName | string | No | The name of the database. | test_db |
SearchKeyWord | string | No | The search keyword. | update |
SearchParam | string | No | The search parameter. | cputime |
SearchRule | string | No | The search rule. | > |
SearchValue | string | No | The search value. | 0.01 |
SqlId | string | No | SQL ID. Note
When the SQL ID is provided, the system collects all the request data for the target SQL ID. When the SQL ID is empty, the system collects all the request data for the entire database instance.
| 8D6E84****0B8FB1823D199E2CA1**** |
NodeIp | string | No | The node IP. | i-bp18l4****str4uk03 |
FilterCondition | string | No | All parameters are referenced by the symbol @. For a list of available parameters, refer to the returned parameters in Query performance indicators of an SQL statement. | @avgCpuTime > 20 and @executions > 100 |
AcceptLanguage | string | No | The language of the response. Valid values:
| zh-CN |
SqlTextLength | long | No | Max length of the returned SQL text. | 65535 |
Response parameters
Examples
Sample success responses
JSON
format
{
"RequestId": "EE205C00-30E4-****-****-87E3A8A2AA0C",
"Data": [
{
"Executions": 1,
"RpcCount": 0,
"RemotePlans": 0,
"MissPlans": 0,
"MaxElapsedTime": 13643.3,
"TotalWaitTime": 10.966,
"ExecPs": 0.31,
"MaxCpuTime": 13641.9,
"CpuPercentage": 100,
"ClientIp": "i-bp1db****38uemejio",
"UserName": "test_user",
"DbName": "test_db",
"RetCode4012Count": 0,
"RetCode4013Count": 0,
"RetCode5001Count": 0,
"RetCode5024Count": 0,
"RetCode5167Count": 0,
"RetCode5217Count": 0,
"RetCode6002Count": 0,
"FailPercentage": 0,
"SumWaitTime": 9421.73,
"AvgWaitCount": 0,
"AvgRpcCount": 8,
"LocalPlanPercentage": 0,
"RemotePlanPercentage": 0,
"DistPlanPercentage": 100,
"SumElapsedTime": 11452126.36,
"AvgNetTime": 0,
"AvgExecutorRpcCount": 0,
"MissPlanPercentage": 0,
"TableScanPercentage": 0,
"StrongConsistencyPercentage": 100,
"WeakConsistencyPercentage": 0,
"MaxAffectedRows": 10000,
"MaxReturnRows": 0,
"MaxWaitTime": 3.4,
"MaxApplicationWaitTime": 0,
"MaxConcurrencyWaitTime": 0,
"MaxUserIoWaitTime": 0,
"MaxDiskReads": 0,
"AvgExpectedWorkerCount": 3,
"AvgUsedWorkerCount": 3,
"SumLogicalReads": 0,
"Server": "i-bp1db1****8uemejio",
"ServerIp": "i-bp1db1****8uemejio",
"ServerPort": 389,
"SqlTextShort": "delete /*+ XXX PARALLEL(4) */ fro",
"SqlType": "select ",
"SqlId": "8D6E84****0B8FB1823D199E2CA1****",
"Inner": false,
"WaitEvent": "none",
"AvgAffectedRows": 9978.75,
"AvgReturnRows": 0,
"AvgPartitionCount": 1,
"FailCount": 0,
"AvgWaitTime": 1442.49,
"AvgElapsedTime": 903.29,
"AvgCpuTime": 1875.34,
"AvgNetWaitTime": 0,
"AvgQueueTime": 0.01,
"AvgDecodeTime": 0,
"AvgGetPlanTime": 0,
"AvgExecuteTime": 1895.7,
"AvgApplicationWaitTime": 0,
"AvgConcurrencyWaitTime": 0,
"AvgUserIoWaitTime": 0,
"AvgScheduleTime": 0,
"AvgRowCacheHit": 0,
"AvgBloomFilterCacheHit": 0,
"AvgBlockCacheHit": 0,
"AvgBlockIndexCacheHit": 0,
"AvgDiskReads": 0,
"RetryCount": 0,
"AvgMemstoreReadRows": 0,
"AvgSsstoreReadRows": 0,
"AvgLogicalReads": 0
}
]
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-04-15 | The response structure of the API has changed | View Change Details |
2023-08-21 | The request parameters of the API has changed. The response structure of the API has changed | View Change Details |