SQL Analysis
APM displays key metrics, such as SQL statement calls, response time, and errors for analyzing database performance problems caused by slow or error SQL statements. SQL analysis supports MySQL, Oracle, and PostgreSQL relational databases only.
SQL Page
Analyzing Abnormal SQL Statements
When an SQL statement of a database is abnormal, performance problems such as service timeout may occur. During routine O&M, you can monitor key metrics, such as error duration and latency of databases, locate the SQL statements that take a long time to execute, operate at low efficiency, or fail to be called, and then analyze and optimize them.
The SQL analysis function determines whether to collect SQL data. Before performing the following operations, ensure that this function is enabled. Otherwise, no SQL data can be queried. This function is enabled by default. If it is disabled, choose Agent > Configuration in the navigation pane and then enable it.
- Log in to the APM console.
- In the navigation pane, choose SQL Analysis.
- On the SQL Analysis page, select the time range during which a problem occurred.
- On the Overview tab page, locate the faulty database in the application based on key metrics. If a database requires long response time and has many call errors, performance problems may occur.
- Analyze the problem cause.
Click the SQL Analysis tab, and locate the abnormal SQL statement in the SQL statement list.
- Further analyze the cause.
- Click the abnormal SQL statement to go to the Call Chain page and check the impact of this statement on the entire service.
- Click View Call Relationship in the Operation column to find out the method of the abnormal SQL statement. Analyze the cause of the abnormal SQL statement in this method. For example, check whether the index is used, data volume is overlarge, syntax is correct, or deadlock occurs. Then, optimize the SQL statement accordingly.
- Click the abnormal SQL statement to go to the Call Chain page and check the impact of this statement on the entire service.
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