My query is running a little slow and I think it's because of the
where datediff function.
WHERE DateDiff(minute, TB1.stDate, getdate()) > 50
(With this approach at least is using the index I created)
it was before that something like this:
datediff(minute, TB1.stDate), '2017-01-01') <= 0)
I would like to understand if there's a better way to filter with datediff.
My question is, how is my query already using the index, even when inside the