You can call this API to view the list of SQL statements that are identified as having performance issues 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 the monitoring data. | 2023-04-12T04:38:38Z |
EndTime | string | Yes | The end time of the monitoring data. | 2023-04-12T05:38:38Z |
DbName | string | No | The name of the database. | 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. | 8D6E84****0B8FB1823D199E2CA1**** |
NodeIp | string | No | The node IP. | i-bp19y05uq6x********* |
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 |
Current | long | No | The current page. | 1 |
PageSize | long | No | Page size.
| 10 |
Response parameters
Examples
Sample success responses
JSON
format
{
"Data": [
{
"AvgCpuTime": 100.24,
"AvgElapsedTime": 100.28,
"AvgGetPlanTime": 0,
"CpuTime": 100.23,
"DbName": "db_***",
"DiagTypes": [
"[\n \"TABLE_SCAN_INDEX_NOT_USED\"\n ]"
],
"Diagnosis": "",
"Executions": 1,
"LastExecutedTime": 0,
"RiskLevel": "high",
"SqlId": "8D6E84****0B8FB1823D199E2CA1****",
"SqlTextShort": "delete /*+ XXX PARALLEL(4) */ from",
"Suggestion": "review",
"SumElapsedTime": "11452126.36",
"UserName": "test_user"
}
],
"RequestId": "473469**-AA6F-4D**-B3DB-A***********",
"TotalCount": 9
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-02-02 | 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 |