• Yea, it is not performing so well. I wanted to at least give it a try and see how it affects the performance. I don't know if the cost of updating the index will be worth the benefit, but I know one way to find out, test it. I am also considering a TVF with cross apply, but I think the view will be better for performance (even without the index). I'd be happen to hear your thoughts on it.

    PS Thanks for the code, I didn't even know that you could put the on clauses at the end like that. You learn something new every day.