Queries the applied optimization suggestions for an AnalyticDB for MySQL cluster.
Debugging
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.
Operation | Access level | Resource type | Condition key | Associated operation |
---|---|---|---|---|
adb:DescribeAppliedAdvices | get |
|
| none |
Request parameters
Parameter | Type | Required | Description | Example |
---|---|---|---|---|
DBClusterId | string | Yes | The ID of the AnalyticDB for MySQL Data Warehouse Edition cluster. Note
You can call the DescribeDBClusters operation to query the IDs of AnalyticDB for MySQL Data Warehouse Edition clusters within a region.
| am-uf6g8w25jacm7**** |
RegionId | string | Yes | The region ID of the cluster. Note
You can call the DescribeRegions operation to query the most recent region list.
| cn-hangzhou |
StartTime | long | No | 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 |
EndTime | long | No | 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 |
Lang | string | No | The display language of the suggestion. Valid values:
| zh |
PageSize | long | No | The number of entries per page. Valid values:
| 30 |
PageNumber | long | No | The page number. Pages start from page 1. Default value: 1. | 1 |
AdviceType | string | No | The type of the suggestion. Valid values:
| INDEX |
Keyword | string | No | The keyword that is used to query information by table name. | you_table_name |
SchemaTableName | string | No | The name of the table in the DatabaseName.TableName format. | tpch.lineitem |
Order | string | No | The order by which to sort query results. Specify the parameter value in the JSON format. Example:
Note
If you do not specify this parameter, optimization suggestions are sorted in descending order based on the submission time.
| [{"Field":"Benefit","Type":"Desc"}] |
Response parameters
Examples
Sample success responses
JSON
format
{
"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": [
"[\n \"tpch.lineitem\",\n \"tpch.partsupp\",\n \"tpch.orders\"\n]"
]
}
Error codes
For a list of error codes, visit the Service error codes.
Change history
Change time | Summary of changes | Operation |
---|---|---|
2024-04-17 | The request parameters of the API has changed. The response structure of the API has changed | View Change Details |