All Products
Search
Document Center

PolarDB:Use the performance insight feature

Last Updated:Mar 28, 2026

When database load spikes and SQL queries slow down, finding the root cause across multiple monitoring tools, audit logs, and session data is time-consuming. Performance Insight consolidates this information into a single view, so you can pinpoint problematic SQL statements and their root causes without switching between tools.

With Performance Insight, you can:

  • Identify which SQL statements contribute most to database load

  • Analyze session activity across multiple dimensions—users, wait events, hosts, and connection states

  • Specify a time range to isolate when a performance issue occurred

Prerequisites

Before you begin, ensure that you have:

Enable Performance Insight

  1. Log on to the PolarDB console.

  2. In the upper-left corner, select the region where your cluster is deployed.

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

  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.

Analyze performance data

After you enable Performance Insight, the Performance Insight tab displays two sections.

Performance Insight section

Displays performance metrics for a time range you specify. To see details for a specific metric such as CPU utilization, click Details in the upper-right corner of that metric's panel.

The time range cannot exceed seven days.

Average Active Session section

Displays session trends broken down by type—for example, sessions executing SQL statements. Use these trends to understand database workload from multiple dimensions and identify the root cause of performance issues.

How Performance Insight works

Performance Insight samples data from the pg_stat_activity view and exposes the following dimensions:

DimensionWhat it shows
Users and wait eventsWhich users are active and what they are waiting on
SQL statements and hostsWhich SQL statements are running and from which hosts
Databases and connection statesWhich databases are under load and the state of each connection

Diagnose a performance issue

Use the following workflow to investigate a performance problem:

  1. Identify the time range. In the Performance Insight section, specify the period during which the issue occurred.

  2. Select relevant metrics. Review the available performance metrics to confirm when load spiked.

  3. Inspect session trends. In the Average Active Session section, look for unusual session patterns or wait event spikes in that time window.

  4. Locate the problematic SQL statement. Correlate session activity with specific SQL statements or hosts to identify the query responsible for the load.

  5. Check the statement's status. Examine the connection state and wait event for that statement to determine the root cause.

The following table compares the traditional troubleshooting process with the Performance Insight-based approach:

IssueTraditional approachWith Performance Insight
An UPDATE statement slows down, or a large number of logs related to the UPDATE statement are found in audit logsCheck performance monitoring data; review slow SQL query logs; scan audit logsSpecify the affected time range; select relevant metrics; locate the problematic SQL statement; check its status
The same SQL statement runs significantly slower from clients in different data centersCheck performance monitoring data; run network packet capture analysisSpecify the affected time range; check host states; trace the cause using multidimensional session data