SQL Server : Multiple Where Clauses -
suppose have t-sql command multiple where conditions this:
select * tablename column1 not '%exclude%' , column2 > 10 would query exclude row column1 not met or still go on test next condition column2?
i asking because want see if more efficient swap conditions around first test if column2 > 10 before run more time-consuming condition.
edit: if matters, column1 of type bigint , column2 of type ntext
sql devise query plan based on available indexes , statistics. sql doesn't have "short-circuit" expression evaluation per se because procedural language query plan perform short-circuit evaluation.
swapping expressions should not affect performance.
Comments
Post a Comment