2010. 4. 15. 12:14
Brain Trainning/DataBase
상황에 따라 다를 수 있지만 3번이 가장 효율적이네요...
혹시나 하고 테스트는 못해봤는데 음... 이제 되도록 Not In은 사용하지 말아야겠습니다. 후후후
r.hensbergen (1/29/2009)
souLTower (1/29/2009) Definitely option 3! Both 1 and 2 the inner query relates to the outer query, which means usually bad performance but at least less readability.Aren't left joins and NOT EXIST statements more efficient than NOT IN statements? I don't know if I made that up or read it somewhere. I usually use a query like this: I believe that this can cause the optimizer to search for a match for each record in myTable -- option 1 NOT IN -- Option 2 NOT EXISTS -- Option 3 LEFT JOIN |
'Brain Trainning > DataBase' 카테고리의 다른 글
Managing Max Degree of Parallelism (펌) (0) | 2010.04.28 |
---|---|
페이징쿼리 속도 비교 (펌글) (0) | 2010.04.19 |
Job List 적용 (0) | 2010.04.14 |
Partition Table 의 구현 (0) | 2009.11.30 |
인덱스~ (0) | 2009.11.24 |