All Products
Search
Document Center

PolarDB:SQL Explorer for PolarDB Distributed Edition

Last Updated:Aug 27, 2026

The SQL Explorer feature records all Data Query Language (DQL), Data Manipulation Language (DML), and Data Definition Language (DDL) operations. The database kernel outputs this information with minimal impact on CPU consumption.

Prerequisites

The sql insight and stress testing (new version) feature must be enabled.

Procedure

  1. Click the SQL Insights tab.

  2. Select a feature as needed:

    • Display by Time Range: Select a time range to view the Execution Duration Distribution, Execution Duration, and Executions of SQL statements within the selected time range.

      You can also click Show More to expand the Full Request Statistics section to view detailed information about all SQL statements in the selected time range. You can Export this information. A single export is limited to 10 million rows.

    • Display by Comparison: Select two time ranges to compare the Execution Duration Distribution, Execution Duration, and Executions of SQL statements between the two time ranges.

      You can also view detailed comparison results in the Requests by Comparison section.

    • Source Statistics: Select a time range to view SQL execution information grouped by source IP address. This feature is supported only on compute nodes.

    • User Statistics: Select a time range to view SQL execution information grouped by database account. This feature is supported only on compute nodes.

    • Traffic Playback and Stress Test : You can use the traffic playback and stress testing feature to determine whether your instance specifications need to be scaled up. This feature also lets you validate performance under real-world business scenarios, reducing the risk of post-launch failures.

Metrics

  • Execution Duration Distribution: Displays the distribution of execution durations for all SQL statements in a selected time range. Durations are categorized into seven intervals and calculated once per minute:

    • [0,1]ms: The percentage of executions where 0 ms ≤ duration ≤ 1 ms

    • (1,2]ms: The percentage of executions where 1 ms < duration ≤ 2 ms

    • (2,3]ms: The percentage of executions where 2 ms < duration ≤ 3 ms

    • (3,10]ms: The percentage of executions where 3 ms < duration ≤ 10 ms

    • (10,100]ms: The percentage of executions where 10 ms < duration ≤ 100 ms

    • (0.1,1]s: The percentage of executions where 0.1s < duration ≤ 1s

    • >1s: The percentage of executions where duration > 1s

    Note

    Blue in the Execution Duration Distribution chart indicates good SQL health, while orange and red indicate poor health.

  • Execution Duration: Shows the execution duration of SQL statements over the selected time range.

  • Full Request Statistics: Displays information for each SQL type within the selected time range, including the SQL text, execution duration percentage, average execution duration, and execution trend.

    Note

    execution duration percentage = (execution duration of the SQL type × number of executions) / (total execution duration of all SQL types × total executions) × 100%. The higher the execution duration percentage, the more MySQL resources the SQL type consumes.

  • SQL ID: A unique identifier for an SQL type. Use the SQL ID to view its performance trends and SQL samples.

  • SQL Sample: Shows which application client (IP address) initiated the SQL statement.

    Note

    The SQL sample is encoded in UTF-8.