I just did a talk for 24 Hours of PASS on Sargability. I’ve done this talk before (about five months ago at the user group I run and at the PASS AppDev Virtual Chapter).
There are a number of useful resources out there about sargability. I’ve blogged about it before, Brent Ozar has blogged about it, and so on. One thing that I don’t believe has been mentioned much is the use of inverse predicates in a view to hope that one of the sides is treated as a Seek. You can see that being handled in my script, and I’ll try to write a blog post about it some time during October.
I’m also giving this talk on Friday Oct 1 at SQLBits in York, UK. I hope you can come to this – the line-up of speakers is just amazing this time.
Anyway, the script I used is now in a SkyDrive folder at http://cid-32a3bd12bf98b682.office.live.com/browse.aspx/24HOP%20-%20Sargability
And some other useful links that I showed during my talk are listed below
Aaron's blog post with the great picture:
Erin's blog post about SQL not being able to add indexes on expressions:
Connect items of interest:
Thanks. Let me be the first to wish you a Happy Christmas and a Sargable New Year. See you at the PASS Summit in November I hope!