All Products
Search
Document Center

AnalyticDB:DescribeTablePartitionDiagnose

Last Updated:Jan 24, 2025

Queries the information about partition diagnostics.

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:DescribeTablePartitionDiagnoseget
DBCluster
acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
DBClusterIdstringYes

The ID of the cluster.

am-bp1xxxxxxxx47
PageSizeintegerNo

The number of entries per page. Valid values:

  • 30
  • 50
  • 100

Default value: 30.

30
PageNumberintegerNo

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

1
OrderstringNo

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

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

    • SchemaName: the name of the database to which the table belongs.
    • TableName: the name of the table.
    • TotalSize: the total data size of the table.
    • SpaceRatio: the storage percentage of the table.
  • Type specifies the sorting order. Valid values:

    • Asc: ascending order.
    • Desc: descending order.
Note If you do not specify this parameter, the query results are sorted by the TotalSize field in descending order.
[{\"Field\":\"TotalSize\",\"Type\":\"Desc\"}]
RegionIdstringYes

The region ID.

cn-hangzhou
LangstringNo

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

  • zh: Chinese.
  • en: English.
zh

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

TotalCountinteger

The total number of entries.

1
RequestIdstring

The ID of the request.

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

The number of entries returned per page.

30
PageNumberinteger

The page number of the returned page.

1
DBClusterIdstring

The ID of the cluster.

am-bp1xxxxxxxx47
SuggestMaxRecordsPerPartitionlong

The recommended maximum number of rows in each list partition.

640000000
SuggestMinRecordsPerPartitionlong

The recommended minimum number of rows in each list partition.

64000000
Itemsarray<object>

The table statistics.

TablePartitionDiagnoseobject
TableNamestring

The name of the table.

test_table
PartitionDetailstring

The information about inappropriate partitions.

202005,202006
SchemaNamestring

The name of the database.

test_db
PartitionNumberinteger

The number of partitions.

2
SpaceRatiodouble

The storage percentage of the table. Unit: %.

Note Formula: Table storage percentage = Total data size of a table/Total data size of the cluster × 100%.
66.23
TotalSizelong

The total data size of the table. Unit: bytes.

42949672960
DetectionItemsarray<object>

The queried detection items and detection results.

DetectionItemsobject
Namestring

The name of the detection item.

Improper Partition Field Diagnosis
Messagestring

The detection result.

A total of 10 tables have an improper partition field
Statusstring

The severity level of the detection result. Valid values:

  • NORMAL
  • WARNING
  • CRITICAL
WARNING

Examples

Sample success responses

JSONformat

{
  "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

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

Change history

Change timeSummary of changesOperation
2024-04-17The Error code has changed. The request parameters of the API has changed. The response structure of the API has changedView Change Details