This topic introduces how to view the information about SQL statement execution in the SQL window.
Background information
The SQL window provides a user interface for data processing. In the SQL window, you can perform systematic evaluation on the SQL statements, analyze the execution details, and view the overall time consumption information.
Execution plans
Assume that you need to query the employee table. Before you query the table, you can perform systematic evaluation on the query statement.
In the SQL window, edit the SQL statement for querying the data inserted into the
employeetable.SELECT `emp_no`, `birthday`, `name` FROM `odc_test`.`employee`;As shown in the preceding figure, select an SQL statement and click the Execution Plan icon to estimate the execution data (the result of the EXPLAIN PLAN operation) before executing the SQL statement. The execution data displayed may be slightly different from the actual execution data.
On the Plan Details tab, click View Formatting Info to switch to the formatted view.
Execution details
On the Results tab, click the Plan icon.
On the Execution Details page, you can view information in the following fields: Basic Information, Time Spent, I/O Statistics, Executed SQL Statements, Plan Statistics, and Outline.
DB Time
On the Record tab, you can move the pointer over the icon next to a value in the DB Time column. In the prompt message that appears, you can view the total execution duration of the SQL statement and verify whether the duration of each phase adds up to the total execution duration.