I find the WITH very useful and I don't know if the problem I am about to describe is due to this clause.
I have a very long query that doesn't respond, or rather it repond but after a long time. The problem is not the query itself, but its length. Even trying to just execute the execution plan, I get responses after about 10 minutes. I also tried to remove all comments, all double spaces. I always have the same behavior. Can you tell me how I can solve it?
A few weeks ago I didn't have this problem. I'm not the DBA and I don't know if anyone could have changed the settings (which ones?) Of the DB instance.
Thanks in advance