• Grant Fritchey - Thursday, December 14, 2017 5:02 AM

    Sometimes, not always, an OR causing slow behavior can be replaced by two copies of the query combined using UNION ALL. Not seeing the details here I don't want to say for sure that will improve things, but it can.

    + 1
    They key data in our database involves a very similar type of condition.  I did a comparison and ultimately landed on the solution Grant calls out.  Far fewer table scans.  Overall, much better query plan.