All Products
Search
Document Center

AnalyticDB:DescribeTableAccessCount

Last Updated:Nov 10, 2025

Queries the number of accesses to a table or all tables in an AnalyticDB for MySQL cluster on a date.

Operation description

For information about the endpoints of AnalyticDB for MySQL, see Endpoints .

Debugging

You can run this interface directly in OpenAPI Explorer, saving you the trouble of calculating signatures. After running successfully, OpenAPI Explorer can automatically generate SDK code samples.

Authorization information

The following table shows the authorization information corresponding to the API. The authorization information can be used in the Action policy element to grant a RAM user or RAM role the permissions to call this API operation. Description:

  • Operation: the value that you can use in the Action element to specify the operation on a resource.
  • Access level: the access level of each operation. The levels are read, write, and list.
  • Resource type: the type of the resource on which you can authorize the RAM user or the RAM role to perform the operation. Take note of the following items:
    • For mandatory resource types, indicate with a prefix of * .
    • If the permissions cannot be granted at the resource level, All Resources is used in the Resource type column of the operation.
  • Condition Key: the condition key that is defined by the cloud service.
  • Associated operation: other operations that the RAM user or the RAM role must have permissions to perform to complete the operation. To complete the operation, the RAM user or the RAM role must have the permissions to perform the associated operations.
OperationAccess levelResource typeCondition keyAssociated operation
adb:DescribeTableAccessCountlist
*DBClusterLakeVersion
acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
DBClusterIdstringYes

The ID of the AnalyticDB for MySQL Data Lakehouse Edition cluster.

Note You can call the DescribeDBClusters operation to query the IDs of all AnalyticDB for MySQL clusters within a region.
amv-2ze627uzpkh8a8****
TableNamestringNo

The name of the table.

Note If you leave this parameter empty, the number of accesses to all tables in the cluster on a date is returned.
CUSTOMER
StartTimestringYes

The beginning of the time range to query. Specify the time in the ISO 8601 standard in the yyyy-MM-ddTHH:mm:ssZ format. The time must be in UTC.

Note Only data within the last 30 days can be queried.
2022-09-25T12:10:00Z
OrderstringNo

The order by which to sort query results. Specify the parameter value in the JSON string format. Example: [{"Field":"TableSchema","Type":"Asc"}]. Fields in the request parameter:

  • Field specifies the field by which to sort the query results. Valid values:

    • TableSchema: the name of the database to which the table belongs.
    • TableName: the name of the table.
    • AccessCount: the number of accesses to the table.
  • Type specifies the sorting order. Valid values:

    • Asc: ascending order.
    • Desc: descending order.
Note If you do not specify this parameter, query results are sorted in ascending order based on the database and the table.
[{"Field":"TableSchema","Type":"Asc"}]
PageNumberintegerNo

The page number. Pages start from 1. Default value: 1.

1
PageSizeintegerNo

The number of entries per page. Valid values:

  • 10 (default)
  • 30
  • 50
  • 100
30
RegionIdstringYes

The region ID of the cluster.

cn-hangzhou

Response parameters

ParameterTypeDescriptionExample
object
RequestIdstring

The request ID.

6B7D627B-DA23-572D-AD71-256F64698B7D
PageNumberinteger

The page number.

1
PageSizeinteger

The number of entries per page.

30
TotalCountinteger

The total number of entries returned.

1
Itemsarray<object>

The queried tables.

Itemsobject
ReportDatestring

The date when the table was accessed.

2022-09-26
TableSchemastring

The database to which the table belongs.

tpch
AccessCountstring

The number of accesses to the table.

6
TableNamestring

The name of the table.

CUSTOMER
InstanceNamestring

The ID of the cluster to which the table belongs.

amv-2ze627uzpkh8a8****

Examples

Sample success responses

JSONformat

{
  "RequestId": "6B7D627B-DA23-572D-AD71-256F64698B7D",
  "PageNumber": 1,
  "PageSize": 30,
  "TotalCount": 1,
  "Items": [
    {
      "ReportDate": "2022-09-26",
      "TableSchema": "tpch",
      "AccessCount": 6,
      "TableName": "CUSTOMER",
      "InstanceName": "amv-2ze627uzpkh8a8****"
    }
  ]
}

Error codes

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

Change history

Change timeSummary of changesOperation
2023-09-13The internal configuration of the API is changed, but the call is not affectedView Change Details