what i can use instead of left join in this query

alirezamaranaki 2017-09-13 05:43:13

RvRijbroek 2017-09-14 17:27:38
I'm seeing a huge index scan before the hash match.
Maybe i'm reading your query wrong.
But why are you using the _SID IN (…) in the first part of your union?
The IN selects are refering to the exact same table.
I think you can just replace them.

And some of the criteria seem conflicting: _CycleID != 0 and in a subselect _CycleID = 0
Again, maybe i'm reading your query wrong. But you don't explain very much in your post….