SQL Diagnosis
Procedure
- Log in to the DAS console using your username and password.
- On the Overview page, click Go to CloudDBA.
- Locate your desired instance and click Details to go to the Cloud DBA overview page.
- 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.
- On the SQL Diagnosis page, enter SQL statements and click Execute. The system automatically executes the statements and displays a result set.
- On the SQL Diagnosis page, enter multiple SQL statements and click Format. The system automatically formats all SQL statements.
- On the SQL Diagnosis page, enter multiple SQL statements and click Execute. The system automatically executes all SQL statements in sequence.Note
- Only MySQL InnoDB is supported.
- Only the diagnosis of the SELECT, INSERT, UPDATE, and DELETE statements is supported. An INSERT statement must contain a SELECT clause.
- Querying stored SQL statements such as information_schema, test, mysql, is not supported.
- View statements are not supported.
- 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.
- Format: improves the readability of SQL statements. If you click this button, the SQL statements are displayed in line break mode but the logic and semantics of the SQL statements will not be changed.
The formatting function takes effect for all the SQL statements in the SQL window. You cannot format only the selected statements.
Parent topic: SQL
- Procedure