Call the DescribeAppliedAdvices operation to list applied optimization suggestions.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
adb:DescribeAppliedAdvices |
get |
DBCluster
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| DBClusterId |
string |
Yes |
The ID of the AnalyticDB for MySQL Data Warehouse Edition cluster. Note
Call the DescribeDBClusters operation to view cluster IDs. |
am-uf6g8w25jacm7**** |
| RegionId |
string |
Yes |
The region ID. Note
Call the DescribeRegions operation to view available region IDs. |
cn-hangzhou |
| StartTime |
integer |
No |
The start date of the query, in yyyyMMdd format (UTC time). |
20220811 |
| EndTime |
integer |
No |
The end date of the query, in yyyyMMdd format (UTC time). |
20220824 |
| Lang |
string |
No |
The language used to display suggestions. Valid values:
|
zh |
| PageSize |
integer |
No |
The number of entries per page. Valid values:
|
30 |
| PageNumber |
integer |
No |
The page number. Valid values: integers greater than 0 and less than or equal to the maximum value of the Integer data type. Default value: 1. |
1 |
| AdviceType |
string |
No |
The type of suggestion. Valid values:
|
INDEX |
| Keyword |
string |
No |
The search keyword. Supports fuzzy search by table name. |
you_table_name |
| SchemaTableName |
string |
No |
The database name and table name, in the format database.table. |
tpch.lineitem |
| Order |
string |
No |
The field and sort order for the results. Format as a JSON string, such as
Note
If not specified, results are sorted by issue time in descending order. |
[{"Field":"Benefit","Type":"Desc"}] |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
The response object. |
||
| Items |
array<object> |
Details. |
|
|
object |
The list of suggestions. |
||
| AdviceId |
string |
The ID of the suggestion. |
7417db9c-914d-43f3-a123-4d0e448f**** |
| SubmitTime |
string |
The time when the suggestion was issued, in yyMMddHHmm format (UTC time). |
2208131600 |
| SubmitStatus |
string |
The status of the suggestion issuance. Valid values:
|
SUCCEED |
| SQL |
string |
The SQL statement that applies the suggestion. |
alter table `schema1`.`table1` drop key col1_1_idx |
| RollbackSQL |
string |
The SQL statement used for the rollback recommendation. |
alter table `schema1`.`table1` add key col1_1_idx(col1) |
| JobStatus |
string |
The status of the job that executes the suggestion. Valid values:
|
SUCCEED |
| Benefit |
string |
The benefit of the suggestion. |
节省0.4 GB的存储空间 |
| BuildSQL |
string |
The SQL statement that runs the Build job. |
build table `schema1`.`table1` |
| TotalCount |
integer |
The total number of suggestions returned. Valid values: integers greater than or equal to 0 and less than or equal to the maximum value of the Integer data type. Default value: 0. |
1 |
| PageSize |
integer |
The number of entries per page. Valid values:
|
30 |
| PageNumber |
integer |
The page number. Valid values: integers greater than 0 and less than or equal to the maximum value of the Integer data type. Default value: 1. |
1 |
| SchemaName |
string |
The database name. |
adb_demo |
| TableName |
string |
The table name. |
test |
| IndexFields |
string |
||
| PageNumber |
integer |
The page number. Valid values: integers greater than 0 and less than or equal to the maximum value of the Integer data type. Default value: 1. |
1 |
| PageSize |
integer |
The number of entries per page. Valid values:
|
30 |
| RequestId |
string |
The request ID. |
84489769-3065-5A28-A4CB-977CD426F1C3 |
| TotalCount |
integer |
The total number of results returned. Valid values: integers greater than or equal to 0 and less than or equal to the maximum value of the Integer data type. Default value: 0. |
1 |
| SchemaTableNames |
array |
A list of strings in the format database.table. |
|
|
string |
A string in the format database.table. |
[ "tpch.lineitem", "tpch.partsupp", "tpch.orders" ] |
Examples
Success response
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的存储空间",
"BuildSQL": "build table `schema1`.`table1`",
"TotalCount": 1,
"PageSize": 30,
"PageNumber": 1,
"SchemaName": "adb_demo",
"TableName": "test",
"IndexFields": ""
}
],
"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
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.