All Products
Search
Document Center

AnalyticDB:DescribeAvailableAdvices

Last Updated:Nov 10, 2025

Queries the available optimization suggestions for an AnalyticDB for MySQL cluster.

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

Request parameters

ParameterTypeRequiredDescriptionExample
DBClusterIdstringYes

The cluster ID.

am-bp198m028ih55****
RegionIdstringYes

The region ID.

cn-hangzhou
AdviceDatelongYes

The date when the suggestion is generated. Specify the date in the yyyyMMdd format.

Note Suggestions are generated after analysis after midnight every day. You must specify a date that is at least one day earlier than the current date. For example, if the current date is 20240627, you must specify 20240626 or an earlier date.
20221124
LangstringYes

The display language of suggestions. Valid values:

  • zh (default): simplified Chinese.
  • en: English.
  • ja: Japanese.
  • zh-tw: traditional Chinese.
zh
PageSizelongYes

The number of entries per page. Valid values:

  • 30 (default)
  • 50
  • 100
30
PageNumberlongYes

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

1
AdviceTypestringNo

The type of the suggestion. Valid values:

  • INDEX: index optimization.
  • TIERING: hot and cold data optimization.
INDEX
KeywordstringNo

The keyword that is used to query information by table name.

you_table_name
SchemaTableNamestringNo

The name of the table in the DatabaseName.TableName format.

tpch.lineitem
OrderstringNo

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

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

    • SchemaName: the name of the database.
    • TableName: the name of the table.
    • Benefit: the expected benefits of the applied optimization suggestion.
  • 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 in descending order based on the Benefit field.
[{\"Field\":\"AdviceType\",\"Type\":\"Desc\"}]

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

Itemsarray<object>

The queried suggestions.

Itemsobject

The queried suggestion.

AdviceIdstring

The suggestion ID.

dcd04135-0925-4aed-a5a7-e7d92cb1****
AdviceDatestring

The date when the suggestion is generated. The date is in the yyyyMMdd format.

20221124
AdviceTypestring

The type of the suggestion. Valid values:

  • INDEX: index optimization.
  • TIERING: hot and cold data optimization.
INDEX
SQLstring

The SQL statement that is used to apply the suggestion.

alter table `schema1`.`table1` drop key col1_1_idx
Reasonstring

The reason why the suggestion was generated.

Unused for 15 days, historical usage less than 1%
Benefitstring

The benefit of the suggestion.

0.4 GB of storage saved
TotalCountlong

The total number of entries returned.

10192
PageSizelong

The number of entries per page. Valid values:

  • 30 (default)
  • 50
  • 100
30
PageNumberlong

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

1
SchemaNamestring

The name of the database.

adb_demo
TableNamestring

The name of the table.

test_table
PageNumberlong

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

1
PageSizelong

The number of entries per page. Valid values:

  • 30 (default)
  • 50
  • 100
30
RequestIdstring

The request ID.

96A55627-28E9-5E47-B8F6-D786BE551349
TotalCountlong

The total number of entries returned.

10192
SchemaTableNamesarray

The name of the table in the DatabaseName.TableName format.

SchemaTableNamesstring

The name of the table in the DatabaseName.TableName format.

[ "tpch.lineitem", "tpch.partsupp", "tpch.orders" ]

Examples

Sample success responses

JSONformat

{
  "Items": [
    {
      "AdviceId": "dcd04135-0925-4aed-a5a7-e7d92cb1****",
      "AdviceDate": 20221124,
      "AdviceType": "INDEX",
      "SQL": "alter table `schema1`.`table1` drop key col1_1_idx",
      "Reason": "Unused for 15 days, historical usage less than 1%",
      "Benefit": "0.4 GB of storage saved",
      "TotalCount": 10192,
      "PageSize": 30,
      "PageNumber": 1,
      "SchemaName": "adb_demo",
      "TableName": "test_table"
    }
  ],
  "PageNumber": 1,
  "PageSize": 30,
  "RequestId": "96A55627-28E9-5E47-B8F6-D786BE551349",
  "TotalCount": 10192,
  "SchemaTableNames": [
    [
      "tpch.lineitem",
      "tpch.partsupp",
      "tpch.orders"
    ]
  ]
}

Error codes

HTTP status codeError codeError messageDescription
400MissingParameter.PageSizeThe PageSize parameter is required.The PageSize parameter is not specified.

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