Sql Server, Query Optimization.
@YourJoinQuery; -- Retrieve the XML representation of the execution plan DECLARE @XmlPlan XML; SELECT @XmlPlan = query_plan FROM sys.dm_exec_query_plan(@PlanHandle); -- Output the execution plan as XML SELECT @XmlPlan AS ExecutionPlan; The actual execution plan is generated based on the data