Apply index recommendation Innovation Release

Apply index recommendation is an automation that selects the most beneficial pending index recommendation for an HM-managed cluster and applies it at each configured interval. HM determines the best recommendation based on the total query time saved relative to the write performance impact.

This automation reduces the manual effort of identifying, reviewing, and executing index changes, and ensures your performance tuning keeps pace with changing workloads. Unlike CPU and memory scaling, index creation doesn't require a database restart, but because index creation can affect query performance on large or resource-constrained databases, plan this automation carefully. Use a maintenance window to control when index creation runs, and enable approval requirements so your team can review each recommendation before it's applied.

Note

Apply index recommendation only works with HM-managed clusters. External databases aren't supported.

You configure this automation per replica or data group using the dropdown in the Automations section.

For HA clusters, configure it on each replica separately. Logical replication doesn't sync DDL changes, so indexes won't propagate between replicas automatically.

For AHA and DHA clusters, you only need to configure it on one data group. The automation applies the index to the write leader, and PGD replicates the change to all other data groups automatically.

Apply index recommendation parameters

When you configure an automated operation, there are specific parameters for the apply index recommendation automation in addition to the general automation fields:

FieldDescription
Database FilterRestrict the automation to specific databases within the cluster. You can add multiple values. Leave empty to consider all databases.
Schema FilterRestrict the automation to specific schemas. You can add multiple values. Leave empty to consider all schemas. If multiple databases are selected, HM looks for a matching schema name across all of them and applies recommendations wherever a match is found.
Table FilterRestrict the automation to specific tables. You can add multiple values. Leave empty to consider all tables. If multiple databases or schemas are selected, HM looks for a matching table name across all of them and applies recommendations wherever a match is found.
Maintenance WindowSchedule index creation during this maintenance window. Leave empty for immediate execution. See Maintenance windows.
ApprovalSelect Approval Required to create a pending task in Task Manager that a user must approve before index creation runs, or Approval Not Required to run tasks automatically without manual review. Approval Required is recommended for production clusters.

Each time the automation runs, HM evaluates the pending index recommendations for the database cluster and selects the single most beneficial one. It then creates a task in Task Manager and executes it according to your configuration — either immediately or within the next open maintenance window, with or without approval. On subsequent runs, HM selects the next most beneficial pending recommendation and continues until no pending recommendations remain.

Tasks appear in Task Manager where you can monitor task status — pending, completed, or rejected — from either the cluster-level Task Manager tab or the project-level Task Manager in the left navigation. All executions are logged in the Activity Log for full auditability.

How the Recommendations tab and this automation work together

The automation draws from the same recommendation engine as the Recommendations tab on the cluster view. The status of a recommendation in that tab directly affects what the automation picks up:

  • To prevent the automation from applying a specific recommendation, open the Recommendations tab and mark it as Ignored. Ignored recommendations are excluded from the automation and won't reappear.

  • Not approving a pending task in Task Manager doesn't mark the recommendation as ignored — the automation recreates the task after the cooldown period expires. To permanently skip a recommendation, mark it as Ignored in the Recommendations tab instead.