Over a million developers have joined DZone.

Understanding the Execution Plan [When Table JOIN Occurs Part-III]

· Database Zone

Sign up for the Couchbase Community Newsletter to stay ahead of the curve on the latest NoSQL news, events, and webinars. Brought to you in partnership with Coucbase.


Continuing our journey here we see some others operators exist in our execution plan. Here is the query and Execution Plan that we are working from couple of weeks.

Example Query

SELECT e.JobTitle, a.City,
 p.LastName + ', ' + p.FirstNameASEmployeeName

FROM HumanResources.Employee AS e

 INNER JOIN Person.BusinessEntityAddress AS bea

ON e.BusinessEntityID =bea.BusinessEntityID

 INNER JOIN Person.Address a ON bea.AddressID =a.AddressID

 INNER JOIN Person.Person AS p
 ON e.BusinessEntityID = p.BusinessEntityID;

Execution Plan

Compute Scalar

First of all it is not a join operation. As it is covered in our Execution Plan, so we must discuss about it. Here we see the properties of the Compute Scalar.

It is represent a operation named Scalar, generally used for calculation purpose. In our case the alias Employeename = ContactLastname + Conatct.FirstName with comma operators between them. If we look at the property, it is not a 0 cost operators (0.001997).

If we look at the property Expr1008 and click at the ellipsis on the right side of the property page this will open the expression.

Related Reference

Understanding the Execution Plan [ When Table JOIN occurs Part-II ]


Understanding the Execution Plan [ When Table JOIN occurs Part-I ]


Understanding of Execution Plan – III - C [ The OPERATORS]


Understanding of Execution Plan – III - B [ The OPERATORS ]


Understanding of Execution Plan [What happened When SQL statement Execute]


Understanding of Execution Plan – II [Reuse of the Execution Plan]


Understanding of Execution Plan – III - A [ The OPERATORS ]



In the next level we have to more discuss about our execution plan. So this series will be continued for some more articles. Please be with us.

Hope you like it.

The Getting Started with NoSQL Guide will get you hands-on with NoSQL in minutes with no coding needed. Brought to you in partnership with Couchbase.


Published at DZone with permission of Joydeep Das, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

The best of DZone straight to your inbox.

Please provide a valid email address.

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}