All Products
Search
Document Center

AnalyticDB:DescribeExcessivePrimaryKeys

Last Updated:Aug 27, 2026

Queries tables that have excessive primary key fields in an AnalyticDB for MySQL Data Lakehouse Edition (V5.0) 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:DescribeExcessivePrimaryKeys

get

*DBClusterLakeVersion

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

None None

Request parameters

Parameter

Type

Required

Description

Example

DBClusterId

string

Yes

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 Data Lakehouse Edition clusters within a region.

am-bp1xxxxxxxx47

RegionId

string

Yes

The region ID.

Note

You can call the DescribeRegions operation to query the most recent region list.

cn-hangenou

StartTime

string

No

The beginning of the time range to query. Specify the time in the yyyy-MM-ddTHH:mm:ssZ format (ISO 8601, UTC).

2019-06-01T16:00:00Z

EndTime

string

No

The end of the time range to query. Specify the time in the yyyy-MM-ddTHH:mm:ssZ format (ISO 8601, UTC).

2019-06-01T16:00:00Z

PageSize

integer

No

The number of entries per page. Valid values:

  • 30 (default)

  • 50

  • 100

30

PageNumber

integer

No

The page number.

1

Lang

string

No

The language of file titles and error messages. Valid values:

  • en (default): simplified Chinese.

  • en: English.

  • ja: Japanese.

  • en-tw: traditional Chinese.

en

Order

string

No

The sort order for table fields. Specify the value in JSON format.

Example:

[

    {

        "Field":"Name",

        "Type":"Asc"

    }

]

In the preceding code, Field specifies the field used to sort the table data. Set the value to Name. Type specifies the sort order. Valid values: Desc and Asc.

Field and Type are case-insensitive.

[{"Field":"TableName", "Type": "Desc" }]

Response elements

Element

Type

Description

Example

object

TotalCount

string

The total number of entries returned.

300

PageNumber

integer

The page number.

1

PageSize

integer

The number of entries per page. Valid values:

  • 30 (default)

  • 50

  • 100

30

RequestId

string

The request ID.

863D51B7-5321-41D8-A0B6-A088B0******

DBClusterId

string

The cluster ID.

am-bp1ub9grke1****

Tables

array<object>

The tables that have excessive primary key fields.

object

TableName

string

The name of the table.

test

SchemaName

string

The name of the database.

adb_demo

ColumnCount

integer

The total number of columns.

21

PrimaryKeyCount

integer

The number of primary key fields.

2

PrimaryKeyColumns

string

The primary key fields.

id,date

SpaceRatio

number

The percentage of the table size. Unit: %.

Note

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

23

TotalSize

integer

The cold data size. Unit: bytes.

Note

Formula: Cold data size = Data size of table records + Data size of regular indexes + Data size of primary key indexes + Data size of other data.

4

PrimaryKeyIndexSize

integer

The data size of primary key indexes. Unit: bytes.

222

DetectionItems

array<object>

The detection items and results.

object

The detection item and result.

Name

string

The name of the detection item.

Excessive primary key fields

Message

string

The detection result.

Detectedmultiple tables have too many primary keys

Status

string

The severity level of the detection result.

NORMAL WARNNING CRITICAL

AccessDeniedDetail

string

The information about the request denial.

{ "PolicyType": "AccountLevelIdentityBasedPolicy", "AuthPrincipalOwn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V7N2VVGtNnGUwNWzM0WJBPONAgxPv+AmixFRCQ==", "AuthPrincipalType": "SubUser", "AuthPrincipalDisplayName": "202515810214480629", "NoPermissionType": "ImplicitDeny", "AuthAction": "adb:DescribeExcessivePrimaryKeys" }

Examples

Success response

JSON format

{
  "TotalCount": "300",
  "PageNumber": 1,
  "PageSize": 30,
  "RequestId": "863D51B7-5321-41D8-A0B6-A088B0******",
  "DBClusterId": "am-bp1ub9grke1****",
  "Tables": [
    {
      "TableName": "test",
      "SchemaName": "adb_demo",
      "ColumnCount": 21,
      "PrimaryKeyCount": 2,
      "PrimaryKeyColumns": "id,date\n",
      "SpaceRatio": 23,
      "TotalSize": 4,
      "PrimaryKeyIndexSize": 222
    }
  ],
  "DetectionItems": [
    {
      "Name": "Excessive primary key fields",
      "Message": "Detectedmultiple tables have too many primary keys",
      "Status": "NORMAL\nWARNNING\nCRITICAL"
    }
  ],
  "AccessDeniedDetail": "{\n    \"PolicyType\": \"AccountLevelIdentityBasedPolicy\",\n    \"AuthPrincipalOwnerId\": \"1906102576997697\",\n    \"EncodedDiagnosticMessage\": \"AQIBIAAAAOPdwKY2QLOvgMEc7SkkoJfj1kvZwsaRqNYMh10Tv0wTe0fCzaCdrvgazfNb0EnJKETgXyhR+3BIQjx9WAqZryejBsp1Bl4qI5En/D9dEhcXAtKCxCmE2kZCiEzpy8BoEUt+bs0DmlaGWO5xkEpttypLIB4rUhDvZd+zwPg4EXk4KSSWSWsurxtqDkKEMshKlQFBTKvJcNqPqHV6lwR4INiAGjIvK1ngXxN1O+6ORRB6A8YvztEOGywOk81ZmuNk0YrNy+qk7+UVDTHeXKsy8h9e/ePY/LMidj0RCmDpo/YpCumd0UGe0qEPe2U+UJAm/+UHlnEFLVg6BP3yIB5D++MCy7mgWm8Kwyhk62IeYly4hQ+5IpXjkh1GQXuDgLVVPVpxEek9n30vnCUL4KsaMgfa7dgojb+3TM8xGsD2zVK5STJNrsXclscIJEqyNXd7CBYiRJVZi1HPO6drN9WW0chLpCSTgjO8n0bNanZaxXKumW9PSwV58UoSFASeMWfZK3TLngX+oq8nGmnTwcJosVjfF4RGzAnS1IXt0Q9N2WHDnpwyLBU/nOz7Hsy8IZ+h+OVjsBTXSM9688/vOF707a5mNzpETvQeGRcua3A5livcKAM2cML0yeUs/Zyj/+BGqtVa+wektspDHC/CECh6R5lxQjRmUdPawY8VDs2onmdLuEH8DdmYt+Yv/jBFBUMWOyAluzkPYcX5nuQKouCIUJUFTSbsJsuH5CTIh7Ls5rbmkj+T1qTVz8gnDR8LxwaqoMSna+elXgVyOOxXtMkenVntsmoC3p/4G7yTPL1hu8JyWGIIvZHZGGLXGEH7FeSuMV8buKxPGFWG3arG8e9LGvDdz5dgTien4y6G5AQ0o1iQdXDos5VWdH3u7k5PrsvdEOpvMi6uSd8a42na80FsYlgGlwM5upydcWUC5Un2HCkJpT1xgk2L6shdVTrK6bidRrqE784FhW9bBQePzGaxSupPENZya0VUctRt+7uq3QwIn4y5jzjgX0E0jgmqPrgiVDjBesMQZYfGPCGysWYWYzfoh+G6V7N2VVGtNnGUwNWzM0WJBPONAgxPv+AmixFRCQ==\",\n    \"AuthPrincipalType\": \"SubUser\",\n    \"AuthPrincipalDisplayName\": \"202515810214480629\",\n    \"NoPermissionType\": \"ImplicitDeny\",\n    \"AuthAction\": \"adb:DescribeExcessivePrimaryKeys\"\n  }"
}

Error codes

HTTP status code

Error code

Error message

Description

404 InvalidDBCluster.NotFound The DBClusterId provided does not exist in our records. The specified DBClusterId parameter does not exist. Make sure that the DBClusterId value is valid.

See Error Codes for a complete list.

Release notes

See Release Notes for a complete list.