Statements show plans that correspond to different statments

This is one of my queries from SQL Saturday Presentation, after running entire query against SQL Server 2016 (13.0.1601.5) when ever selecting some of the statements it does not show execution plan and for another statements it shows plan that does not correspond to that statement.

One of the examples is IF OBJECT_ID('dbo.TableHeap') IS NOT NULL statement shows plan for UPDATE TABLE.

Plan1.pesession (62.7 kB)
avatar image By Vlady Oselsky 171 asked Sep 15, 2016 at 01:59 PM
more ▼
(comments are locked)
10|10000 characters needed characters left

0 answers: sort voted first
Be the first one to answer this question
toggle preview:

Up to 50 attachments (including images) can be used with a maximum of 209.7 MB each and 209.7 MB total.

Follow this question



asked: Sep 15, 2016 at 01:59 PM

Seen: 142 times

Last Updated: Sep 15, 2016 at 01:59 PM