You can call this API to view a list of slow queries.
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 slow SQL historical parameters. | 2023-04-12T04:38:38Z |
EndTime | string | Yes | The end time of querying slow SQL historical parameters. | 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, the unique identifier of the SQL. | 8D6E84****0B8FB1823D199E2CA1**** |
NodeIp | string | No | The IP of the database node. | i-bp18qljorblo8es***** |
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. | 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": 260.044,
"TotalWaitTime": 10.966,
"ExecPs": 0.31,
"MaxCpuTime": 257.967,
"ClientIp": "1*2.***.1*3.***",
"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-bp1db1a**s038**mej**",
"ServerIp": "i-bp1db1a**s038**mej**",
"ServerPort": 10110,
"SqlTextShort": "select a from b where",
"SqlType": "select ",
"SqlId": "8D6E84****0B8FB1823D199E2CA1****",
"Inner": false,
"WaitEvent": "none",
"AvgAffectedRows": 9978.75,
"AvgReturnRows": 0,
"AvgPartitionCount": 1,
"FailCount": 0,
"AvgWaitTime": 1.42,
"AvgElapsedTime": 1876.78,
"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": 5,
"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 | ||||||||
|