Advertisement
Guest User

SO10912826 Query 2 Slow

a guest
Jun 18th, 2012
190
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 28.95 KB | None | 0 0
  1. <?xml version="1.0" encoding="utf-16"?>
  2. <ShowPlanXML xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Version="1.0" Build="9.00.4226.00" xmlns="http://schemas.microsoft.com/sqlserver/2004/07/showplan">
  3.   <BatchSequence>
  4.     <Batch>
  5.       <Statements>
  6.         <StmtSimple StatementCompId="2" StatementEstRows="172.741" StatementId="2" StatementOptmLevel="FULL" StatementOptmEarlyAbortReason="GoodEnoughPlanFound" StatementSubTreeCost="0.117549" StatementText="&#xA;SELECT attx.intAttributeID,attx.txtAttributeName,attx.txtAttributeLabel,attx.txtType,attx.txtEntity FROM&#xD;&#xA;    AST_tblAttributes attx WHERE attx.intAttributeID &#xD;&#xA;    IN&#xD;&#xA;    (SELECT Distinct([TargetAttributeID]) FROM&#xD;&#xA;    (SELECT Distinct att1.intAttributeID as [TargetAttributeID]&#xD;&#xA;        FROM AST_tblAttributes att1&#xD;&#xA;        INNER JOIN&#xD;&#xA;        AST_lnkProfileDemandAttributes pda&#xD;&#xA;        ON pda.intAttributeID=att1.intAttributeID AND pda.intProfileID = @intProfileID&#xD;&#xA;    union all&#xD;&#xA;    SELECT  Distinct ca2.intAttributeID as [TargetAttributeID] FROM&#xD;&#xA;        AST_lnkCapturePolicyAttributes ca2&#xD;&#xA;        INNER JOIN&#xD;&#xA;        AST_lnkEmployeeCapture ec2 ON ec2.intAdminCaptureID = ca2.intAdminCaptureID AND ec2.intTeamID = 57&#xD;&#xA;        WHERE ec2.dteCreatedDate &gt;= @cutoffdate) x)" StatementType="SELECT">
  7.           <StatementSetOptions ANSI_NULLS="false" ANSI_PADDING="false" ANSI_WARNINGS="false" ARITHABORT="true" CONCAT_NULL_YIELDS_NULL="false" NUMERIC_ROUNDABORT="false" QUOTED_IDENTIFIER="false" />
  8.           <QueryPlan CachedPlanSize="39">
  9.             <MissingIndexes>
  10.               <MissingIndexGroup Impact="1474.55">
  11.                 <MissingIndex Database="[CCMI]" Schema="[dbo]" Table="[AST_lnkCapturePolicyAttributes]">
  12.                   <ColumnGroup Usage="EQUALITY">
  13.                     <Column Name="[intAttributeID]" ColumnId="3" />
  14.                   </ColumnGroup>
  15.                   <ColumnGroup Usage="INCLUDE">
  16.                     <Column Name="[intAdminCaptureID]" ColumnId="1" />
  17.                   </ColumnGroup>
  18.                 </MissingIndex>
  19.               </MissingIndexGroup>
  20.             </MissingIndexes>
  21.             <RelOp AvgRowSize="84" EstimateCPU="0.0010868" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimateRows="172.741" LogicalOp="Left Semi Join" NodeId="0" Parallel="false" PhysicalOp="Nested Loops" EstimatedTotalSubtreeCost="0.117549">
  22.               <OutputList>
  23.                 <ColumnReference Database="[CCMI]" Schema="[dbo]" Table="[AST_tblAttributes]" Alias="[attx]" Column="intAttributeID" />
  24.                 <ColumnReference Database="[CCMI]" Schema="[dbo]" Table="[AST_tblAttributes]" Alias="[attx]" Column="txtAttributeName" />
  25.                 <ColumnReference Database="[CCMI]" Schema="[dbo]" Table="[AST_tblAttributes]" Alias="[attx]" Column="txtAttributeLabel" />
  26.                 <ColumnReference Database="[CCMI]" Schema="[dbo]" Table="[AST_tblAttributes]" Alias="[attx]" Column="txtType" />
  27.                 <ColumnReference Database="[CCMI]" Schema="[dbo]" Table="[AST_tblAttributes]" Alias="[attx]" Column="txtEntity" />
  28.               </OutputList>
  29.               <NestedLoops Optimized="false">
  30.                 <OuterReferences>
  31.                   <ColumnReference Database="[CCMI]" Schema="[dbo]" Table="[AST_tblAttributes]" Alias="[attx]" Column="intAttributeID" />
  32.                 </OuterReferences>
  33.                 <RelOp AvgRowSize="84" EstimateCPU="0.000443" EstimateIO="0.00460648" EstimateRebinds="0" EstimateRewinds="0" EstimateRows="260" LogicalOp="Clustered Index Scan" NodeId="1" Parallel="false" PhysicalOp="Clustered Index Scan" EstimatedTotalSubtreeCost="0.00504948">
  34.                   <OutputList>
  35.                     <ColumnReference Database="[CCMI]" Schema="[dbo]" Table="[AST_tblAttributes]" Alias="[attx]" Column="intAttributeID" />
  36.                     <ColumnReference Database="[CCMI]" Schema="[dbo]" Table="[AST_tblAttributes]" Alias="[attx]" Column="txtAttributeName" />
  37.                     <ColumnReference Database="[CCMI]" Schema="[dbo]" Table="[AST_tblAttributes]" Alias="[attx]" Column="txtAttributeLabel" />
  38.                     <ColumnReference Database="[CCMI]" Schema="[dbo]" Table="[AST_tblAttributes]" Alias="[attx]" Column="txtType" />
  39.                     <ColumnReference Database="[CCMI]" Schema="[dbo]" Table="[AST_tblAttributes]" Alias="[attx]" Column="txtEntity" />
  40.                   </OutputList>
  41.                   <IndexScan Ordered="false" ForcedIndex="false" NoExpandHint="false">
  42.                     <DefinedValues>
  43.                       <DefinedValue>
  44.                         <ColumnReference Database="[CCMI]" Schema="[dbo]" Table="[AST_tblAttributes]" Alias="[attx]" Column="intAttributeID" />
  45.                       </DefinedValue>
  46.                       <DefinedValue>
  47.                         <ColumnReference Database="[CCMI]" Schema="[dbo]" Table="[AST_tblAttributes]" Alias="[attx]" Column="txtAttributeName" />
  48.                       </DefinedValue>
  49.                       <DefinedValue>
  50.                         <ColumnReference Database="[CCMI]" Schema="[dbo]" Table="[AST_tblAttributes]" Alias="[attx]" Column="txtAttributeLabel" />
  51.                       </DefinedValue>
  52.                       <DefinedValue>
  53.                         <ColumnReference Database="[CCMI]" Schema="[dbo]" Table="[AST_tblAttributes]" Alias="[attx]" Column="txtType" />
  54.                       </DefinedValue>
  55.                       <DefinedValue>
  56.                         <ColumnReference Database="[CCMI]" Schema="[dbo]" Table="[AST_tblAttributes]" Alias="[attx]" Column="txtEntity" />
  57.                       </DefinedValue>
  58.                     </DefinedValues>
  59.                     <Object Database="[CCMI]" Schema="[dbo]" Table="[AST_tblAttributes]" Index="[PK_AST_tblAttributes]" Alias="[attx]" />
  60.                   </IndexScan>
  61.                 </RelOp>
  62.                 <RelOp AvgRowSize="9" EstimateCPU="2E-07" EstimateIO="0" EstimateRebinds="246.944" EstimateRewinds="12.0556" EstimateRows="1" LogicalOp="Concatenation" NodeId="2" Parallel="false" PhysicalOp="Concatenation" EstimatedTotalSubtreeCost="0.111412">
  63.                   <OutputList />
  64.                   <Concat>
  65.                     <DefinedValues />
  66.                     <RelOp AvgRowSize="9" EstimateCPU="1E-07" EstimateIO="0" EstimateRebinds="246.944" EstimateRewinds="12.0556" EstimateRows="1" LogicalOp="Top" NodeId="4" Parallel="false" PhysicalOp="Top" EstimatedTotalSubtreeCost="0.111386">
  67.                       <OutputList />
  68.                       <Top RowCount="false" IsPercent="false" WithTies="false">
  69.                         <TopExpression>
  70.                           <ScalarOperator ScalarString="(1)">
  71.                             <Const ConstValue="(1)" />
  72.                           </ScalarOperator>
  73.                         </TopExpression>
  74.                         <RelOp AvgRowSize="9" EstimateCPU="4.68468E-06" EstimateIO="0" EstimateRebinds="246.944" EstimateRewinds="12.0556" EstimateRows="1" LogicalOp="Inner Join" NodeId="5" Parallel="false" PhysicalOp="Nested Loops" EstimatedTotalSubtreeCost="0.11136">
  75.                           <OutputList />
  76.                           <NestedLoops Optimized="false">
  77.                             <RelOp AvgRowSize="9" EstimateCPU="0.0001581" EstimateIO="0.003125" EstimateRebinds="246.944" EstimateRewinds="12.0556" EstimateRows="1" LogicalOp="Clustered Index Seek" NodeId="6" Parallel="false" PhysicalOp="Clustered Index Seek" EstimatedTotalSubtreeCost="0.050481">
  78.                               <OutputList />
  79.                               <IndexScan Ordered="true" ScanDirection="FORWARD" ForcedIndex="false" NoExpandHint="false">
  80.                                 <DefinedValues />
  81.                                 <Object Database="[CCMI]" Schema="[dbo]" Table="[AST_tblAttributes]" Index="[PK_AST_tblAttributes]" Alias="[att1]" />
  82.                                 <SeekPredicates>
  83.                                   <SeekPredicate>
  84.                                     <Prefix ScanType="EQ">
  85.                                       <RangeColumns>
  86.                                         <ColumnReference Database="[CCMI]" Schema="[dbo]" Table="[AST_tblAttributes]" Alias="[att1]" Column="intAttributeID" />
  87.                                       </RangeColumns>
  88.                                       <RangeExpressions>
  89.                                         <ScalarOperator ScalarString="[CCMI].[dbo].[AST_tblAttributes].[intAttributeID] as [attx].[intAttributeID]">
  90.                                           <Identifier>
  91.                                             <ColumnReference Database="[CCMI]" Schema="[dbo]" Table="[AST_tblAttributes]" Alias="[attx]" Column="intAttributeID" />
  92.                                           </Identifier>
  93.                                         </ScalarOperator>
  94.                                       </RangeExpressions>
  95.                                     </Prefix>
  96.                                   </SeekPredicate>
  97.                                 </SeekPredicates>
  98.                               </IndexScan>
  99.                             </RelOp>
  100.                             <RelOp AvgRowSize="15" EstimateCPU="0.000204559" EstimateIO="0.003125" EstimateRebinds="0" EstimateRewinds="259" EstimateRows="1" LogicalOp="Clustered Index Seek" NodeId="7" Parallel="false" PhysicalOp="Clustered Index Seek" EstimatedTotalSubtreeCost="0.0549782">
  101.                               <OutputList>
  102.                                 <ColumnReference Database="[CCMI]" Schema="[dbo]" Table="[AST_lnkProfileDemandAttributes]" Alias="[pda]" Column="intAttributeID" />
  103.                               </OutputList>
  104.                               <IndexScan Ordered="true" ScanDirection="FORWARD" ForcedIndex="false" NoExpandHint="false">
  105.                                 <DefinedValues>
  106.                                   <DefinedValue>
  107.                                     <ColumnReference Database="[CCMI]" Schema="[dbo]" Table="[AST_lnkProfileDemandAttributes]" Alias="[pda]" Column="intAttributeID" />
  108.                                   </DefinedValue>
  109.                                 </DefinedValues>
  110.                                 <Object Database="[CCMI]" Schema="[dbo]" Table="[AST_lnkProfileDemandAttributes]" Index="[PK_AST_lnkProfileDemandAttributes]" Alias="[pda]" />
  111.                                 <SeekPredicates>
  112.                                   <SeekPredicate>
  113.                                     <Prefix ScanType="EQ">
  114.                                       <RangeColumns>
  115.                                         <ColumnReference Database="[CCMI]" Schema="[dbo]" Table="[AST_lnkProfileDemandAttributes]" Alias="[pda]" Column="intProfileID" />
  116.                                       </RangeColumns>
  117.                                       <RangeExpressions>
  118.                                         <ScalarOperator ScalarString="[@intProfileID]">
  119.                                           <Identifier>
  120.                                             <ColumnReference Column="@intProfileID" />
  121.                                           </Identifier>
  122.                                         </ScalarOperator>
  123.                                       </RangeExpressions>
  124.                                     </Prefix>
  125.                                   </SeekPredicate>
  126.                                 </SeekPredicates>
  127.                                 <Predicate>
  128.                                   <ScalarOperator ScalarString="[CCMI].[dbo].[AST_lnkProfileDemandAttributes].[intAttributeID] as [pda].[intAttributeID]=[CCMI].[dbo].[AST_tblAttributes].[intAttributeID] as [attx].[intAttributeID]">
  129.                                     <Compare CompareOp="EQ">
  130.                                       <ScalarOperator>
  131.                                         <Identifier>
  132.                                           <ColumnReference Database="[CCMI]" Schema="[dbo]" Table="[AST_lnkProfileDemandAttributes]" Alias="[pda]" Column="intAttributeID" />
  133.                                         </Identifier>
  134.                                       </ScalarOperator>
  135.                                       <ScalarOperator>
  136.                                         <Identifier>
  137.                                           <ColumnReference Database="[CCMI]" Schema="[dbo]" Table="[AST_tblAttributes]" Alias="[attx]" Column="intAttributeID" />
  138.                                         </Identifier>
  139.                                       </ScalarOperator>
  140.                                     </Compare>
  141.                                   </ScalarOperator>
  142.                                 </Predicate>
  143.                               </IndexScan>
  144.                             </RelOp>
  145.                           </NestedLoops>
  146.                         </RelOp>
  147.                       </Top>
  148.                     </RelOp>
  149.                     <RelOp AvgRowSize="9" EstimateCPU="1E-07" EstimateIO="0" EstimateRebinds="246.944" EstimateRewinds="12.0556" EstimateRows="1" LogicalOp="Top" NodeId="11" Parallel="false" PhysicalOp="Top" EstimatedTotalSubtreeCost="0.117549">
  150.                       <OutputList />
  151.                       <Top RowCount="false" IsPercent="false" WithTies="false">
  152.                         <TopExpression>
  153.                           <ScalarOperator ScalarString="(1)">
  154.                             <Const ConstValue="(1)" />
  155.                           </ScalarOperator>
  156.                         </TopExpression>
  157.                         <RelOp AvgRowSize="9" EstimateCPU="0.000566281" EstimateIO="0" EstimateRebinds="246.944" EstimateRewinds="12.0556" EstimateRows="1" LogicalOp="Filter" NodeId="12" Parallel="false" PhysicalOp="Filter" EstimatedTotalSubtreeCost="0.117549">
  158.                           <OutputList />
  159.                           <Filter StartupExpression="false">
  160.                             <RelOp AvgRowSize="15" EstimateCPU="0.00493137" EstimateIO="0" EstimateRebinds="246.944" EstimateRewinds="12.0556" EstimateRows="1.84156" LogicalOp="Inner Join" NodeId="13" Parallel="false" PhysicalOp="Nested Loops" EstimatedTotalSubtreeCost="0.117549">
  161.                               <OutputList>
  162.                                 <ColumnReference Database="[CCMI]" Schema="[dbo]" Table="[AST_lnkEmployeeCapture]" Alias="[ec2]" Column="dteCreatedDate" />
  163.                               </OutputList>
  164.                               <NestedLoops Optimized="false" WithUnorderedPrefetch="true">
  165.                                 <OuterReferences>
  166.                                   <ColumnReference Database="[CCMI]" Schema="[dbo]" Table="[AST_lnkEmployeeCapture]" Alias="[ec2]" Column="txtRACFID" />
  167.                                   <ColumnReference Database="[CCMI]" Schema="[dbo]" Table="[AST_lnkEmployeeCapture]" Alias="[ec2]" Column="intTeamID" />
  168.                                   <ColumnReference Database="[CCMI]" Schema="[dbo]" Table="[AST_lnkEmployeeCapture]" Alias="[ec2]" Column="intAdminCaptureID" />
  169.                                   <ColumnReference Column="Expr1012" />
  170.                                 </OuterReferences>
  171.                                 <RelOp AvgRowSize="33" EstimateCPU="0.0864677" EstimateIO="0" EstimateRebinds="246.944" EstimateRewinds="12.0556" EstimateRows="1.84156" LogicalOp="Inner Join" NodeId="15" Parallel="false" PhysicalOp="Nested Loops" EstimatedTotalSubtreeCost="0.117549">
  172.                                   <OutputList>
  173.                                     <ColumnReference Database="[CCMI]" Schema="[dbo]" Table="[AST_lnkEmployeeCapture]" Alias="[ec2]" Column="txtRACFID" />
  174.                                     <ColumnReference Database="[CCMI]" Schema="[dbo]" Table="[AST_lnkEmployeeCapture]" Alias="[ec2]" Column="intTeamID" />
  175.                                     <ColumnReference Database="[CCMI]" Schema="[dbo]" Table="[AST_lnkEmployeeCapture]" Alias="[ec2]" Column="intAdminCaptureID" />
  176.                                   </OutputList>
  177.                                   <NestedLoops Optimized="false" WithUnorderedPrefetch="true">
  178.                                     <OuterReferences>
  179.                                       <ColumnReference Database="[CCMI]" Schema="[dbo]" Table="[AST_lnkCapturePolicyAttributes]" Alias="[ca2]" Column="intAdminCaptureID" />
  180.                                       <ColumnReference Column="Expr1011" />
  181.                                     </OuterReferences>
  182.                                     <RelOp AvgRowSize="23" EstimateCPU="2.96611" EstimateIO="9.82831" EstimateRebinds="0" EstimateRewinds="259" EstimateRows="32.2904" LogicalOp="Clustered Index Scan" NodeId="17" Parallel="false" PhysicalOp="Clustered Index Scan" EstimatedTotalSubtreeCost="0.117549">
  183.                                       <OutputList>
  184.                                         <ColumnReference Database="[CCMI]" Schema="[dbo]" Table="[AST_lnkCapturePolicyAttributes]" Alias="[ca2]" Column="intAdminCaptureID" />
  185.                                       </OutputList>
  186.                                       <IndexScan Ordered="true" ScanDirection="FORWARD" ForcedIndex="false" NoExpandHint="false">
  187.                                         <DefinedValues>
  188.                                           <DefinedValue>
  189.                                             <ColumnReference Database="[CCMI]" Schema="[dbo]" Table="[AST_lnkCapturePolicyAttributes]" Alias="[ca2]" Column="intAdminCaptureID" />
  190.                                           </DefinedValue>
  191.                                         </DefinedValues>
  192.                                         <Object Database="[CCMI]" Schema="[dbo]" Table="[AST_lnkCapturePolicyAttributes]" Index="[PK_AST_lnkCapturePolicyAttributes]" Alias="[ca2]" />
  193.                                         <Predicate>
  194.                                           <ScalarOperator ScalarString="[CCMI].[dbo].[AST_tblAttributes].[intAttributeID] as [attx].[intAttributeID]=[CCMI].[dbo].[AST_lnkCapturePolicyAttributes].[intAttributeID] as [ca2].[intAttributeID]">
  195.                                             <Compare CompareOp="EQ">
  196.                                               <ScalarOperator>
  197.                                                 <Identifier>
  198.                                                   <ColumnReference Database="[CCMI]" Schema="[dbo]" Table="[AST_tblAttributes]" Alias="[attx]" Column="intAttributeID" />
  199.                                                 </Identifier>
  200.                                               </ScalarOperator>
  201.                                               <ScalarOperator>
  202.                                                 <Identifier>
  203.                                                   <ColumnReference Database="[CCMI]" Schema="[dbo]" Table="[AST_lnkCapturePolicyAttributes]" Alias="[ca2]" Column="intAttributeID" />
  204.                                                 </Identifier>
  205.                                               </ScalarOperator>
  206.                                             </Compare>
  207.                                           </ScalarOperator>
  208.                                         </Predicate>
  209.                                       </IndexScan>
  210.                                     </RelOp>
  211.                                     <RelOp AvgRowSize="33" EstimateCPU="0.000158129" EstimateIO="0.003125" EstimateRebinds="8872.65" EstimateRewinds="0" EstimateRows="1" LogicalOp="Index Seek" NodeId="18" Parallel="false" PhysicalOp="Index Seek" EstimatedTotalSubtreeCost="0.117549">
  212.                                       <OutputList>
  213.                                         <ColumnReference Database="[CCMI]" Schema="[dbo]" Table="[AST_lnkEmployeeCapture]" Alias="[ec2]" Column="txtRACFID" />
  214.                                         <ColumnReference Database="[CCMI]" Schema="[dbo]" Table="[AST_lnkEmployeeCapture]" Alias="[ec2]" Column="intTeamID" />
  215.                                         <ColumnReference Database="[CCMI]" Schema="[dbo]" Table="[AST_lnkEmployeeCapture]" Alias="[ec2]" Column="intAdminCaptureID" />
  216.                                       </OutputList>
  217.                                       <IndexScan Ordered="true" ScanDirection="FORWARD" ForcedIndex="false" NoExpandHint="false">
  218.                                         <DefinedValues>
  219.                                           <DefinedValue>
  220.                                             <ColumnReference Database="[CCMI]" Schema="[dbo]" Table="[AST_lnkEmployeeCapture]" Alias="[ec2]" Column="txtRACFID" />
  221.                                           </DefinedValue>
  222.                                           <DefinedValue>
  223.                                             <ColumnReference Database="[CCMI]" Schema="[dbo]" Table="[AST_lnkEmployeeCapture]" Alias="[ec2]" Column="intTeamID" />
  224.                                           </DefinedValue>
  225.                                           <DefinedValue>
  226.                                             <ColumnReference Database="[CCMI]" Schema="[dbo]" Table="[AST_lnkEmployeeCapture]" Alias="[ec2]" Column="intAdminCaptureID" />
  227.                                           </DefinedValue>
  228.                                         </DefinedValues>
  229.                                         <Object Database="[CCMI]" Schema="[dbo]" Table="[AST_lnkEmployeeCapture]" Index="[IDX_intAdminCaptureID]" Alias="[ec2]" />
  230.                                         <SeekPredicates>
  231.                                           <SeekPredicate>
  232.                                             <Prefix ScanType="EQ">
  233.                                               <RangeColumns>
  234.                                                 <ColumnReference Database="[CCMI]" Schema="[dbo]" Table="[AST_lnkEmployeeCapture]" Alias="[ec2]" Column="intAdminCaptureID" />
  235.                                               </RangeColumns>
  236.                                               <RangeExpressions>
  237.                                                 <ScalarOperator ScalarString="[CCMI].[dbo].[AST_lnkCapturePolicyAttributes].[intAdminCaptureID] as [ca2].[intAdminCaptureID]">
  238.                                                   <Identifier>
  239.                                                     <ColumnReference Database="[CCMI]" Schema="[dbo]" Table="[AST_lnkCapturePolicyAttributes]" Alias="[ca2]" Column="intAdminCaptureID" />
  240.                                                   </Identifier>
  241.                                                 </ScalarOperator>
  242.                                               </RangeExpressions>
  243.                                             </Prefix>
  244.                                           </SeekPredicate>
  245.                                         </SeekPredicates>
  246.                                         <Predicate>
  247.                                           <ScalarOperator ScalarString="[CCMI].[dbo].[AST_lnkEmployeeCapture].[intTeamID] as [ec2].[intTeamID]=(57)">
  248.                                             <Compare CompareOp="EQ">
  249.                                               <ScalarOperator>
  250.                                                 <Identifier>
  251.                                                   <ColumnReference Database="[CCMI]" Schema="[dbo]" Table="[AST_lnkEmployeeCapture]" Alias="[ec2]" Column="intTeamID" />
  252.                                                 </Identifier>
  253.                                               </ScalarOperator>
  254.                                               <ScalarOperator>
  255.                                                 <Const ConstValue="(57)" />
  256.                                               </ScalarOperator>
  257.                                             </Compare>
  258.                                           </ScalarOperator>
  259.                                         </Predicate>
  260.                                       </IndexScan>
  261.                                     </RelOp>
  262.                                   </NestedLoops>
  263.                                 </RelOp>
  264.                                 <RelOp AvgRowSize="15" EstimateCPU="0.0001581" EstimateIO="0.003125" EstimateRebinds="955.771" EstimateRewinds="0" EstimateRows="1" LogicalOp="Clustered Index Seek" NodeId="20" Parallel="false" PhysicalOp="Clustered Index Seek" EstimatedTotalSubtreeCost="0.117549">
  265.                                   <OutputList>
  266.                                     <ColumnReference Database="[CCMI]" Schema="[dbo]" Table="[AST_lnkEmployeeCapture]" Alias="[ec2]" Column="dteCreatedDate" />
  267.                                   </OutputList>
  268.                                   <IndexScan Lookup="true" Ordered="true" ScanDirection="FORWARD" ForcedIndex="false" NoExpandHint="false">
  269.                                     <DefinedValues>
  270.                                       <DefinedValue>
  271.                                         <ColumnReference Database="[CCMI]" Schema="[dbo]" Table="[AST_lnkEmployeeCapture]" Alias="[ec2]" Column="dteCreatedDate" />
  272.                                       </DefinedValue>
  273.                                     </DefinedValues>
  274.                                     <Object Database="[CCMI]" Schema="[dbo]" Table="[AST_lnkEmployeeCapture]" Index="[PK_lnkEmployeeCapture]" Alias="[ec2]" TableReferenceId="-1" />
  275.                                     <SeekPredicates>
  276.                                       <SeekPredicate>
  277.                                         <Prefix ScanType="EQ">
  278.                                           <RangeColumns>
  279.                                             <ColumnReference Database="[CCMI]" Schema="[dbo]" Table="[AST_lnkEmployeeCapture]" Alias="[ec2]" Column="txtRACFID" />
  280.                                             <ColumnReference Database="[CCMI]" Schema="[dbo]" Table="[AST_lnkEmployeeCapture]" Alias="[ec2]" Column="intTeamID" />
  281.                                             <ColumnReference Database="[CCMI]" Schema="[dbo]" Table="[AST_lnkEmployeeCapture]" Alias="[ec2]" Column="intAdminCaptureID" />
  282.                                           </RangeColumns>
  283.                                           <RangeExpressions>
  284.                                             <ScalarOperator ScalarString="[CCMI].[dbo].[AST_lnkEmployeeCapture].[txtRACFID] as [ec2].[txtRACFID]">
  285.                                               <Identifier>
  286.                                                 <ColumnReference Database="[CCMI]" Schema="[dbo]" Table="[AST_lnkEmployeeCapture]" Alias="[ec2]" Column="txtRACFID" />
  287.                                               </Identifier>
  288.                                             </ScalarOperator>
  289.                                             <ScalarOperator ScalarString="[CCMI].[dbo].[AST_lnkEmployeeCapture].[intTeamID] as [ec2].[intTeamID]">
  290.                                               <Identifier>
  291.                                                 <ColumnReference Database="[CCMI]" Schema="[dbo]" Table="[AST_lnkEmployeeCapture]" Alias="[ec2]" Column="intTeamID" />
  292.                                               </Identifier>
  293.                                             </ScalarOperator>
  294.                                             <ScalarOperator ScalarString="[CCMI].[dbo].[AST_lnkEmployeeCapture].[intAdminCaptureID] as [ec2].[intAdminCaptureID]">
  295.                                               <Identifier>
  296.                                                 <ColumnReference Database="[CCMI]" Schema="[dbo]" Table="[AST_lnkEmployeeCapture]" Alias="[ec2]" Column="intAdminCaptureID" />
  297.                                               </Identifier>
  298.                                             </ScalarOperator>
  299.                                           </RangeExpressions>
  300.                                         </Prefix>
  301.                                       </SeekPredicate>
  302.                                     </SeekPredicates>
  303.                                   </IndexScan>
  304.                                 </RelOp>
  305.                               </NestedLoops>
  306.                             </RelOp>
  307.                             <Predicate>
  308.                               <ScalarOperator ScalarString="[CCMI].[dbo].[AST_lnkEmployeeCapture].[dteCreatedDate] as [ec2].[dteCreatedDate]&gt;=[@cutoffdate]">
  309.                                 <Compare CompareOp="GE">
  310.                                   <ScalarOperator>
  311.                                     <Identifier>
  312.                                       <ColumnReference Database="[CCMI]" Schema="[dbo]" Table="[AST_lnkEmployeeCapture]" Alias="[ec2]" Column="dteCreatedDate" />
  313.                                     </Identifier>
  314.                                   </ScalarOperator>
  315.                                   <ScalarOperator>
  316.                                     <Identifier>
  317.                                       <ColumnReference Column="@cutoffdate" />
  318.                                     </Identifier>
  319.                                   </ScalarOperator>
  320.                                 </Compare>
  321.                               </ScalarOperator>
  322.                             </Predicate>
  323.                           </Filter>
  324.                         </RelOp>
  325.                       </Top>
  326.                     </RelOp>
  327.                   </Concat>
  328.                 </RelOp>
  329.               </NestedLoops>
  330.             </RelOp>
  331.           </QueryPlan>
  332.         </StmtSimple>
  333.       </Statements>
  334.     </Batch>
  335.   </BatchSequence>
  336. </ShowPlanXML>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement