SQL Diagnosis

Procedure

  1. Log in to the DAS console using your username and password.
  2. On the Overview page, click Go to CloudDBA.
  3. Locate your required instance card and click Details to go to the CloudDBA overview page.
  4. Choose SQL > SQL Diagnosis. On the displayed page, select your desired database, enter the SQL statements to be diagnosed, and click Diagnose. The diagnosis result page is displayed.

    Figure 1 SQL diagnosis

  5. On the SQL Diagnosis page, enter SQL statements and click Execute. The system automatically executes the statements and displays a result set.

    Figure 2 SQL execution result set

  6. On the SQL Diagnosis page, enter multiple SQL statements and click Format. The system automatically formats all SQL statements.
  7. On the SQL Diagnosis page, enter multiple SQL statements and click Execute. The system automatically executes all SQL statements in sequence.

    • The SQL tuning function obtains the table structure and data distribution information (non-original). The obtained data is only for logic diagnosis, but not stored on the DAS server.
    • Obtaining table structure and data distribution information may add additional loads to the DB instance, but has little impact on its performance.
    • Only the SQL diagnosis history is stored on the DAS server. You can delete it from the server permanently.