All Products
Search
Document Center

ApsaraDB for OceanBase:DescribeTopSQLList

Last Updated:Apr 29, 2024

You can call this operation to query SQL execution performance data collected by the diagnostic system.

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 average CPU time, in ms.

t2mr3oae0****
StartTimestringYes

The maximum response time, in ms.

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

The SQL type.

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

The number of block index cache hits.

testdb
SearchKeyWordstringNo

The number of retries.

update
SearchParameterstringNo

SQLID.

cputime
SearchRulestringNo

The IP address of the client.

>
SearchValuestringNo

The number of Bloom filter cache hits.

0.01
SQLIdstringNo

The I/O wait time, in ms.

8D6E84****0B8FB1823D199E2CA1****
NodeIpstringNo

The number of failures.

i-bp19y05uq6xpacyqnlrc
PageNumberintegerNo

The queuing time, in ms.

1
PageSizeintegerNo

The number of row cache hits.

10
FilterConditionobjectNo

The average number of logical reads of the SQL statement during the specified period of time.
The value covers the numbers of reads of different caches and the number of disk I/Os. It is an important metric for measuring the SQL filtering performance.

Note
A higher ratio of the number of logical reads to the number of returned rows indicates poorer filtering performance. General causes include non-standard content written by SQL statements, non-standard table indexes created, and non-standard SQL execution plans.
[dbName:sys]
SortColumnstringNo

The number of rows read from the disk.

cputime
SortOrderstringNo

The list of top SQL statements.

desc

Response parameters

ParameterTypeDescriptionExample
object

You can call this operation to query SQL execution performance data collected by the diagnostic system.

TotalCountlong

It is an online CLI tool that allows you to quickly retrieve and debug APIs. It can dynamically generate executable SDK code samples.

9
RequestIdstring

Alibaba Cloud CLI

473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E
TopSQLListobject []

The I/O wait time, in ms.

Keylong

The name of the database.

1
ExecPerSecondfloat

The operation that you want to perform.
Set the value to DescribeTopSQLList.

163.0
SQLTextstring

The list of top SQL statements.

SELECT **** FROM **** WHERE **** = ? AND **** = ? ORDER BY **** ASC
MaxCpuTimefloat

SQLID.

257.967
BlockCacheHitlong

The average CPU time, in ms.

14
DecodeTimefloat

The number of rows to return on each page.

  • Maximum value: 100
  • Default value: 10
0.0
RemotePlanslong

The return result of the request.

0
RPCCountlong

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

0
NetWaitTimefloat

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

0.0
DiskReadlong

The IP address of the client.

0
NodeIpstring

The username.

i-bp18qljorblo8es*****
ConcurrencyWaitTimefloat

The number of rows returned.

0.0
MemstoreReadRowCountlong

The name of the database.

527
DbNamestring

The number of remote plans.

testdb
AppWaitTimefloat

The wait time in concurrent execution, in ms.

0.0
ElapsedTimefloat

The sorting rule.

76.382
MissPlanslong

The total count.

0
AffectedRowslong

The internal wait time, in ms.

0
ScheduleTimefloat

The search keyword.

0.0
Eventstring

The number of rows read from the disk.

mysql response wait client
TotalWaitTimefloat
10.966
ReturnRowslong

The wait event.

1
ExecuteTimefloat

The number of rows read from the memory.

61.044
UserNamestring

The number of Bloom filter cache hits.

tester
Executionslong

The number of executions per second.

89403
GetPlanTimefloat

The queuing time, in ms.

0.052
CpuTimefloat

The maximum CPU time, in ms.

50.13
MaxElapsedTimefloat

The sequence number of the returned SQL statement.

260.044
SQLTypelong

The request ID.

1
BlockIndexCacheHitlong

$.parameters[16].schema.example

4
RetryCountlong

$.parameters[13].schema.description

0
SQLIdstring

$.parameters[13].schema.example

8D6E84****0B8FB1823D199E2CA1****
ClientIpstring

$.parameters[14].schema.description

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

$.parameters[14].schema.enumValueTitles

0
IOWaitTimefloat

$.parameters[15].schema.example

0.0
FailTimeslong

$.parameters[12].schema.description

0
QueueTimefloat

$.parameters[12].schema.enumValueTitles

15.275
RowCacheHitlong
http(s)://[Endpoint]/?Action=DescribeTopSQLList
&TenantId=t2mr3oae0****
&StartTime=2021-06-13 15:40:43
&EndTime=2021-09-13 15:40:43
&DbName=testdb
&SearchKeyWord=update
&SearchParameter=cputime
&SearchRule=>
&SearchValue=0.01
&SQLId=8D6E84****0B8FB1823D199E2CA1****
&NodeIp=i-bp19y05uq6xpacyqnlrc
&PageNumber=1
&PageSize=10
&SortColumn=cputime
&SortOrder=desc
&Common request parameters
0
LogicalReadlong

You can call this operation to query SQL execution performance data collected by the diagnostic system.

19

Examples

Sample success responses

JSONformat

{
  "TotalCount": 9,
  "RequestId": "473469C7-AA6F-4DC5-B3DB-A3DC0DE3C83E",
  "TopSQLList": [
    {
      "Key": 1,
      "ExecPerSecond": 163,
      "SQLText": "SELECT  ****   FROM ****   WHERE **** = ? AND **** = ?   ORDER BY **** ASC",
      "MaxCpuTime": 257.967,
      "BlockCacheHit": 14,
      "DecodeTime": 0,
      "RemotePlans": 0,
      "RPCCount": 0,
      "NetWaitTime": 0,
      "DiskRead": 0,
      "NodeIp": "i-bp18qljorblo8es*****",
      "ConcurrencyWaitTime": 0,
      "MemstoreReadRowCount": 527,
      "DbName": "testdb",
      "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.044,
      "SQLType": 1,
      "BlockIndexCacheHit": 4,
      "RetryCount": 0,
      "SQLId": "8D6E84****0B8FB1823D199E2CA1****",
      "ClientIp": "1*2.***.1*3.***",
      "BloomFilterCacheHit": 0,
      "IOWaitTime": 0,
      "FailTimes": 0,
      "QueueTime": 15.275,
      "RowCacheHit": 0,
      "LogicalRead": 19,
      "SsstoreReadRowCount": 43086
    }
  ]
}

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
No change history