2 Comments

The last example is not ‘instead of- use this’. I mentioned it to say to make careful use of wildcard characters. Using % at the beginning will make the query non-SARGable, so if you know what the first characters are, avoid using % sign as first character to make the query SARGable.

Expand full comment

I agree with most of the things that you wrote, but I do not agree with the last example. When ever we optimize a query it is important that we will get the same results. The optimization should improve the performance without modifying the query's results. In you last example, there is no argument that performance wise removing the wild card from the beginning of the phrase can dramatically improve the performance, but it will also change the query's results.

Expand full comment