Skip to Main Content

SQL Developer

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

How does SQL Developer do an explain plan?

John_KJan 16 2018 — edited Jan 19 2018

Sorry for all the recent questions - I'm genuinely trying to move onto SQL Developer "full time" but I keep hitting snags.

Anyway, I was wondering - what is SQL Developer doing when it does an explain plan? Version 17.4.0.355.

SD.png

Why do I need to commit my prior transaction to do an explain plan?

Same test in sqlplus works fine:

SQL> create table a(b number);

Table created.

SQL> insert into a values (1);

1 row created.

SQL> explain plan for select * from dual;

Explained.

SQL> select * from table(dbms_xplan.display);

PLAN_TABLE_OUTPUT

--------------------------------------------------------------------------------

Plan hash value: 272002086

--------------------------------------------------------------------------

| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |

--------------------------------------------------------------------------

| 0 | SELECT STATEMENT | | 1 | 2 | 2 (0)| 00:00:01 |

| 1 | TABLE ACCESS FULL| DUAL | 1 | 2 | 2 (0)| 00:00:01 |

--------------------------------------------------------------------------

8 rows selected.

SQL> select * from a;

     B

----------

     1

SQL> rollback;

Rollback complete.

SQL> select * from a;

no rows selected

Also works fine in Toad.

Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Feb 16 2018
Added on Jan 16 2018
14 comments
1,614 views