Elliott Whitlow (1/10/2011)
nekonecny (1/10/2011)
I need only one row (top 1), if i use "EXISTS". Is Optimizer so clever to eliminate other potential rows?:-)Yes, it is.. An EXISTS check completes as soon as a single row is found, it doesn't need to look any further and it knows it. The logic is "short-circuited". In either case as soon as a single row is found matching the criteria it returns TRUE. It seems TOP might actually cost you performance..
CEWII
Thanks! I am smarter now:-)