Home » RDBMS Server » Performance Tuning » Speed Diffrence
Speed Diffrence [message #276472] Thu, 25 October 2007 04:47 Go to next message
nirajksharmacpr
Messages: 19
Registered: October 2007
Location: Mumbai
Junior Member

Hi All
Just suggest me Which one if Better For PT(Performance Tuning) point
Thnx n Sorry i am Just Changing in my question and add this thing in the query as Requirment
1.[b]select * from a Natural join b Natural join c

2.select * from a , b, c where a.id=b.id and b.id =a.id

In Our Application 2nd No Query is Using But i want to Replace with 1 No Query . So Please Suggest.

Thnx n Regrads

[Updated on: Thu, 25 October 2007 04:57]

Report message to a moderator

Re: Speed Diffrence [message #276475 is a reply to message #276472] Thu, 25 October 2007 04:50 Go to previous messageGo to next message
Michel Cadot
Messages: 64153
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Queries do not return the same result set, so performances comparison is meaningless.

Regards
Michel
Re: Speed Diffrence [message #276670 is a reply to message #276475] Thu, 25 October 2007 22:46 Go to previous messageGo to next message
rleishman
Messages: 3724
Registered: October 2005
Location: Melbourne, Australia
Senior Member
ANSI join syntax is no more or less performant than the old syntax.

Personally, I prefer not to use NATURAL joins as it joins on all columns in the tables with the same name. You often find that tables have meta-data columns with the same name (eg. DATE_UPDATED) that you do not want in the join criteria.

If you wanted to change to INNER JOIN syntax though, all you are affecting is aesthetics, not performance.

Ross Leishman
Re: Speed Diffrence [message #276700 is a reply to message #276472] Fri, 26 October 2007 00:51 Go to previous messageGo to next message
Michel Cadot
Messages: 64153
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator


In the original post, query 1 was with outer join and not natural one.

Please do NOT modify the original post, add a new one.
Modifying the original post you turn the following posts ununderstandable.

In addition, when you modified you could read and follow OraFAQ Forum Guide, especially "How to format your post?" section.

Regards
Michel

[Updated on: Fri, 26 October 2007 00:53]

Report message to a moderator

Re: Speed Diffrence [message #276987 is a reply to message #276472] Sat, 27 October 2007 12:29 Go to previous message
michael_bialik
Messages: 611
Registered: July 2006
Senior Member
The second statement you specified:
select * from a , b, c where a.id=b.id and b.id =a.id


does NOT have join conditions to c table.


Previous Topic: want to reduce the COST
Next Topic: hint: first_rows
Goto Forum:
  


Current Time: Sun Dec 11 02:10:37 CST 2016

Total time taken to generate the page: 0.12261 seconds