Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to find Expr#### in Execution Plan

When looking at the actual execution plan for a query in SQL Server Management Studio (SSMS), how do I determine what an expression such as Expr1052 represents?

When I identify the costly parts of the query and look at the properties of that operation, there are often references only to these Expressions, or scalar operators. I want to be able to figure out what part of my query it is referring to.

like image 464
AaronLS Avatar asked Apr 27 '10 16:04

AaronLS


2 Answers

In the Execution Plan window of SSMS, right click on the operation that first calculates the expression and select Properties.

You will see the expression definition in the pane to the right.

Alternatively, you can browse the XML plan and search for the entries like that:

  <DefinedValues>
    <DefinedValue>
      <ColumnReference Column="Expr1018" />
      <ScalarOperator ScalarString="col1 + col2">
      </ScalarOperator>
    </DefinedValue>
    …
  </DefinedValues>
like image 88
Quassnoi Avatar answered Oct 15 '22 09:10

Quassnoi


I found this to be the more detailed answer : https://stackoverflow.com/a/49841492/235041 The value is under "Defined Values" on the property sheet

like image 1
Sanjiv Jivan Avatar answered Oct 15 '22 09:10

Sanjiv Jivan