Simple sql*plus script to show explain plan

In SQL*Plus you can use this simple way how to show explain plan:


SET AUTOTRACE ON
SET TIMING ON
SET TRIMSPOOL ON
SET LINES 200
SPOOL filename.txt
SET AUTOTRACE TRACEONLY;

...here your select....

SPOOL OFF
SET AUTOTRACE OFF

Leave a Reply

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