All Products
Search
Document Center

AnalyticDB:DescribeAppliedAdvices

Last Updated:Nov 10, 2025

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

Request parameters

ParameterTypeRequiredDescriptionExample
DBClusterIdstringYes

The cluster ID.

am-uf6g8w25jacm7****
RegionIdstringYes

The region ID.

cn-hangzhou
StartTimelongNo

The start date of the time range to query. Specify the date in the yyyyMMdd format.

20220811
EndTimelongNo

The end date of the time range to query. Specify the date in the yyyyMMdd format.

20220824
LangstringNo

The display language of the suggestion. Valid values:

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

The number of entries per page. Valid values:

  • 30(Default)
  • 50
  • 100
30
PageNumberlongNo

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.
    • JobStatus: the status of the BUILD job that is triggered on the table.
    • SubmitTime: the time when the suggestion was submitted.
    • 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, optimization suggestions are sorted in descending order based on the submission time.
[{\"Field\":\"AdviceType\",\"Type\":\"Desc\"}]

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

Itemsarray<object>

The queried applied optimization suggestions.

Itemsobject

The queried applied optimization suggestion.

AdviceIdstring

The suggestion ID.

7417db9c-914d-43f3-a123-4d0e448f****
SubmitTimestring

The time when the suggestion was submitted. The time follows the ISO 8601 standard in the yyMMddHHmm format. The time is displayed in UTC.

2208131600
SubmitStatusstring

The submission status of the suggestion. Valid values:

  • SUCCEED
  • FAILED
SUCCEED
SQLstring

The SQL statement that is used to apply the suggestion.

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

The SQL statement that is used to roll back the suggestion.

alter table `schema1`.`table1` add key col1_1_idx(col1)
JobStatusstring

The status of the suggestion execution job. Valid values:

  • SUCCEED
  • FAILED
SUCCEED
Benefitstring

The benefit of the suggestion.

0.4 GB of storage saved
BuildSQLstring

The SQL statement that is used to execute the BUILD job.

build table `schema1`.`table1`
TotalCountlong

The total number of entries returned.

1
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
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.

84489769-3065-5A28-A4CB-977CD426F1C3
TotalCountlong

The total number of entries returned.

1
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": "7417db9c-914d-43f3-a123-4d0e448f****",
      "SubmitTime": 2208131600,
      "SubmitStatus": "SUCCEED",
      "SQL": "alter table `schema1`.`table1` drop key col1_1_idx",
      "RollbackSQL": "alter table `schema1`.`table1` add key col1_1_idx(col1)",
      "JobStatus": "SUCCEED",
      "Benefit": "0.4 GB of storage saved",
      "BuildSQL": "build table `schema1`.`table1`",
      "TotalCount": 1,
      "PageSize": 30,
      "PageNumber": 1,
      "SchemaName": "adb_demo",
      "TableName": "test"
    }
  ],
  "PageNumber": 1,
  "PageSize": 30,
  "RequestId": "84489769-3065-5A28-A4CB-977CD426F1C3",
  "TotalCount": 1,
  "SchemaTableNames": [
    [
      "tpch.lineitem",
      "tpch.partsupp",
      "tpch.orders"
    ]
  ]
}

Error codes

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