The SQL Explorer feature captures information about all DQL, DML, and DDL operations and then outputs the information through the database kernel with minimal CPU usage.
Prerequisites
SQL insight and stress testing (new version) is enabled.
Procedure
Click the SQL Explorer tab.
Select feature items 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 time range.
You can also click Hide/Show More to expand the Full Request Statistics section to view detailed information about all SQL statements within the selected time range. You can click Export to export the information (up to 10 million rows of data in a single export).
Display by Comparison: Select two time ranges to compare the Execution Duration Distribution, Execution Duration, and Executions of SQL statements.
You can view the comparison results in the Requests by Comparison section.
Source Statistics: Select a time range to view SQL execution information by source IP address. This feature is supported only for compute nodes.
User Statistics: Select a time range to view SQL execution information by database account. This feature is supported only for compute nodes.
Traffic Playback and Stress Test: You can use the traffic playback and stress testing feature to determine whether you must scale the instance specifications and verify the performance in actual business scenarios. This reduces the risk of failures after the system goes online.
Statistical items
Execution Duration Distribution: Displays the distribution of SQL execution durations within the selected time range. The durations are divided into seven intervals, which are calculated every minute.
[0,1]ms: the percentage of SQL execution durations between 0 ms and 1 ms.[1,2]ms: the percentage of SQL execution durations between 1 ms and 2 ms.(2,3]ms: the percentage of SQL execution durations between 2 ms and 3 ms.(3,10]ms: the percentage of SQL execution durations between 3 ms and 10 ms.(10,100]ms: the percentage of SQL execution durations between 10 ms and 100 ms.(0.1,1]s: the percentage of SQL execution durations between 0.1 s and 1 s.>1s: the percentage of SQL execution durations longer than 1s.
NoteIf an instance's Execution Duration Distribution is closer to blue, it indicates optimal performance and good health of the SQL queries. If it approaches orange and red, it suggests a decline in the SQL health of the instance.
Execution Duration: displays the execution duration of SQL queries within the selected time range.
Full Request Statistics: displays the SQL statement, execution duration percentage, average execution duration, execution trend, and other information for each SQL query type within the selected time range.
NoteExecution duration percentage = (Execution duration of the SQL type × Number of executions )/(Total execution durations of all SQLs × Total number of executions) × 100%. The higher the execution duration percentage, the higher the consumption of MySQL resources.
SQL ID: the unique identifier of a SQL type, which is used to track its performance trends and sample data.
SQL Sample: The application client (IP address) that initiated the SQL query.
NoteThe SQL sample is encoded using the UTF-8 character set.