Queries the details of all missing indexes of an instance.
Operation description
This operation is applicable only to ApsaraDB RDS for SQL Server instances.
If you use an Alibaba Cloud SDK or Database Autonomy Service (DAS) SDK to call this operation, we recommend that you use the latest version of the SDK.
If you use an SDK to call the API operations of DAS, you must set the region ID to cn-shanghai.
Try it now
Test
RAM authorization
|
Action |
Access level |
Resource type |
Condition key |
Dependent action |
|
hdm:GetInstanceMissingIndexList |
list |
*All Resource
|
None | None |
Request parameters
|
Parameter |
Type |
Required |
Description |
Example |
| InstanceId |
string |
Yes |
The database instance ID. Note
Only ApsaraDB RDS for SQL Server instances are supported. |
rm-t4nfalp2ap421**** |
| PageNo |
string |
No |
The page number. Pages start from page 1. Default value: 1. |
1 |
| PageSize |
string |
No |
The number of entries per page. Default value: 10. |
10 |
| ObjectName |
string |
No |
The object name. |
bas_customer |
| ReservedSize |
string |
No |
The query condition based on the table size. |
>=|100 |
| RowCount |
string |
No |
The query condition based on the number of table rows. |
>=|100000 |
| ReservedPages |
string |
No |
The query condition based on the total number of pages. |
>=|100 |
| IndexCount |
string |
No |
The query condition based on the number of indexes. |
>=|8 |
| UniqueCompiles |
string |
No |
The query condition based on the number of compilations. |
>=|10000 |
| UserSeeks |
string |
No |
The query condition based on the number of seeks. |
>=|1000 |
| UserScans |
string |
No |
The query condition based on the number of scans. |
>=|10000 |
| AvgTotalUserCost |
string |
No |
The query condition based on the average cost savings. |
<=|8 |
| AvgUserImpact |
string |
No |
The query condition based on the performance improvement. |
>|10000 |
| StartTime |
string |
No |
The start time of the last seek. |
1679414400000 |
| EndTime |
string |
No |
The end time of the last seek. |
1681869544000 |
Response elements
|
Element |
Type |
Description |
Example |
|
object |
|||
| Code |
string |
The HTTP status code returned. |
200 |
| Message |
string |
The returned message. |
Successful |
| Data |
object |
The detailed information. |
|
| List |
array<object> |
The returned data. |
|
|
object |
|||
| AvgTotalUserCost |
number |
The average cost savings. |
4.67 |
| AvgUserImpact |
number |
The performance improvement, in percentage. |
98.3 |
| DatabaseName |
string |
The database name. |
testdb |
| EqualityColumns |
string |
The index columns included in the equal operation. |
col1,col2,col3 |
| IncludedColumns |
string |
The columns on which indexes are missing. |
col3,col4 |
| IndexCount |
integer |
The number of indexes. |
1 |
| LastUserSeek |
integer |
The last seek time of a user. |
1702023327000 |
| ObjectName |
string |
The object name. |
stu |
| ReservedPages |
integer |
The total number of returned pages. |
5025 |
| ReservedSize |
number |
The table size. |
39.26 |
| RowCount |
integer |
The number of table rows. |
226945 |
| SchemaName |
string |
The schema name. |
dbo |
| SystemScans |
integer |
The number of scans. |
0 |
| SystemSeeks |
integer |
The number of seeks. |
0 |
| UniqueCompiles |
integer |
The number of compilations. |
2392 |
| UserScans |
integer |
The number of scans performed by users. |
0 |
| UserSeeks |
integer |
The number of seeks performed by users. |
1081 |
| InequalityColumns |
string |
The index columns included in the not equal operation. |
2392 |
| CreateIndex |
string |
The statement used to create the missing indexes. |
CREATE INDEX [IX_CLOUDDBA_school_dbo_stu@col1_@col2] ON [school].[dbo].[stu]([col1],[col2],[col3]) INCLUDE ([col4],[col5]) WITH (FILLFACTOR = 90, ONLINE = OFF); |
| PageNo |
integer |
The page number of the page returned. |
1 |
| PageSize |
integer |
The number of entries per page. |
10 |
| Total |
integer |
The total number of entries returned. |
16 |
| RequestId |
string |
The request ID. |
0A74B755-98B7-59DB-8724-1321B394**** |
| Success |
string |
Indicates whether the request is successful. Valid values:
|
true |
Examples
Success response
JSON format
{
"Code": "200",
"Message": "Successful",
"Data": {
"List": [
{
"AvgTotalUserCost": 4.67,
"AvgUserImpact": 98.3,
"DatabaseName": "testdb",
"EqualityColumns": "col1,col2,col3",
"IncludedColumns": "col3,col4",
"IndexCount": 1,
"LastUserSeek": 1702023327000,
"ObjectName": "stu",
"ReservedPages": 5025,
"ReservedSize": 39.26,
"RowCount": 226945,
"SchemaName": "dbo",
"SystemScans": 0,
"SystemSeeks": 0,
"UniqueCompiles": 2392,
"UserScans": 0,
"UserSeeks": 1081,
"InequalityColumns": "2392",
"CreateIndex": "CREATE INDEX [IX_CLOUDDBA_school_dbo_stu@col1_@col2] ON [school].[dbo].[stu]([col1],[col2],[col3]) INCLUDE ([col4],[col5]) WITH (FILLFACTOR = 90, ONLINE = OFF);"
}
],
"PageNo": 1,
"PageSize": 10,
"Total": 16
},
"RequestId": "0A74B755-98B7-59DB-8724-1321B394****",
"Success": "true"
}
Error codes
|
HTTP status code |
Error code |
Error message |
Description |
|---|---|---|---|
| 400 | InvalidParams | The request parameters are invalid. | |
| 403 | NoPermission | You are not authorized to do this action. |
See Error Codes for a complete list.
Release notes
See Release Notes for a complete list.