Creating a SQL Insights Task
Scenarios
SQL Insights allows you to not only query all executed SQL statements, but also analyze and search for the tables that are accessed and updated most frequently, and the SQL statements that have the longest lock wait, helping you quickly identify exceptions.
Constraints
- You need to enable Collect All SQL Statements before using SQL Insights.
- After Collect All SQL Statements is disabled, new SQL statements will not be collected anymore and the collected SQL data will be deleted.
- Only the tasks created in the last two days can be displayed.
Procedure
- Log in to the management console.
- Click in the upper left corner and select a region.
- Click in the upper left corner of the page and choose Databases > Relational Database Service.
- On the Instances page, click the DB instance name.
- In the navigation pane, choose DBA Assistant > Historical Diagnosis.
- Click SQL Explorer and then SQL Insights.
- Click next to Collect All SQL Statements.
To disable this function, click Log Settings in the upper right corner, toggle off the Collect All SQL Statements switch, and click OK.
Collecting all SQL statements generates a performance loss of no more than 5%.
Figure 1 Log settings
- Click Create Task. In the displayed dialog box, specify Time Range, Dimension, and other configuration items, and click OK.
Figure 2 Creating a SQL Insights Task
- In the task list, click Details in the Operation column to view task details.
Figure 3 Viewing task details
Feedback
Was this page helpful?
Provide feedbackThank you very much for your feedback. We will continue working to improve the documentation.See the reply and handling status in My Cloud VOC.
For any further questions, feel free to contact us through the chatbot.
Chatbot