SQL Analysis
Application Performance Management (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. Currently, SQL analysis supports MySQL, Oracle, and PostgreSQL relational databases only.
SQL Page Description
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 the 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 make analysis and optimization accordingly.
The SQL analysis function determines whether to collect SQL data. Before performing the following steps, 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 enable it.
- On the SQL Analysis page, set the time range during which a problem occurred in the upper right corner.
- On the Overview tab page, locate the faulty database in the application based on key metrics. If a database has long latency and many call errors, a performance problem may occur.
- Analyze the performance problem.
Click the SQL Analysis tab, and locate the abnormal SQL statement.
- 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.
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