locked
Left Join vs Not exists RRS feed

  • Question

  • Which on is better Left join or Not exists (performance wise)?

    Examples and Reference material will be highly appreciated.

    .

     


    ~Technology Analyst~
    Monday, July 5, 2010 7:27 AM

Answers

All replies

  • http://explainextended.com/2009/09/15/not-in-vs-not-exists-vs-left-join-is-null-sql-server/

     

    • Proposed as answer by Sorna Kumar Muthuraj Monday, July 5, 2010 9:27 AM
    • Marked as answer by KJian_ Monday, July 12, 2010 5:35 AM
    Monday, July 5, 2010 7:30 AM
  • I do not think that is remarkable differnece in performnace, test it on your db and you will see


    Best Regards, Uri Dimant SQL Server MVP http://dimantdatabasesolutions.blogspot.com/ http://sqlblog.com/blogs/uri_dimant/
    Monday, July 5, 2010 7:43 AM
    Answerer
  • Take a look here

     http://sqlinthewild.co.za/index.php/2010/04/27/in-exists-and-join-a-roundup/

    It has link to previous blogs on this topic as well.


    Premature optimization is the root of all evil in programming. (c) by Donald Knuth

    Naomi Nosonovsky, Sr. Programmer-Analyst

    My blog
    • Marked as answer by KJian_ Monday, July 12, 2010 5:35 AM
    Monday, July 5, 2010 2:54 PM