Skip to Main Content

SQL & PL/SQL

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!

WITH Clause Performance

indra budianthoMay 23 2012 — edited May 23 2012
Is there performance penalty of using WITH clause?

For example:

with t as(
select 1 from dual
),
x as (
select 1 from dual
)
select * from t, x

versus

select 1 from dual t, dual x

When i run explain plan, it shows the same. I am wondering for more complex query. Thank you.

SELECT STATEMENT ALL_ROWSCost: 4 Cardinality: 1
3 NESTED LOOPS Cost: 4 Cardinality: 1
1 FAST DUAL Cost: 2 Cardinality: 1
2 FAST DUAL Cost: 2 Cardinality: 1
This post has been answered by Billy Verreynne on May 23 2012
Jump to Answer
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Jun 20 2012
Added on May 23 2012
20 comments
15,942 views