Sometimes when I try to get the estimated execution plan for a query, SSMS will not show any results other than (1 row(s) affected)
in the messages pane and "Query executed successfully" in the status bar.
If I try to run CTRL+L
on parts of what I wish to do, it will show the estimated execution plans. But this is rather annoying as sometimes I have to analyze part of a procedure which is 700-lines separated from the variable declarations, which has me moving the declaration of variables around to get parts of the plan displayed. But sometimes, some insert and update statements get no result at all, just what I described in the first paragraph.
Is there something that keeps a query from having its execution plan estimable? How do I solve this?
Edit: I discovered that this happens when I try to get the execution plan of a couple joined tables that have too many statements in the join, i.e.:
... FOO inner join BAR on contidion1, condition2... conditionN
For some reason I cannot figure out yet, reducing the amount of conditions solved the problem. I am still trying to isolate this so as to improve the question.