Help Center > > User Guide> SQL Analysis

SQL Analysis

Updated at: Mar 17, 2020 GMT+08:00

Application Performance Management (APM) displays key metrics, such as the database, SQL statement calls, latency, and errors for analyzing database performance problems caused by abnormal SQL statements. Such statements refer to slow or error SQL statements. SQL analysis supports only MySQL, Oracle, and PostgreSQL relational databases.

SQL Page

Figure 1 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 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 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.

  1. On the SQL Analysis page, select the time range during which a problem occurred.
  2. 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.

  3. Analyze the problem cause of the database.

    Click the SQL Analysis tab, and locate the abnormal SQL statement in the SQL statement list.

  4. Further analyze the cause of the abnormal SQL statement.

    1. Click the abnormal SQL statement to go to the Call Chain page and check the impact of the abnormal SQL statement on the entire service.

    2. 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 no index is used, the data volume is overlarge, the syntax is incorrect, or a deadlock occurs. Then, optimize the SQL statement accordingly.

Did you find this page helpful?

Submit successfully!

Thank you for your feedback. Your feedback helps make our documentation better.

Failed to submit the feedback. Please try again later.

Which of the following issues have you encountered?







Please complete at least one feedback item.

Content most length 200 character

Content is empty.

OK Cancel