The diagnostics feature of PolarDB for MySQL integrates with Database Autonomy Service (DAS). On the Autonomy Center tab, you can enable the autonomy service. Then, if an exception occurs in a database, DAS automatically performs root cause analysis, gives suggestions, and then performs optimizations and fixes issues. Optimizations are allowed based on your authorization.


The service edition of your PolarDB for MySQL clusters is Cluster or Archive Database. This feature is unavailable for Single Node. For more information about service editions, see Overview.


Only the PolarDB for MySQL clusters whose product type is pay-as-you-go support automatic scale-out and automatic scale-in. Subscription clusters do not support automatic scale-out or automatic scale-in. For more information, see Purchase a pay-as-you-go cluster.


  1. Log on to the PolarDB console.
  2. In the upper-left corner of the console, select the region where the cluster that you want to manage is deployed.
  3. On the Clusters page, find the cluster for which you want to enable the autonomy service, and click the cluster ID.
  4. In the left-side navigation pane, choose Diagnostics and Optimization > Diagnosis.
  5. On the page that appears, click the Autonomy Center tab.
    Autonomy Center
  6. In the upper-right corner, click Autonomy Service Settings.
    Autonomy Service Settings
  7. In the Set dialog box, click the Autonomy Service Settings tab and turn on Enable Autonomy.
    Note After you enable the autonomy service, capacity evaluation, session analytics, throttling SQL analytics, and snapshots upon exceptions are automatically performed. These features do not cause extra loads to the database.
    Enable Autonomy
  8. Specify the following parameters: Automatic Index Creation and Deletion, Automatic Throttling, Automatic Scale-up/out, and Automatic Scale-down/in.
    • Automatic Index Creation and Deletion: After you turn on Enable Autonomy, the SQL Diagnostics feature is automatically enabled. You can click Enable Automatic Index Creation to automatically create indexes and click Enable Automatic Index Deletion to automatically delete indexes.
    • Automatic Throttling: You can specify conditions to trigger automatic SQL throttling. If the specified conditions are met, automatic SQL throttling is triggered.
      Note For example, automatic throttling is triggered if the following conditions are met during the time period specified by the Current limiting period parameter (default value: 00:00 to 23:59): The CPU usage is greater than 70%, the number of active sessions is greater than 16, and the duration is at least 2 minutes. In this case, the system automatically starts to check whether the conditions are met again when the automatic throttling is triggered. If the issue is not fixed, the system automatically rolls back the throttling operation. After automatic throttling is triggered, the duration of the throttling operation does not exceed the time specified by the Maximum current limiting time parameter. For more information, see Automatic SQL throttling.
    • Automatic Scale-up/out and Automatic Scale-down/in: you can enable these features and customize conditions. Scale-in and scale-out are automatically triggered when the specified conditions are met.
      Parameter Description
      Auto Scaling-out Specifies whether to enable the automatic scale-out feature.
      Observation Period If the CPU utilization is greater than or equal to the specified value during the observation period, PolarDB automatically adds nodes or upgrades the specification of your cluster after the observation period expires. This ensures that the cluster can handle the incoming read and write requests. For example, if the observation period is 5 minutes and the time required for an automatic scale-out operation is 10 minutes, you can check the result of the scale-out operation after 15 minutes.
      CPU Usage The threshold for triggering an automatic scale-out operation. If the CPU Usage is greater than or equal to the specified value, an automatic scale-out operation is triggered.
      Maximum Specification The upper limit of the cluster specification. After an automatic scale-out operation is triggered, the system upgrades the specification of your PolarDB cluster to the upper limit in small increments. For example, the specification can be upgraded from 4 cores to 8 cores, and then to 16 cores.
      Maximum Number of Read-only Nodes The maximum number of read-only nodes that the cluster can contain. After an automatic scale-out operation is triggered, the read-only nodes of the PolarDB cluster are added one by one until the upper limit is reached.
      Note The nodes that are automatically added are associated with the default endpoint of your cluster. If you use a custom endpoint, you must specify whether these nodes are automatically associated with the endpoint by using the Automatically Associate New Nodes parameter. For more information about Automatically Associate New Nodes, see Configure PolarProxy.
      Auto Scaling-in Specifies whether to enable the automatic scale-in feature.
      Note After you turn on Automatic Scale-down/in, if the CPU utilization remains at less than 30% for more than 99% of the quiescent period, an automatic scale-in operation is triggered after the quiescent period ends. The specification of the PolarDB cluster are scaled in to the original specification in small increments.
      Quiescent Period The minimum interval between two automatic scale-in operations or two automatic scale-out operations. During a quiescent period, PolarDB continuously tracks whether the trigger conditions for an automatic scale-out or scale-in operation are met. During this period, automatic scale-out or scale-in operations are not triggered. If a quiescent period and an observation period end at the same time and the CPU utilization reaches the threshold value within the observation period, PolarDB automatically triggers the automatic scale-out operation.
  9. Click OK.