What makes a query non-Sargable?
The most common way of making a query non-Sargable is by reference a field in a function in the where clause of a query.
For example:
SELECT ... FROM ...
WHERE Year(myDate) = 2008
This can be better written as:
WHERE myDate >= '01-01-2008' AND myDate < '01-01-2009'
So .. moral of the story ..
Avoid using functions that references a field inside the where clause of your query.
I can't understand your post. What do you want to say? It creates the confusion. Please share more blogs and explains in details regarding sargable. Thanks.
ReplyDeletedigital signature