This topic describes how to enable the automatic SQL optimization feature in Database Autonomy Service (DAS). An ApsaraDB RDS for MySQL instance is used as an example.

Prerequisites

  • An ApsaraDB RDS for MySQL database or a PolarDB for MySQL database is connected to DAS.
  • The autonomy service is enabled for the database instance. For more information, see Autonomy center.
  • The full request analysis feature is enabled for the database instance.
    Note Optimization for slow SQL queries may adversely affect the overall performance of the relevant database instance. We recommend that you enable the full request analysis feature for the database instance, which helps improve the precision of the automatic SQL optimization feature. For more information, see Use the full request analysis feature.

Procedure

  1. Log on to the DAS console.
  2. In the left-side navigation pane, click Instance Monitoring.
  3. On the Instance Monitoring page, find the target instance and click the instance ID to go to the instance details page.
  4. In the left-side navigation pane, click Autonomy Center.
  5. On the Autonomy Center page, click Switch Settings in the upper-right corner.
  6. In the Switch Settings dialog box, set Automatic Index Creation and Deletion to Enable Automatic Index Creation.
  7. Click OK.