You can call this API to retrieve the list of data on the SQL execution performance collected by the diagnostic system.
Debugging
Authorization information
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 | see changesets | ||||||||
| ||||||||||
2023-08-21 | The request parameters of the API has changed. The response structure of the API has changed | see changesets | ||||||||
|