I have a problem with a long running query, I'm not a DBA but it's become my problem. I've been doing a lot of reading over the last few weeks but for the life of me can't figure out why this query is running slowly.
It isn't always slow but it's particularly slow at the beginning of the month when we have a large amount of data inserted into the CMLEDG table.
The plan is here https://www.brentozar.com/pastetheplan/?id=BycGicsGX