All Products
Search
Document Center

ApsaraDB for OceanBase:DescribeSQLHistoryList

Last Updated:Apr 29, 2024

You can call this operation to query the execution history of an SQL statement in a specified period based on an SQL ID.

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

Authorization information

There is currently no authorization information disclosed in the API.

Request parameters

ParameterTypeRequiredDescriptionExample
TenantIdstringYes

The ID of the tenant.

t2mr3oae0****
StartTimestringYes

The start time of the time range for querying the SQL execution history.
The value must be UTC time in the format of YYYY-MM-DDThh:mm:ssZ.

2021-06-13T15:40:43Z
EndTimestringYes

The end time of the time range for querying the SQL execution history.
The value must be UTC time in the format of YYYY-MM-DDThh:mm:ssZ.

2021-09-13T15:40:43Z
SQLIdstringYes

SQLID.

8D6E84****0B8FB1823D199E2CA1****
PageNumberintegerNo

The page number.

1
PageSizeintegerNo

The number of entries returned on each page.
Default value: 10.

10

Response parameters

ParameterTypeDescriptionExample
object

The return result of the request.

RequestIdstring

The request ID.

473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E
SQLHistoryListobject

The execution history of the SQL statement.

Listobject []
ExecPerSecondlong

The number of executions per second.

163.0
MaxCpuTimefloat

The maximum CPU time.

257.967
BlockCacheHitlong

The number of block cache hits.

14
DecodeTimefloat

The time to wait for decoding.

0.0
RemotePlanslong

The number of remote plans.

0
RPCCountlong

The number of RPCs.

0
NetWaitTimefloat

The network latency.

0.0
DiskReadlong

The number of physical reads.

0
NodeIpstring

The IP address of the node.

i-bp18qljorblo8es*****
ConcurrencyWaitTimefloat

The wait time in concurrent execution.

0.0
DbNamestring

The name of the database.

testdb
MemstoreReadRowCountlong

The number of rows read from the memory.

527
AppWaitTimefloat

The wait time of the client.

0.0
ElapsedTimefloat

The average response time.

76.382
MissPlanslong

The number of plan misses.

0
AffectedRowslong

The number of rows affected.

0
ScheduleTimefloat

The scheduling duration.

0.0
Eventstring

The wait event.

mysql response wait client
TotalWaitTimefloat

The internal wait time.

10.966
ReturnRowslong

The number of rows returned.

1
ExecuteTimefloat

The internal execution time.

61.044
UserNamestring

The username.

tester
Executionslong

The number of executions.

89403
GetPlanTimefloat

The time spent in hard parsing.

0.052
CpuTimefloat

The average CPU time.

50.13
MaxElapsedTimefloat

The maximum response time.

260.44
BlockIndexCacheHitlong

The number of block index cache hits.

4
EndTimeUTCStringstring

The end time in UTC +0.

2021-12-28T02:08:18Z
EndTimelong

The end time.

2021-12-28T02:08:18Z
RetryCountlong

The number of retries.

0
ClientIpstring

The IP address of the client.

1*2.***.1*3.***
BloomFilterCacheHitlong

The number of Bloom filter cache hits.

0
IOWaitTimefloat

The I/O wait time.

0.0
FailTimeslong

The number of failures.

0
QueueTimefloat

The queuing time.

15.275
RowCacheHitlong

The number of row cache hits.

0
LogicalReadlong

The number of logical reads.

19
SsstoreReadRowCountlong

The number of rows read from the disk.

43086
Countlong

The quantity.

1

Examples

Sample success responses

JSONformat

{
  "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
  "SQLHistoryList": {
    "List": [
      {
        "ExecPerSecond": 163,
        "MaxCpuTime": 257.967,
        "BlockCacheHit": 14,
        "DecodeTime": 0,
        "RemotePlans": 0,
        "RPCCount": 0,
        "NetWaitTime": 0,
        "DiskRead": 0,
        "NodeIp": "i-bp18qljorblo8es*****",
        "ConcurrencyWaitTime": 0,
        "DbName": "testdb",
        "MemstoreReadRowCount": 527,
        "AppWaitTime": 0,
        "ElapsedTime": 76.382,
        "MissPlans": 0,
        "AffectedRows": 0,
        "ScheduleTime": 0,
        "Event": "mysql response wait client",
        "TotalWaitTime": 10.966,
        "ReturnRows": 1,
        "ExecuteTime": 61.044,
        "UserName": "tester",
        "Executions": 89403,
        "GetPlanTime": 0.052,
        "CpuTime": 50.13,
        "MaxElapsedTime": 260.44,
        "BlockIndexCacheHit": 4,
        "EndTimeUTCString": "2021-12-28T02:08:18Z",
        "EndTime": 0,
        "RetryCount": 0,
        "ClientIp": "1*2.***.1*3.***",
        "BloomFilterCacheHit": 0,
        "IOWaitTime": 0,
        "FailTimes": 0,
        "QueueTime": 15.275,
        "RowCacheHit": 0,
        "LogicalRead": 19,
        "SsstoreReadRowCount": 43086
      }
    ],
    "Count": 1
  }
}

Error codes

HTTP status codeError codeError message
2014InternalErrorThe request processing has failed due to some unknown error.

For a list of error codes, visit the Service error codes.

Change history

Change timeSummary of changesOperation
2022-01-17The Error code has changed. The response structure of the API has changedsee changesets
Change itemChange content
Error CodesThe Error code has changed.
    delete Error Codes: 2014
Output ParametersThe response structure of the API has changed.