Database Autonomy Service (DAS) provides the automatic SQL optimization feature that contains automatic index creation and deletion. The automatic index creation feature uses online data definition language (DDL) statements that are supported by the native MySQL kernel. This prevents table locking issues that may be caused by traditional indexing. This topic describes how to enable automatic index creation.
- An ApsaraDB RDS for MySQL instance of High-availability Edition or Enterprise Edition or a PolarDB for MySQL instance of Cluster Edition or Archive Database Edition is connected to DAS.
- The Enable Autonomy Service switch is turned on for the database instance. For more information, see Autonomy center.
- SQL Explorer is enabled for the database instance. For more information, see SQL Explorer.
Note After slow SQL optimization is complete, global performance may deteriorate. To improve the precision of the automatic SQL optimization feature, we recommend that you enable SQL Explorer.
- Log on to the DAS console.
- In the left-side navigation pane, click Instance Monitoring.
- Find the instance for which you want to enable automatic SQL optimization, and click the instance ID. The instance details page appears.
- In the left-side navigation pane, click Autonomy Center.
- On the Autonomy Center page, click Autonomy Service Settings in the upper-right corner.
- In the Set dialog box, turn on Enable Autonomy Service and select Enable Automatic Index Creation.Note You can enable the automatic index deletion feature to delete duplicate and unused indexes. However, this feature is unavailable.
- Click OK.