The topic describes the DF204 T-SQL code analysis rule.
PERFORMANCE
IN predicate with a subquery is used.
It is recommended to avoid using the IN predicate with a subquery and opt for the EXISTS predicate instead for improved query performance.
SELECT c.CustomerName FROM dbo.Customer c
WHERE c.CustomerId IN (SELECT r.CustomerId FROM dbo.Receipt r)
GO
SELECT c.CustomerName FROM dbo.Customer c
WHERE EXISTS (SELECT * FROM dbo.Receipt r WHERE r.CustomerId = c.CustomerId)
GO