Friday , April 19 2024

Displaying Execution Plans With sqlplus

 

We can also display the execution plan with sqlplus. For this we can use the explain plan tool with sqlplus.

To use the Explain plan tool, the PLAN_TABLE table must be present under the corresponding schema. Some tools, such as Toad, will automatically create this table when you first view the execution plan. You can also create this table as below.

Display the execution plan of the query:

When we run the “set autotrace traceonly explain” command before the query runs as above, the query will no longer produce output and only the execution plan will be displayed.

Loading

About dbtut

We are a team with over 10 years of database management and BI experience. Our Expertises: Oracle, SQL Server, PostgreSQL, MySQL, MongoDB, Elasticsearch, Kibana, Grafana.

Leave a Reply

Your email address will not be published. Required fields are marked *

Categories