WHERE vs JOIN    which is the best

dear all
I learned to make join between emp table and dept table using the where clause.
Example :
select e.ename,d.dname
from emp e, dept d
where e.deptno = d.deptno;
One of my friends told me that join using where clause is not good in performance, instead one has to use join clause
example
select e.ename,d,dname
from emp e join dept d on (e.deptno = d.deptno);
I just want to know which one is best in performance ?
Please I need your advice

If you want to find a difference, using WHERE is the traditional, classical Oracle syntax. Uning JOIN is ANSI SQL99 syntax, introduced in Oracle RDBMS 9iRel1.
Now let's play MythBusters. The optimizer will interpret both syntaxes (Traditional, and ANSI SQL99) exactly the same. If you use the classical AUTOTRACE you will realize both syntaxes produce the same execution plan and both of them will use the same amount of resources, as shown below.
SQL> set autotrace traceonly
SQL> select e.ename,d.dname
2 from emp e, dept d
3 where e.deptno = d.deptno;
14 rows selected.
Execution Plan
0 SELECT STATEMENT Optimizer=CHOOSE
1 0 MERGE JOIN
2 1 SORT (JOIN)
3 2 TABLE ACCESS (FULL) OF 'DEPT'
4 1 SORT (JOIN)
5 4 TABLE ACCESS (FULL) OF 'EMP'
Statistics
0 recursive calls
0 db block gets
36 consistent gets
0 physical reads
0 redo size
655 bytes sent via SQL*Net to client
503 bytes received via SQL*Net from client
2 SQL*Net roundtrips to/from client
2 sorts (memory)
0 sorts (disk)
14 rows processed
SQL> select e.ename,d.dname
2 from emp e join dept d on (e.deptno = d.deptno);
14 rows selected.
Execution Plan
0 SELECT STATEMENT Optimizer=CHOOSE
1 0 MERGE JOIN
2 1 SORT (JOIN)
3 2 TABLE ACCESS (FULL) OF 'DEPT'
4 1 SORT (JOIN)
5 4 TABLE ACCESS (FULL) OF 'EMP'
Statistics
0 recursive calls
0 db block gets
36 consistent gets
0 physical reads
0 redo size
655 bytes sent via SQL*Net to client
503 bytes received via SQL*Net from client
2 SQL*Net roundtrips to/from client
2 sorts (memory)
0 sorts (disk)
14 rows processed
Conclusion, if you want to improve performance consider using indexes, generate statistics on your segments, use an analytical approach. There are so many other ways to improve performance.

Similar Messages

  • Which is the best DVD RW?

    Hello,
    I am planning of buying a dvd rw and I don't know which is the best right now. I am planning of spending about 100 - 150 dollars. I am going to place the Dvd Rw into an ide that supports Ultra DMA mode 1 so I don't actually want the best one, I just want one thats going to get my job done. Can anyone give me any clues about what is the best option for me? Can you please give me any details?
    Thanks,
    PhanosP

    Hi PhanosP
    1) ""First I am concerned about the ability of any DVD drive to play all the regions. Is this drive able to play both region 1 and region 2 or it has to be patch.""
    As far as I know, all drives manufactured over the last couple of years use region settings.
    The free software program DVD Genie may fix this, so you can play DVD's from another region. For this and other progs, please see http://www.doom9.org/   There you may find loyes of info on this topic and anything you mighty want to know about burning DVD's
    Please also read other topics in this forum like:
    "" RegionfreeDR4-A"" or
    "" MSI DR4-A Region locked""
    If you want the region setting removed entirely from your drive, indeed you will need a patch (probably a patched firmware update). I myself don't know where you might find this, so you might need to browse the internet. (Maybe  also somewhere on the http://www.doom9.org/  site. Or perhaps another forum visitor may know the answer. I myself did not bother searching yet, as I never encountered problems reading DVD's sofar.
    Furthermore: Also some (freeware) programs (like DVDdecrypter) used for decrypting DVD's >You need them if you want to rip/ copy copyrightprotected DVD's
    2)
    ""Secondly the reviews are almost 3 moths old. Aren't any newer reviews with some newer drives like the one you are using.
    You'll have to browse the internet to find newer reviews. Unfortunately not much reviews are as good as the ones on Tom's site. Because Tom's cover so many products and produce so many articles, they only make reviews of DVD burners from time to time. I did not see a good review of recent drives yet. If you find one, please tell me! I'm also very curious about the review on my MSI DR4-A drive, as it pleases me okay.
    Good luck !
    Sjaak
    Kind regards,
    Sjaak

  • Which is the best way for posting a large number of records?

    I have around 12000 register to commit to dababase.
    Which is the best way for doing it?
    What depends on ?
    Nowadays I can't commit such a large number of register..The dabatase seems hanged!!!
    Thanks in advance

    Xavi wrote:
    Nowadays I can't commit such a large number of registerIt should be possible to insert tens of thousands of rows in a few seconds using an insert statement even with a complex query such as the all_objects view, and commit at the end.
    SQL> create table t as select * from all_objects where 0 = 1;
    Table created.
    Elapsed: 00:00:00.03
    SQL> insert into t select * from all_objects;
    32151 rows created.
    Elapsed: 00:00:09.01
    SQL> commit;
    Commit complete.
    Elapsed: 00:00:00.00
    I meant RECORDS instead of REGISTERS.Maybe that is where you are going wrong, records are for putting on turntables.

  • Which is the best virus protector for mac as  i think something is accessing my internet and costing me  a lot from uploads, which is the best virus protector for mac as  i think something is accessing my internet and costing me  a lot from uploads

    which is the best anit virus protection to block forien uploads using my service provider as  there has been usage and i havent been  on the computor

    Hi Greg,
    Best protection is a really secure WPA2 Passwoird to join your Router... WEP or Open is worthless, WPA can be broken, but WPA 2 is still likely not to be broken fo awhile.
    Little Snitch, stops/alerts outgoing stuff...
    http://www.obdev.at/products/littlesnitch/index.html
    ClamXAV, free Virus scanner...
    http://www.clamxav.com/
    Free Sophos...
    http://www.sophos.com/products/enterprise/endpoint/security-and-control/mac/
    See if you might have this malware redirecting DNS queries...
    http://macmegasite.com/node/3924
    http://www.ehow.com/how_2128387_remove-osxrspluga-trojan-horse-mac.html
    How to fix...
    http://www.macosxhints.com/article.php?story=20071031114140862
    Get MacScan...
    http://www.apple.com/downloads/macosx/networking_security/macscan.html
    Malware  list....
    How to uninstall MacKeper...
    http://applehelpwriter.com/2011/09/21/how-to-uninstall-mackeeper-malware/
    https://discussions.apple.com/docs/DOC-3039
    http://x704.net/bbs/viewtopic.php?f=6&t=4479

  • Which is the best way for creating video placeholders in AE?

    I should create some video placeholder for AE animation, but I am not sure which is the best approach to do that.
    I found some tutorials on the web where is explained how to create basic placeholders in AE, but I want to do something better.
    Could I create some placeholder even in Photoshop? And after that to import this psd files into AE.
    I saw some intersting placeholders on Videohive but I don't know how to create something similar?
    Any help?
    Regards!

    Any layer may be replaced with new footage by simply selecting the layer you want to replace in the composition, then selecting the new footage in the project panel, then holding down the Alt/Option key and dragging the new footage to the composition.
    If you want to automate the process of replacing footage you'll have to use a script.
    If you want to use a project as a template then simply copy the template file in it's folder and paste it into a folder that contains the same structure as the template. IOW, the folders should look like this:
    Template Project
         >template.aep
         >Footage
    New project
         >copiedtemplate.aep
         >Footage
    Your footage has to have the same filename as the original template project.
    You can also save an AE project as a template (aet) project. That's what they are doing on siges like Video Hive. The template isn't easily overwritten so it maintains the work. Then you simply add your footage using the first technique that I talked about.

  • Which are the best settings for exporting comps before edditing in Premiere Pro

    Hello everyone!
    As the title says, which are the best settings for exporting comps from AE to Pr.Pro and then edit them?
    Let  me explain: I have two comps in AE (intro and outro) and want to export  them in Pr.Pro for edditing along with a fottage i shot.
    When i render them the size of the files are huge (30 sec= 7GB).
    Which  is the best method (and settings) i can export the intro and outro to a 'normal' file  size and then put them in Pr.Pro without loosing any quality??
    [Comp settings: HDTV 1080 29.97 (1920x1080)]
    AE and Premiere Pro both CS4

    If you're rendering and exporting an intermediate video file to go from After Effects to any other piece of post-production software (such as Premiere Pro), you want to make sure that you're not losing any quality.
    Most compression methods, which make movies smaller, also lose some of the image data---i.e., quality. There are a few compression methods that don't lose any image data; these are "lossless" codecs. These lossless codecs do decrease the size of a video file, but they're nowhere near as effective at decreasing size as the lossy codecs are. But file size isn't important when you're doing post-production work. Big files are a fact of life in post-production.
    Examples of lossless codecs include the PNG codec and the Animation codec at the highest quality settings, both of which can be used in a QuickTime (.mov) container. I prefer the PNG codec; it's more efficient for photorealistic images, whereas Animation is more efficient for things like cartoons. There are lots of other lossless and nearly lossless codecs. A lot of people that do video editing like the Lagarith codec, but that is something that you'd have to go and get; it's not part of a standard CS5 or QuickTime installation.
    See these FAQ entries for information about compression and why file sizes are big for losslessly encoded files:
    "FAQ: Why is my output file huge...?"
    "FAQ: What is the best format for rendering and exporting from After Effects?"
    By the way, keep in mind that you don't always need to render and export an intermediate movie to go from After Effects to Premiere Pro. There are other ways to move data back and forth between these applications, including Dynamic Link. Which is best depends on the specific circumstance. See "Working with Premiere Pro and After Effects".

  • I have a external Hard drive of 1TB. I want to transfer HD movies to it from my MAC but it can only take 4 gb at a time, now i have to format it which is the best format in this situation NTFS or exFAT, as i use windows part ion as well??

    I have a external Hard drive of 1TB. I want to transfer HD movies to it from my MAC but it can only take 4 gb at a time, now i have to format it which is the best format in this situation NTFS or exFAT, as i use windows part ion as well?? plzz help
    Merry Christmas

    Repartition and format the drive for a Mac:
    Drive Preparation
    1. Open Disk Utility in your Utilities folder.
    2. After DU loads select your hard drive (this is the entry with the mfgr.'s ID and size) from the left side list. Click on the Partition tab in the DU main window.
    3. Under the Volume Scheme heading set the number of partitions from the drop down menu to one. Click on the Options button, set the partition scheme to GUID then click on the OK button. Set the format type to Mac OS Extended (Journaled.) Click on the Partition button and wait until the process has completed.
    4. Select the volume you just created (this is the sub-entry under the drive entry) from the left side list. Click on the Erase tab in the DU main window.
    5. Set the format type to Mac OS Extended (Journaled.) Click on the Security button, check the button for Zero Data and click on OK to return to the Erase window.
    6. Click on the Erase button. The format process can take up to several hours depending upon the drive size.

  • Which is the best software to convert dvd to IPad 2d

    Which is the best software to convert dvd to IPad 2d

    unfortunately discussing the breaking of the encryption that comes with commercial dvd's is prohibited in these forums. however a quick google search will get you to quite a few software providers....
    on a personal note, i don't agree with the fact that we can't "legally" transfer dvd's because breaking the encryption is considered illegal, even though the "fair use act" has said that copying dvd's for personal use or for backup purposed is considered legal. it's just the software to do that isn't. i'm not one who would rip a dvd then make multiple copies to make a financial gain. i just want to be able to convert my "old" media into a format that meets my current needs.
    good luck my friend on your search. i really wish i could help you more

  • Which is the best app to create cartoon images on that i can move around to other apps and animate to create cartoons

    which is the best app to create cartoon images on that I can move around to other apps and animate.  I want to create the image only, no background or anything

    Hi Susan,
    Kindly check out Flash pro CC
    For more details: Explore Adobe desktop apps | Adobe Creative Cloud
    Thanks,
    Atul Saini

  • Which Is The Best Free Video Converter Software?

    Which is the best FREE software for encrypting dvd's for Ipod and which is the best FREE software for converting encrypted dvd videos to my Ipod, or is there out a FREE software that can do both thing?
      Windows XP Pro  

    Try this software:
    Firefox or IE7.
    Go to these forums.
    Search these forums.
    This question is asked 1000 times a month. So try a search , honest it works. (Google has a few thousand answers as well).
    Note DVD's are already encrypted, so you will be looking to decrypt them, then convert to MP4 for iPod..

  • Which is the Best way to upload BP for 3+ million records??

    Hello Gurus,
                       we have 3+million records of data to be uploaded in to CRM coming from Informatica. which is the best way to upload the data in to CRM, which takes less time consumption and easy. Please help me.
    Thanks,
    Naresh.

    do with bapi BAPI_BUPA_FS_CREATE_FROM_DATA2

  • Avast, clamXAV and MacScan - which is the best of these OSX AV scanners?

    Avast, clamXAV and MacScan - which is the best of these OSX anti-virus scanners?
    Does anyone have experience of all three?

    Ermmm. I think you'll not find anyone here that's got experience of one, let alone all three.
    My thoughts on anti-virus for the Mac, is that it can be more hassle than it is worth, given the nature of OSX. Don't get me wrong, it's not like I think the OS is invulnerable, but other than the one lone mock video codec trojan that was out a few years ago, there really isn't much of a need for anti-virus.
    Yet.
    The best web security right now for general browsing is Firefox with NoScript and AdBlock Plus and have it set to delete the cache and cookies after each session.
    Beyond that, the commonest things vexing Mac OS right now, are 'social engineered' trojans or virii, that the user installs themselves.
    If you stick to legitimate download sites, (c-net, versiontracker) you will be fine.
    Deb.

  • I want to relocate my iTunes library on a NAS drive and stream to apple tv2 and DLNA tbs around the house is this possible and if so which is the best NAS drive to buy???

    I want to relocate my iTunes library on a NAS drive and stream to apple tv2 and DLNA tbs around the house is this possible and if so which is the best NAS drive to buy???

    ged2001 wrote:
    I want to relocate my iTunes library on a NAS drive and stream to apple tv2 and DLNA TV's around the house is this possible and if so which is the best NAS drive to buy???
    i don't have any experience with DLNA TV's but i recently moved my iTunes library to a NAS. streaming content to airport express remote speakers and TV2 works great. however, i have all my gear hardwired to my time capsule (except the airport express) so i'm not sure how well streaming e.g. HD movies to TV over wifi works.
    i have a Synology DiskStation 411j and am very happy with it.

  • I want to play AVCHD videos in ipad from my JVC camcorder.which is the best tool for converting the avchd videos to formats that ipad can play?

    I have a JVC HD camcorder that creates videos in AVCHD format that ipad cannot play. Which is the best tool to convert these avchd videos to the format ipad can play?

    Airplay is a wireless streaming protocol. It allows content to be pushed from the iPad through the Apple TV onto your connected HDTV.
    If she wants to see the iPad displayed on the big screen and/or play games that involves mirroring. As long as it's an iPad 2 (or later) then you will be fine. More info on both has been referened below
    http://support.apple.com/kb/HT4437?viewlocale=en_US&locale=en_US
    http://support.apple.com/kb/ht5209

  • Which is the best operating system to update my MacBook Air?

    I've just invested in a brand new MacBook Air, and I'm wanting to get the best out of it, so is it worth updating my OS? and if so which is the best to buy? Thanks

    Apple products always come with the latest. Just set up yopur system, and the run software updates to get any late changes from Apple. iLife 2011 is also included with your MBA. If the question you are actually asking has to do with other software versus OS, that is a much bigger question, and would be dependent on what you intend to do with the system.
    On January 6th, the Mac App Store will go live, and make it very easy to find and load software.

Maybe you are looking for