All Products
Search
Document Center

AnalyticDB:DescribeTablePartitionDiagnose

Last Updated:Aug 28, 2026

Queries partition diagnostic information for an AnalyticDB for MySQL cluster.

Try it now

Try this API in OpenAPI Explorer, no manual signing needed. Successful calls auto-generate SDK code matching your parameters. Download it with built-in credential security for local usage.

Test

RAM authorization

The table below describes the authorization required to call this API. You can define it in a Resource Access Management (RAM) policy. The table's columns are detailed below:

  • Action: The actions can be used in the Action element of RAM permission policy statements to grant permissions to perform the operation.

  • API: The API that you can call to perform the action.

  • Access level: The predefined level of access granted for each API. Valid values: create, list, get, update, and delete.

  • Resource type: The type of the resource that supports authorization to perform the action. It indicates if the action supports resource-level permission. The specified resource must be compatible with the action. Otherwise, the policy will be ineffective.

    • For APIs with resource-level permissions, required resource types are marked with an asterisk (*). Specify the corresponding Alibaba Cloud Resource Name (ARN) in the Resource element of the policy.

    • For APIs without resource-level permissions, it is shown as All Resources. Use an asterisk (*) in the Resource element of the policy.

  • Condition key: The condition keys defined by the service. The key allows for granular control, applying to either actions alone or actions associated with specific resources. In addition to service-specific condition keys, Alibaba Cloud provides a set of common condition keys applicable across all RAM-supported services.

  • Dependent action: The dependent actions required to run the action. To complete the action, the RAM user or the RAM role must have the permissions to perform all dependent actions.

Action

Access level

Resource type

Condition key

Dependent action

adb:DescribeTablePartitionDiagnose

get

DBCluster

acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId}

None None

Request parameters

Parameter

Type

Required

Description

Example

DBClusterId

string

Yes

The cluster ID.

am-bp1xxxxxxxx47

PageSize

integer

No

The number of entries per page. Valid values:

  • 30

  • 50

  • 100

Default value: 30.

30

PageNumber

integer

No

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

1

Order

string

No

The sort order for query results. Specify the value in JSON format. Example: [{"Field":"TotalSize","Type":"Desc"}].

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

    • SchemaName: the database name.

    • TableName: the table name.

    • TotalSize: the total data size of the table.

      205
    • 206
    • 207

      SpaceRatio: the storage percentage of the table.

  • Type: the sorting order. Valid values:

    • Asc: ascending order.

    • Desc: descending order.

Note

If you do not specify this parameter, query results are sorted by TotalSize in descending order.

[{\"Field\":\"TotalSize\",\"Type\":\"Desc\"}]

RegionId

string

No

The region ID of the cluster.

cn-hangzhou

Lang

string

No

The language of the request and response content. Default value: zh. Valid values:

  • zh: Chinese.

  • en: English.

zh

Response elements

Element

Type

Description

Example

object

The response.

TotalCount

integer

The total number of entries returned.

1

RequestId

string

The request ID.

1AD222E9-E606-4A42-BF6D-8A4442913CEF

PageSize

integer

The number of entries returned per page.

30

PageNumber

integer

The page number.

1

DBClusterId

string

The cluster ID.

am-bp1xxxxxxxx47

SuggestMaxRecordsPerPartition

integer

The recommended maximum number of rows in each list partition.

640000000

SuggestMinRecordsPerPartition

integer

The recommended minimum number of rows in each list partition.

64000000

Items

array<object>

The table statistics.

object

TableName

string

The table name.

test_table

PartitionDetail

string

The details of partitions that have issues.

202005,202006

SchemaName

string

The database name.

test_db

PartitionNumber

integer

The number of partitions in the table.

2

SpaceRatio

number

The storage percentage of the table, in %.

Note

Formula: Storage percentage = Total data size of the table / Total data size of the cluster × 100%.

66.23

TotalSize

integer

The total data size of the table, in bytes.

42949672960

DetectionItems

array<object>

The detection items and results.

object

Name

string

The detection item name.

Improper Partition Field Diagnosis

Message

string

The detection result.

A total of 10 tables have an improper partition field

Status

string

The severity level of the detection result. Valid values:

  • NORMAL

  • WARNING

  • CRITICAL

WARNING

Examples

Success response

JSON format

{
  "TotalCount": 1,
  "RequestId": "1AD222E9-E606-4A42-BF6D-8A4442913CEF",
  "PageSize": 30,
  "PageNumber": 1,
  "DBClusterId": "am-bp1xxxxxxxx47",
  "SuggestMaxRecordsPerPartition": 640000000,
  "SuggestMinRecordsPerPartition": 64000000,
  "Items": [
    {
      "TableName": "test_table",
      "PartitionDetail": "202005,202006",
      "SchemaName": "test_db",
      "PartitionNumber": 2,
      "SpaceRatio": 66.23,
      "TotalSize": 42949672960
    }
  ],
  "DetectionItems": [
    {
      "Name": "Improper Partition Field Diagnosis\n",
      "Message": "A total of 10 tables have an improper partition field\n",
      "Status": "WARNING"
    }
  ]
}

Error codes

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.