I was wondering if I could get a further explanation on non-sargable predicates concerning the OR. From your Brent Ozar's blog on non-sargable predicates, I understand that "column = @something OR @something IS NULL"
In my mind, this case seems to make sense as to why it would make things harder on the optimizer to use an index. However, some of my colleagues now have a tendency to believe that all ORs are bad, whether they are found in this non-sargable case or not.
Obviously, ORs aren't the most efficient logic to begin with. I can see why we would want to avoid using them. From my understanding, not all ORs fall into the category of non-sargable predicates. I just want to understand more when an OR is considered a non-sargable predicate and when it's not.
Could you please explain more in-depth on this matter?
Thanks!