2

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.

Geeky Guy
  • 9,229
  • 4
  • 42
  • 62
  • Any recent updates to Visual Studio, .NET framework, or even Office that you can roll back? – SqlOnly Jul 27 '16 at 18:55
  • @SqlOnly I'm using only SSMS, and there are no updates I know of that I could try to rollback. – Geeky Guy Jul 27 '16 at 18:58
  • 1
    could you please clarify on this more "Sometimes when I try to get the estimated execution plan for a query",is this happening only some times ,if so can you please post repro steps for us to try – TheGameiswar Jul 27 '16 at 19:01
  • @TheGameiswar I am trying to isolate the cause, but the error is intermitent. – Geeky Guy Jul 27 '16 at 19:18

2 Answers2

1

There should be two tabs in your results window. One - messages will show (1 row(s) affected) and another called execution plan.

EDIT: Current version info for my install of SSMS

Microsoft SQL Server Management Studio          13.0.15600.2
Microsoft Analysis Services Client Tools        13.0.1605.86
Microsoft Data Access Components (MDAC)         10.0.10586.0
Microsoft MSXML                                 3.0 4.0 6.0 
Microsoft Internet Explorer                     9.11.10586.0
Microsoft .NET Framework                        4.0.30319.42000
Operating System                                6.3.10586
Joe C
  • 3,925
  • 2
  • 11
  • 31
0

I solved the problem with the graphical execution plan by fixing the Courier New Regular font. When I've tried to open the XML execution plan SSMS popped-up the error: "Font 'Courier New' does not support style 'Regular'". Just copy in a separate folder and install COUR.TTF. It will go in 'C:\Windows\Fonts\Courier New'