JOINS, EXISTS or IN which is better? Few questions on SQL

前端 未结 8 1852
不思量自难忘°
不思量自难忘° 2021-01-14 07:58

I have few questions on SQL..

  1. How to analyze the performance of a query? Any software, inbuilt features of MSSQL server 2005/2008?

  2. What shou

8条回答
  •  情歌与酒
    2021-01-14 08:50

    This question suggests that EXISTS is quicker which is what I had been taught IN () vs EXISTS () in SqlServer 2005 (or generally in any RDBMS)

    One thing to note is that EXISTS and IN should be used in preference to NOT EXISTS and NOT IN

    Bit of a tangent from performance but this is a good article on the subtle differences between IN and EXISTS http://weblogs.sqlteam.com/mladenp/archive/2007/05/18/60210.aspx

提交回复
热议问题