Oracle-based application systems have many performance problems, which are caused by poor SQL Performance of application systems. Therefore, SQL Performance optimization is very important, to analyze and optimize the SQL Performance, we generally view the SQL Execution Plan. This article describes how to understand the execution plan and how to optimize the SQL statement by analyzing the execution plan.
1. What is an execution plan)
Execution Plan: the execution process or access path of a query statement in ORACLE.
Ii. How to view the execution plan
1: Press F5 under PL/SQL to view the execution plan. Third-party tools such as toad.
Many people think that the PL/SQL Execution Plan can only see basic information such as the base number, optimizer, and consumption. In fact, this can be set in the PL/SQL tool. You can see a lot of other information, as shown below
2: execute the following steps under SQL * PLUS (PL/SQL command window and SQL window)
SQL>EXPLAINPLAN FOR SELECT * FROMSCOTT. EMP;--SQL script to be parsedSQL>SELECT * FROM TABLE(DBMS_XPLAN.DISPLAY );