All Products
Search
Document Center

AnalyticDB for MySQL:DescribeAppliedAdvices

Last Updated:Apr 23, 2024

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

Debugging

OpenAPI Explorer automatically calculates the signature value. For your convenience, we recommend that you call this operation in OpenAPI Explorer.

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:
    • The required resource types are displayed in bold characters.
    • 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:DescribeAppliedAdvicesRead
  • DBCluster
    acs:adb:{#regionId}:{#accountId}:dbcluster/{#DBClusterId}
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
DBClusterIdstringYes

The ID of the AnalyticDB for MySQL Data Warehouse Edition (V3.0) cluster.

Note You can call the DescribeDBClusters operation to query the IDs of all AnalyticDB for MySQL Data Warehouse Edition (V3.0) clusters within a region.
am-uf6g8w25jacm7****
RegionIdstringYes

The region ID of the cluster.

Note You can call the DescribeRegions operation to query the most recent region list.
cn-hangzhou
StartTimelongNo

The beginning of the time range to query. Specify the time in the ISO 8601 standard in the yyyyMMdd format. The time must be in UTC.

20220811
EndTimelongNo

The end of the time range to query. Specify the time in the ISO 8601 standard in the yyyyMMdd format. The time must be in UTC.

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

Response parameters

ParameterTypeDescriptionExample
object

The response parameters.

Itemsobject []

The queried suggestions.

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 state 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 state 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. Minimum value: 0. Default value: 0.

1
PageSizelong

The number of entries per page. Valid values:

  • 30 (default)
  • 50
  • 100
30
PageNumberlong

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

1
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. The value is an integer that is greater than or equal to 0. Default value: 0.

1

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
    }
  ],
  "PageNumber": 1,
  "PageSize": 30,
  "RequestId": "84489769-3065-5A28-A4CB-977CD426F1C3",
  "TotalCount": 1
}

Error codes

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

Change history

Change timeSummary of changesOperation
2024-04-17The request parameters of the API has changed. The response structure of the API has changedsee changesets
Change itemChange content
Input ParametersThe request parameters of the API has changed.
    Added Input Parameters: AdviceType
    Added Input Parameters: Keyword
    Added Input Parameters: SchemaTableName
    Added Input Parameters: Order
Output ParametersThe response structure of the API has changed.