All Products
Search
Document Center

Database Autonomy Service:GetInstanceMissingIndexList

Last Updated:Dec 23, 2024

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.

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:
    • 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
hdm:GetInstanceMissingIndexListlist
*All Resources
*
    none
none

Request parameters

ParameterTypeRequiredDescriptionExample
InstanceIdstringYes

The database instance ID.

Note Only ApsaraDB RDS for SQL Server instances are supported.
rm-************
PageNostringNo

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

1
PageSizestringNo

The number of entries per page. Default value: 10.

10
ObjectNamestringNo

The object name.

bas_customer
ReservedSizestringNo

The query condition based on the table size.

>=|100
RowCountstringNo

The query condition based on the number of table rows.

>=|100000
ReservedPagesstringNo

The query condition based on the total number of pages.

>=|100
IndexCountstringNo

The query condition based on the number of indexes.

>=|8
UniqueCompilesstringNo

The query condition based on the number of compilations.

>=|10000
UserSeeksstringNo

The query condition based on the number of seeks.

>=|1000
UserScansstringNo

The query condition based on the number of scans.

>=|10000
AvgTotalUserCoststringNo

The query condition based on the average cost savings.

<=|8
AvgUserImpactstringNo

The query condition based on the performance improvement.

>|10000
StartTimestringNo

The start time of the last seek.

1679414400000
EndTimestringNo

The end time of the last seek.

1681869544000

Response parameters

ParameterTypeDescriptionExample
object
Codestring

The HTTP status code returned.

200
Messagestring

The returned message.

Successful
Dataobject

The detailed information.

Listarray<object>

The returned data.

Listobject
AvgTotalUserCostdouble

The average cost savings.

4.67
AvgUserImpactdouble

The performance improvement, in percentage.

98.3
DatabaseNamestring

The database name.

school
EqualityColumnsstring

The index columns included in the equal operation.

col1,col2,col3
IncludedColumnsstring

The columns on which indexes are missing.

col3,col4
IndexCountlong

The number of indexes.

1
LastUserSeeklong

The last seek time of a user.

1702023327000
ObjectNamestring

The object name.

stu
ReservedPageslong

The total number of returned pages.

5025
ReservedSizedouble

The table size.

39.26
RowCountlong

The number of table rows.

226945
SchemaNamestring

The schema name.

dbo
SystemScanslong

The number of scans.

0
SystemSeekslong

The number of seeks.

0
UniqueCompileslong

The number of compilations.

2392
UserScanslong

The number of scans performed by users.

0
UserSeekslong

The number of seeks performed by users.

1081
InequalityColumnsstring

The index columns included in the not equal operation.

2392
CreateIndexstring

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);
PageNolong

The page number of the page returned.

1
PageSizelong

The number of entries per page.

10
Totallong

The total number of entries returned.

16
RequestIdstring

The request ID.

0A74B755-98B7-59DB-8724-1321B394****
Successstring

Indicates whether the request is successful. Valid values:

  • true
  • false
true

Examples

Sample success responses

JSONformat

{
  "Code": "200",
  "Message": "Successful",
  "Data": {
    "List": [
      {
        "AvgTotalUserCost": 4.67,
        "AvgUserImpact": 98.3,
        "DatabaseName": "school",
        "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 codeError codeError message
400InvalidParamsThe request parameters are invalid.
403NoPermissionYou are not authorized to do this action.

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