The NOT EXISTS pattern or LEFT JOIN ... IS NULL form for a performance advantage.
A join pattern that returns rows from the left table with no match in the right table, typically implemented with NOT EXISTS or NOT IN. Useful for finding records without related entries (e.g., customers who have never placed an order).
| Database System | Support Status | Since Version | Notes |
|---|---|---|---|
| MySQL | ✓ Supported | 8.0 | |
| PostgreSQL | ✓ Supported | 9.5 | |
| SQL Server | ✓ Supported | 2017 | |
| Oracle | ✓ Supported | 12c | |
| SQLite | ✓ Supported | — | SQLite supports NOT EXISTS correlated subqueries. |
Anti-joins can be a powerful tool for optimizing performance by reducing the number of rows scanned.