All Products
Search
Document Center

PolarDB:Use the performance insight feature

Last Updated:Jan 29, 2024

Performance Insight is a feature for database performance optimization, load monitoring, and association analysis. This feature provides an intuitive and easy way for you to evaluate database loads and find the causes of performance issues and the problematic SQL statements. Then, you can determine how to improve database performance based on these causes.

Procedure

  1. Log on to the PolarDB console.

  2. In the upper-left corner of the PolarDB console, select the region in which the cluster that you want to manage is deployed.

  3. On the Clusters page, click the ID of the cluster.

  4. In the left-side navigation pane, choose Diagnostics and Optimization > Quick Diagnostics.

  5. Click the Performance Insight tab.

  6. Click Enable Performance Insight.

  7. In the dialog box that appears, click OK.

  8. On the Performance Insight tab, view and manage the performance information.

    • In the Performance Insight section, you can specify a time range to view the performance metrics within the specified period. If you want to view the details of a specific performance metric such as CPU utilization, click Details in the upper-right corner of the performance metric section.

      Note

      The duration of the specified time range cannot exceed seven days.

    • In the Average Active Session section, you can view the trends of different types of sessions, such as sessions that are created to execute SQL statements. You can also view the database workloads from multiple dimensions. This can help you identify the root causes of performance issues.

Data metrics

Performance Insight uses the pg_stat_activity view as a data source. After data sampling is implemented based on this view, you can obtain the following information:

  • Users and wait events

  • SQL statements and hosts

  • Databases and connection states

Comparison between the regular troubleshooting process and the Performance Insight-based troubleshooting process

Issue

Regular troubleshooting process

Performance Insight-based troubleshooting process

At a specific time point, an UPDATE SQL statement slows down, or a large number of logs related to the UPDATE statement are found in audit logs.

  • Check the performance monitoring data.

  • Check the logs of slow SQL queries.

  • Check a large number of audit logs.

  • Specify a time range during which the issue occurs.

  • Select different performance metrics to reflect different aspects of the issue.

  • Find the problematic SQL statement.

  • Check the status of the problematic SQL statement.

The time required to execute a same SQL statement on different clients varies in a significant way. The clients are deployed in different data centers.

  • Check the performance monitoring data.

  • Perform analysis based on network packet capture.

  • Specify a time range during which the issue occurs.

  • Check the host states.

  • Find the causes based on multidimensional information.