Home > Oracle > Using Explain Plan for Plan Execution in Oracle

Using Explain Plan for Plan Execution in Oracle

EXPLAIN PLAN FOR
SELECT DISTINCT s.srvr_id
FROM servers s, serv_inst i
WHERE s.srvr_id = i.srvr_id;

set pagesize 25
set linesize 121

SELECT * FROM TABLE(dbms_xplan.display);

Display a specific plan by name:

EXPLAIN PLAN
SET STATEMENT_ID = ‘abc’ FOR
SELECT DISTINCT s.srvr_id
FROM servers s, serv_inst i
WHERE s.srvr_id = i.srvr_id;

set pagesize 25
set linesize 121

SELECT * FROM TABLE(dbms_xplan.display(‘PLAN_TABLE’,’abc’,’BASIC’));
SELECT * FROM TABLE(dbms_xplan.display(‘PLAN_TABLE’,’abc’,’TYPICAL’));
SELECT * FROM TABLE(dbms_xplan.display(‘PLAN_TABLE’,’abc’,’ALL’));

Categories: Oracle
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: