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

Prerequisites

  • An ApsaraDB RDS for MySQL database or a PolarDB for MySQL database is connected to DAS.
  • Enable Autonomy Service is turned on for the database instance. For more information, see Autonomy center.
  • Full Request Analysis 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 makes the automatic SQL optimization feature more precise. 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 an instance and click its 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 Settings in the upper-right corner.
  6. In the Settings dialog box, set Automatic Index Creation and Deletion to Enable Automatic Index Creation.
  7. Click Determine.