When performance tuning queries, one of first things to check is whether your queries are SARGable and allow the optimizer to seek to the data it needs.
Subscribe and turn on notifications to never miss a weekly video: https://www.youtube.com/c/bertwagner?...
Check out the related blog post for all code samples:
https://bertwagner.com/2019/09/17/sql...
Follow me on Twitter:
/ bertwagner