You can call this operation to obtain the list of SQL statements that may have performance problems according to the diagnostic system.
Debugging
Authorization information
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
TenantId | string | Yes | The ID of the tenant. | t2mr3oae0**** |
StartTime | string | Yes | The start time of the time range for querying suspicious SQL statements. | 2021-06-13T15:40:43Z |
EndTime | string | Yes | The end time of the time range for querying suspicious SQL statements. | 2021-09-13T15:40:43Z |
DbName | string | No | The name of the database. | testdb |
SearchKeyWord | string | No | The search keyword. | update |
SearchParameter | string | No | The search parameter. | cputime |
SearchRule | string | No | The search rule. | > |
SearchValue | string | No | The search value. | 0.01 |
SQLId | string | No | SQLID. | 8D6E84****0B8FB1823D199E2CA1**** |
NodeIp | string | No | The IP address of the node. | i-bp19y05uq6xpacyqnlrc |
AcceptLanguage | string | No | The language of the returned data. | zh-CN |
PageSize | integer | No | The number of rows to return on each page.
| 10 |
PageNumber | integer | No | The number of the page to return.
| 1 |
FilterCondition | object | No | The filter condition. Note
- All fields in OceanBase Database support filtering. - You can write the key-value pair of a parameter in a JSON string in the JSON format to filter the parameter. Enumeration Value:
| { "UserName":testUser } |
SortColumn | string | No | The sorted column. | cputime |
SortOrder | string | No | The sorting rule. Enumeration Value:
| desc |
Response parameters
Examples
Sample success responses
JSON
format
{
"TotalCount": 2,
"RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
"AnomalySQLList": [
{
"Key": 1,
"DiagnosisRule": "Utilization above threshold",
"SQLText": "SELECT **** FROM **** WHERE **** = ? AND **** = ? ORDER BY **** ASC",
"Suggestion": "Check your business scenarios, data distribution changes, request surges, and execution plan changes.",
"DbName": "database1",
"RequestTimeUTCString": "2022-01-11T07:08:00Z",
"CpuTime": 50.13,
"SQLId": "99E9D3BF****B486239E6C7BC79B****",
"Diagnosis": "Total number of executions = 80199, Average CPU time = 6.8 ms, Overall CPU utilization = 87%",
"RequestTime": 50,
"Executions": 89043,
"UserName": "tester"
}
]
}
Error codes
HTTP status code | Error code | Error message |
---|---|---|
2014 | InternalError | The request processing has failed due to some unknown error. |
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation | ||||||||
---|---|---|---|---|---|---|---|---|---|---|
2023-08-21 | The Error code has changed | see changesets | ||||||||
| ||||||||||
2023-07-04 | The Error code has changed. The request parameters of the API has changed | see changesets | ||||||||
|