Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I was wondering performance wise what would be faster a join or a from and where query. I am trying merge and update query but performance is terrible?

share|improve this question
    
can you give more information about your problem? –  Atilla Ozgur Feb 3 '12 at 12:20
    
Can you post your query? –  BryceAtNetwork23 Feb 3 '12 at 14:13
1  
Post your query plan –  Gaius Feb 3 '12 at 19:40
add comment

1 Answer

up vote 4 down vote accepted

If you are asking whether it is more efficient to use SQL 92 join syntax

SELECT empno, ename, dname
  FROM emp
       JOIN dept USING (deptno)

or to use the older join syntax

SELECT empno, ename, dname
  FROM emp  e,
       dept d
 WHERE e.deptno = d.deptno

the answer is that it doesn't matter. The optimizer is automatically going to do an internal transformation from the SQL 92 syntax to the older syntax anyway.

If you have performance problems, it is highly unlikely that they are related to your choice of join syntax (though when Oracle first added support for SQL 92 join syntax, there were bugs relating to its ability to transform the SQL into the older style).

share|improve this answer
1  
Just want to add to your answer that Oracle (at least Oracle 10)still has some problems with JOIN syntax. I can create refresh fast on commit materialized view using the old syntax (join condition in where), but I can't do the same with normal join. –  a1ex07 Feb 3 '12 at 16:22
1  
@a1ex07 - still true in 11g (11.2.0.2, anyway). –  Alex Poole Feb 3 '12 at 17:53
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.