SQL Tuning
Scenarios
SQL tuning helps you identify the SQL statements that are executed frequently or slowly, and consume large volumes of resources. You can optimize the database according to the diagnosis suggestions to ensure database stability.
Prerequisites
- You have tuned SQL statements in the SQL window.
Procedure
- On the top menu bar, choose SQL Operations > SQL Window. On the displayed page, click Tune SQL. Figure 1 SQL tuning
- On the SQL Tuning page, click Add SQL Performance Tuning to add a SQL tuning task. In the displayed dialog box, enter SQL statements or upload a SQL file as required, and then click OK. Figure 2 SQL performance tuning task list
Figure 3 Adding a SQL performance tuning task
- In the SQL tuning task list, select a database and time range and click Search to filter tuning reports. Then, click View Details in the Operation column to view tuning details. Figure 4 SQL tuning
On the displayed diagnosis details page, view the tuning details, including the basic information, tuning status preview, tuning task list, and optimization suggestions.
Figure 5 SQL tuning details
Figure 6 Tuning details
- 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.
Last Article: SQL Execution
Next Article: SQL Plan Execution
Did this article solve your problem?
Thank you for your score!Your feedback would help us improve the website.