| Assembly | SqlServer.Rules.dll |
| Namespace | SqlServer.Rules.Performance |
| Class | AvoidOuterJoinsRule |
| Id | SRP0013 |
| Friendly Name | Existence tested with JOIN |
| Category | Performance |
| Ignorable | true |
| Applicable Types | Procedure |
| Scalar Function | |
| Table Valued Function | |
| View |
Consider replacing the OUTER JOIN with EXISTS.
Consider replacing the OUTER JOIN with EXISTS
SHOULD FLAG AS PROBLEM:
SELECT a.*
FROM a
LEFT JOIN b ON a.id = b.id
WHERE b.id IS NULL SHOULD NOT FLAG AS PROBLEM:
SELECT a.*, b.*
FROM a
LEFT JOIN b ON a.id = b.id
WHERE b.id IS NULL SELECT a.*, b.*
FROM a
LEFT JOIN b ON a.id = b.id