Oracle stored procedure execution plan provides execution information, including access path, estimated number of rows, connection sequence and cost. To view the execution plan, execute the EXPLAIN PLAN command and look for the "Execution Plan" section. The execution plan contains a header and body, showing in detail the ID, operation type, number of rows, cost, access path, filter conditions, involved tables and indexes, and the connection sequence if there is a connection.
Viewing Oracle stored procedure execution plan
Oracle stored procedure execution plan provides information about how the stored procedure is executed. Detailed insights, including:
View the steps to execute the plan:
<code class="sql">EXPLAIN PLAN FOR <存储过程名称>;</code>
The results include the "Execution Plan" section, which displays the execution plan in detail.
Understand the execution plan:
Header:
Text:
Example execution plan :
<code class="sql">EXPLAIN PLAN FOR get_customer_orders; ID | Operation | Rows | Cost ----|----------------------------------------|-------|----- 0 | SELECT STATEMENT | 1000 | 100 1 | TABLE ACCESS FULL | 1000 | 100 | ORDER_HDR |</code>
This execution plan indicates that:
get_customer_orders
will access the ORDER_HDR
table. The above is the detailed content of How to read the Oracle stored procedure execution plan. For more information, please follow other related articles on the PHP Chinese website!