Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase

Strange column names in execution plan Expand / Collapse
Author
Message
Posted Wednesday, November 6, 2013 4:09 PM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Thursday, August 21, 2014 10:33 AM
Points: 1,283, Visits: 2,959

In the attached execution plan, at the sort operator(50% cost),when i hover over the operator in the plan i see something like "Expr 1088" ascending, why does it show like that?


  Post Attachments 
temp.sqlplan (7 views, 447.72 KB)
Post #1512029
Posted Wednesday, November 6, 2013 9:10 PM


Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Yesterday @ 4:29 PM
Points: 588, Visits: 900
That is simply the name of the output (one of them) from the Compute Scalar operation right before the sort. Also, you have some carnality issues with this query (not sure if this is a real query or not), but the estimated rows and the actual rows are way off in some instances.



Microsoft Certified Master - SQL Server 2008
Follow me on twitter: @keith_tate

Forum Etiquette: How to post data/code on a forum to get the best help
Post #1512076
Posted Thursday, November 7, 2013 2:17 AM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Today @ 3:43 AM
Points: 875, Visits: 2,800
These are internal expressions produced when SQL Server executes the query.



The SQL Guy @ blogspot

@SeanPearceSQL

About Me
Post #1512151
Posted Thursday, November 7, 2013 7:56 AM
Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Thursday, August 21, 2014 10:33 AM
Points: 1,283, Visits: 2,959
Keith Tate (11/6/2013)
That is simply the name of the output (one of them) from the Compute Scalar operation right before the sort. Also, you have some carnality issues with this query (not sure if this is a real query or not), but the estimated rows and the actual rows are way off in some instances.


But then why is it showing a column name for the other one?
Post #1512284
Posted Friday, November 8, 2013 12:28 AM


SSC Eights!

SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!SSC Eights!

Group: General Forum Members
Last Login: Today @ 3:43 AM
Points: 875, Visits: 2,800
curious_sqldba (11/7/2013)
Keith Tate (11/6/2013)
That is simply the name of the output (one of them) from the Compute Scalar operation right before the sort. Also, you have some carnality issues with this query (not sure if this is a real query or not), but the estimated rows and the actual rows are way off in some instances.


But then why is it showing a column name for the other one?

The scalar operator immediately before the sort is calculating the value of [Expr1088]. Included in the output of the scalar operator is the new expression [Expr1088] and the column [Column7]. The sort operator is then sorting on [Expr1088] and [Column7].

In other words, [Expr1088] is a calculated value while [Column7] is a value from your table.




The SQL Guy @ blogspot

@SeanPearceSQL

About Me
Post #1512548
« Prev Topic | Next Topic »

Add to briefcase

Permissions Expand / Collapse