Show me the query plan!

Jim Horn
Jim Horn used Ask the Experts™
on
When I execute SELECT * FROM table(dbms_xplan.display) after a simple query I'm getting the error message in the below image.  Anyone know the correct syntax to see the query plan? Screen-Shot-2016-01-28-at-3.39.34-PM.png
Thanks in advance.
Jim
Comment
Watch Question

Do more with

Expert Office
EXPERT OFFICE® is a registered trademark of EXPERTS EXCHANGE®
Most Valuable Expert 2012
Distinguished Expert 2018
Commented:
You need to explain a statement to generate the plan before you can display it...

explain plan for select 1 from dual;

the "explain plan for" before the select is important...
Most Valuable Expert 2012
Distinguished Expert 2018
Commented:
Note:  explain plan never executes the statement.

If you want some more stats and don't mind executing the statement (sqlplus commands but SQL Developer should recognize them):
set autotrace traceonly

select 1 from dual;

set autotrace off
Steve WalesSenior Database Administrator

Commented:
No comment has been added to this question in more than 21 days, so it is now classified as abandoned.

I have recommended this question be closed as follows:

Split:
-- slightwv (https:#a41438544)
-- slightwv (https:#a41438535)


If you feel this question should be closed differently, post an objection and the moderators will review all objections and close it as they feel fit. If no one objects, this question will be closed automatically the way described above.

sjwales
Experts-Exchange Cleanup Volunteer

Do more with

Expert Office
Submit tech questions to Ask the Experts™ at any time to receive solutions, advice, and new ideas from leading industry professionals.

Start 7-Day Free Trial