• Haha, actually, this may be the result of an entirely different problem altogether :-P.

    It seems that, for whatever reason, I can't get the procedure containing this query to have a reusable plan. Every time I change the @StartDate and @EndDate parameters, a new plan is generated.

    I've hacked away at the coding of the procedure until it's literally nothing more than the query contained here, and still no luck. I'm kinda confused, but it gives me something to test on to see if I can get it fixed.

    Originally, I was doing my runs of the query with a clean cache, and I must've run the query on one day without the sessionid limitations, then run it again on the same day with the limiter, and then done some more testing with and without it on other days, which confused the issue.

    My fault on this one! I really should've been looking at the plan cache more closely. Hopefully more testing will eliminate the issue in the end.

    - 😀