Suppose I have a T-SQL command with multiple WHERE conditions like this:
SELECT *
FROM TableName
WHERE Column1 NOT LIKE '%exclude%'
AND Column2 > 10
Would the query exclude a row as soon as Column1 was not met or would it still go on to test the next condition for Column2?
I am asking because I want to see if it would be more efficient to swap my conditions around to first test if Column2 > 10 before I run a more time-consuming condition.
Edit: If it matters, Column1 is of type bigint and Column2 is of type ntext