Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
<?xml version="1.0" encoding="utf-16"?>
<ShowPlanXML xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Version="1.2" Build="11.0.3412.0" xmlns="http://schemas.microsoft.com/sqlserver/2004/07/showplan">
<BatchSequence>
<Batch>
<Statements>
<StmtSimple StatementCompId="7" StatementEstRows="175.59" StatementId="1" StatementOptmLevel="TRIVIAL" StatementSubTreeCost="0.0136683" StatementText="INSERT INTO @tmp&#xD;&#xA; SELECT strBxOrderNo&#xD;&#xA; ,sintReturnId&#xD;&#xA; FROM TABLEBACKUPS.dbo.tblBReturnHistory rh&#xD;&#xA; WHERE rh.sintReturnStatusId in ( 3 )&#xD;&#xA; AND rh.dtmAdded &gt;= @OrderStartDate&#xD;&#xA; AND rh.dtmAdded &lt; @OrderEndDate&#xD;&#xA;&#xD;&#xA;" StatementType="INSERT" QueryHash="0x7EEE3E7E1BB16CBA" QueryPlanHash="0x7B47810B99B185EE" RetrievedFromCache="true">
<StatementSetOptions ANSI_NULLS="true" ANSI_PADDING="true" ANSI_WARNINGS="true" ARITHABORT="true" CONCAT_NULL_YIELDS_NULL="true" NUMERIC_ROUNDABORT="false" QUOTED_IDENTIFIER="true" />
<QueryPlan DegreeOfParallelism="0" NonParallelPlanReason="CouldNotGenerateValidParallelPlan" CachedPlanSize="24" CompileTime="2" CompileCPU="2" CompileMemory="288">
<MemoryGrantInfo SerialRequiredMemory="0" SerialDesiredMemory="0" />
<OptimizerHardwareDependentProperties EstimatedAvailableMemoryGrant="218453" EstimatedPagesCached="327680" EstimatedAvailableDegreeOfParallelism="8" />
<RelOp AvgRowSize="9" EstimateCPU="0.00017559" EstimateIO="0.01" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="175.59" LogicalOp="Insert" NodeId="0" Parallel="false" PhysicalOp="Table Insert" EstimatedTotalSubtreeCost="0.0136683">
<OutputList />
<RunTimeInformation>
<RunTimeCountersPerThread Thread="0" ActualRows="1951" ActualEndOfScans="1" ActualExecutions="1" />
</RunTimeInformation>
<Update DMLRequestSort="false">
<Object Table="[@tmp]" />
<SetPredicate>
<ScalarOperator ScalarString="[strBxOrderNo] = [TableBackups].[dbo].[tblBReturnHistory].[strBxOrderNo] as [rh].[strBxOrderNo],[sintReturnId] = [Expr1006]">
<ScalarExpressionList>
<ScalarOperator>
<MultipleAssign>
<Assign>
<ColumnReference Column="strBxOrderNo" />
<ScalarOperator>
<Identifier>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBReturnHistory]" Alias="[rh]" Column="strBxOrderNo" />
</Identifier>
</ScalarOperator>
</Assign>
<Assign>
<ColumnReference Column="sintReturnId" />
<ScalarOperator>
<Identifier>
<ColumnReference Column="Expr1006" />
</Identifier>
</ScalarOperator>
</Assign>
</MultipleAssign>
</ScalarOperator>
</ScalarExpressionList>
</ScalarOperator>
</SetPredicate>
<RelOp AvgRowSize="25" EstimateCPU="1.7559E-05" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="175.59" LogicalOp="Compute Scalar" NodeId="1" Parallel="false" PhysicalOp="Compute Scalar" EstimatedTotalSubtreeCost="0.00349271">
<OutputList>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBReturnHistory]" Alias="[rh]" Column="strBxOrderNo" />
<ColumnReference Column="Expr1006" />
</OutputList>
<ComputeScalar>
<DefinedValues>
<DefinedValue>
<ColumnReference Column="Expr1006" />
<ScalarOperator ScalarString="CONVERT_IMPLICIT(int,[TableBackups].[dbo].[tblBReturnHistory].[sintReturnId] as [rh].[sintReturnId],0)">
<Convert DataType="int" Style="0" Implicit="true">
<ScalarOperator>
<Identifier>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBReturnHistory]" Alias="[rh]" Column="sintReturnId" />
</Identifier>
</ScalarOperator>
</Convert>
</ScalarOperator>
</DefinedValue>
</DefinedValues>
<RelOp AvgRowSize="23" EstimateCPU="0.000350149" EstimateIO="0.003125" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="175.59" LogicalOp="Index Seek" NodeId="2" Parallel="false" PhysicalOp="Index Seek" EstimatedTotalSubtreeCost="0.00347515" TableCardinality="1951">
<OutputList>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBReturnHistory]" Alias="[rh]" Column="strBxOrderNo" />
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBReturnHistory]" Alias="[rh]" Column="sintReturnId" />
</OutputList>
<RunTimeInformation>
<RunTimeCountersPerThread Thread="0" ActualRows="1951" ActualEndOfScans="1" ActualExecutions="1" />
</RunTimeInformation>
<IndexScan Ordered="true" ScanDirection="FORWARD" ForcedIndex="false" ForceSeek="false" ForceScan="false" NoExpandHint="false" Storage="RowStore">
<DefinedValues>
<DefinedValue>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBReturnHistory]" Alias="[rh]" Column="strBxOrderNo" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBReturnHistory]" Alias="[rh]" Column="sintReturnId" />
</DefinedValue>
</DefinedValues>
<Object Database="[TableBackups]" Schema="[dbo]" Table="[tblBReturnHistory]" Index="[IX_tblBReturnHistory__sintReturnStatusId_dtmAdded]" Alias="[rh]" IndexKind="NonClustered" />
<SeekPredicates>
<SeekPredicateNew>
<SeekKeys>
<Prefix ScanType="EQ">
<RangeColumns>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBReturnHistory]" Alias="[rh]" Column="sintReturnStatusId" />
</RangeColumns>
<RangeExpressions>
<ScalarOperator ScalarString="(3)">
<Const ConstValue="(3)" />
</ScalarOperator>
</RangeExpressions>
</Prefix>
<StartRange ScanType="GE">
<RangeColumns>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBReturnHistory]" Alias="[rh]" Column="dtmAdded" />
</RangeColumns>
<RangeExpressions>
<ScalarOperator ScalarString="[@OrderStartDate]">
<Identifier>
<ColumnReference Column="@OrderStartDate" />
</Identifier>
</ScalarOperator>
</RangeExpressions>
</StartRange>
<EndRange ScanType="LT">
<RangeColumns>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBReturnHistory]" Alias="[rh]" Column="dtmAdded" />
</RangeColumns>
<RangeExpressions>
<ScalarOperator ScalarString="[@OrderEndDate]">
<Identifier>
<ColumnReference Column="@OrderEndDate" />
</Identifier>
</ScalarOperator>
</RangeExpressions>
</EndRange>
</SeekKeys>
</SeekPredicateNew>
</SeekPredicates>
</IndexScan>
</RelOp>
</ComputeScalar>
</RelOp>
</Update>
</RelOp>
<ParameterList>
<ColumnReference Column="@OrderEndDate" ParameterRuntimeValue="'2016-02-28 00:00:00.000'" />
<ColumnReference Column="@OrderStartDate" ParameterRuntimeValue="'2015-02-15 00:00:00.000'" />
</ParameterList>
</QueryPlan>
</StmtSimple>
</Statements>
</Batch>
<Batch>
<Statements>
<StmtSimple StatementCompId="8" StatementEstRows="1" StatementId="2" StatementOptmLevel="FULL" StatementOptmEarlyAbortReason="GoodEnoughPlanFound" StatementSubTreeCost="0.0474821" StatementText="SELECT &#xD;&#xA; op.lngPaymentID&#xD;&#xA; ,op.strBxOrderNo&#xD;&#xA; ,op.sintPaymentTypeID&#xD;&#xA; ,op.strCurrencyCode&#xD;&#xA; ,op.strBCCurrencyCode&#xD;&#xA; ,op.decPaymentAmount&#xD;&#xA; ,op.decBCPaymentAmount&#xD;&#xA; ,ap.strAccountCode&#xD;&#xA; ,o.sintMarketID&#xD;&#xA; ,o.sintOrderChannelID&#xD;&#xA; ,o.sintOrderTypeID&#xD;&#xA; ,CASE WHEN opgv.lngpaymentID IS NULL THEN NULL -- Not a Voucher = Null&#xD;&#xA; WHEN gvp.strIssuedBxOrderNo IS NULL THEN 0 ELSE 1 END AS [IsPromoVoucher] -- Is a Voucher - check type&#xD;&#xA; ,o.sdtmOrdCreated&#xD;&#xA;&#xD;&#xA; FROM @tmp rh&#xD;&#xA;&#xD;&#xA; INNER JOIN TABLEBACKUPS.dbo.tblBReturn r &#xD;&#xA; ON r.sintReturnId = rh.sintReturnId &#xD;&#xA; AND r.strBxOrderNo = rh.strBxOrderNo&#xD;&#xA;&#xD;&#xA; INNER JOIN bocss2.dbo.tblBOrder o &#xD;&#xA; ON o.strBxOrderNo = r.strBxOrderNo&#xD;&#xA;&#xD;&#xA; INNER JOIN Bocss2.dbo.tblBOrderPayment op &#xD;&#xA; ON op.strBxOrderNo = o.strBxOrderNo&#xD;&#xA;&#xD;&#xA; INNER JOIN TABLEBACKUPS.dbo.tblBOrderItemReturn AS oir &#xD;&#xA; ON r.sintReturnId = oir.sintReturnID &#xD;&#xA; AND r.strBxOrderNo = oir.strBxOrderNo&#xD;&#xA;&#xD;&#xA; INNER JOIN Bocss2.dbo.tblBOrderItem AS i &#xD;&#xA; ON i.strBxOrderNo = oir.strBxOrderNo &#xD;&#xA; AND i.sintOrderSeqNo = oir.sintOrderSeqNo&#xD;&#xA;&#xD;&#xA; INNER JOIN TABLEBACKUPS.dbo.tblBAccountParticipant ap &#xD;&#xA; ON o.lngAccountParticipantID = ap.lngParticipantID&#xD;&#xA;&#xD;&#xA; LEFT OUTER JOIN TABLEBACKUPS.dbo.tblBOrderPaymentGiftVoucher opgv &#xD;&#xA; ON op.lngPaymentID = opgv.lngPaymentID&#xD;&#xA;&#xD;&#xA; LEFT OUTER JOIN TABLEBACKUPS.dbo.tblBGiftVoucher gv &#xD;&#xA; ON opgv.strVoucherNumber = gv.strVoucherNumber&#xD;&#xA;&#xD;&#xA; LEFT OUTER JOIN TABLEBACKUPS.dbo.tblBGiftVoucherPromotion gvp &#xD;&#xA; ON gvp.strIssuedBxOrderNo = gv.strIssuedBxOrderNo&#xD;&#xA; &#xD;&#xA; WHERE oir.decReturnFinalAmount &gt; 0&#xD;&#xA; AND o.sdtmOrdCreated &gt;= @OrderStartDate&#xD;&#xA;&#xD;&#xA;&#xD;&#xA;" StatementType="SELECT" QueryHash="0x3CEFF328019CBD8" QueryPlanHash="0x6285CCD6BE03A8CF" RetrievedFromCache="true">
<StatementSetOptions ANSI_NULLS="true" ANSI_PADDING="true" ANSI_WARNINGS="true" ARITHABORT="true" CONCAT_NULL_YIELDS_NULL="true" NUMERIC_ROUNDABORT="false" QUOTED_IDENTIFIER="true" />
<QueryPlan DegreeOfParallelism="1" MemoryGrant="2176" CachedPlanSize="136" CompileTime="130" CompileCPU="130" CompileMemory="1888">
<MemoryGrantInfo SerialRequiredMemory="2048" SerialDesiredMemory="2176" RequiredMemory="2048" DesiredMemory="2176" RequestedMemory="2176" GrantWaitTime="0" GrantedMemory="2176" MaxUsedMemory="64" />
<OptimizerHardwareDependentProperties EstimatedAvailableMemoryGrant="218453" EstimatedPagesCached="327680" EstimatedAvailableDegreeOfParallelism="8" />
<RelOp AvgRowSize="77" EstimateCPU="1E-07" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1" LogicalOp="Compute Scalar" NodeId="0" Parallel="false" PhysicalOp="Compute Scalar" EstimatedTotalSubtreeCost="0.0474821">
<OutputList>
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sintOrderChannelID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sintOrderTypeID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sdtmOrdCreated" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sintMarketID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="lngPaymentID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="strBxOrderNo" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="sintPaymentTypeID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="strCurrencyCode" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="decPaymentAmount" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="strBCCurrencyCode" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="decBCPaymentAmount" />
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBAccountParticipant]" Alias="[ap]" Column="strAccountCode" />
<ColumnReference Column="Expr1022" />
</OutputList>
<ComputeScalar>
<DefinedValues>
<DefinedValue>
<ColumnReference Column="Expr1022" />
<ScalarOperator ScalarString="CASE WHEN [TableBackups].[dbo].[tblBOrderPaymentGiftVoucher].[lngPaymentID] as [opgv].[lngPaymentID] IS NULL THEN NULL ELSE CASE WHEN [TableBackups].[dbo].[tblBGiftVoucherPromotion].[strIssuedBxOrderNo] as [gvp].[strIssuedBxOrderNo] IS NULL THEN (0) ELSE (1) END END">
<IF>
<Condition>
<ScalarOperator>
<Compare CompareOp="IS">
<ScalarOperator>
<Identifier>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBOrderPaymentGiftVoucher]" Alias="[opgv]" Column="lngPaymentID" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Const ConstValue="NULL" />
</ScalarOperator>
</Compare>
</ScalarOperator>
</Condition>
<Then>
<ScalarOperator>
<Const ConstValue="NULL" />
</ScalarOperator>
</Then>
<Else>
<ScalarOperator>
<IF>
<Condition>
<ScalarOperator>
<Compare CompareOp="IS">
<ScalarOperator>
<Identifier>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBGiftVoucherPromotion]" Alias="[gvp]" Column="strIssuedBxOrderNo" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Const ConstValue="NULL" />
</ScalarOperator>
</Compare>
</ScalarOperator>
</Condition>
<Then>
<ScalarOperator>
<Const ConstValue="(0)" />
</ScalarOperator>
</Then>
<Else>
<ScalarOperator>
<Const ConstValue="(1)" />
</ScalarOperator>
</Else>
</IF>
</ScalarOperator>
</Else>
</IF>
</ScalarOperator>
</DefinedValue>
</DefinedValues>
<RelOp AvgRowSize="90" EstimateCPU="4.18E-06" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1" LogicalOp="Left Outer Join" NodeId="1" Parallel="false" PhysicalOp="Nested Loops" EstimatedTotalSubtreeCost="0.047482">
<OutputList>
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sintOrderChannelID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sintOrderTypeID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sdtmOrdCreated" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sintMarketID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="lngPaymentID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="strBxOrderNo" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="sintPaymentTypeID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="strCurrencyCode" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="decPaymentAmount" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="strBCCurrencyCode" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="decBCPaymentAmount" />
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBAccountParticipant]" Alias="[ap]" Column="strAccountCode" />
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBOrderPaymentGiftVoucher]" Alias="[opgv]" Column="lngPaymentID" />
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBGiftVoucherPromotion]" Alias="[gvp]" Column="strIssuedBxOrderNo" />
</OutputList>
<RunTimeInformation>
<RunTimeCountersPerThread Thread="0" ActualRows="226" ActualEndOfScans="1" ActualExecutions="1" />
</RunTimeInformation>
<NestedLoops Optimized="false">
<OuterReferences>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBGiftVoucher]" Alias="[gv]" Column="strIssuedBxOrderNo" />
</OuterReferences>
<RelOp AvgRowSize="90" EstimateCPU="4.18E-06" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1" LogicalOp="Left Outer Join" NodeId="2" Parallel="false" PhysicalOp="Nested Loops" EstimatedTotalSubtreeCost="0.0441947">
<OutputList>
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sintOrderChannelID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sintOrderTypeID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sdtmOrdCreated" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sintMarketID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="lngPaymentID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="strBxOrderNo" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="sintPaymentTypeID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="strCurrencyCode" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="decPaymentAmount" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="strBCCurrencyCode" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="decBCPaymentAmount" />
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBAccountParticipant]" Alias="[ap]" Column="strAccountCode" />
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBOrderPaymentGiftVoucher]" Alias="[opgv]" Column="lngPaymentID" />
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBGiftVoucher]" Alias="[gv]" Column="strIssuedBxOrderNo" />
</OutputList>
<RunTimeInformation>
<RunTimeCountersPerThread Thread="0" ActualRows="226" ActualEndOfScans="1" ActualExecutions="1" />
</RunTimeInformation>
<NestedLoops Optimized="true">
<OuterReferences>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBOrderPaymentGiftVoucher]" Alias="[opgv]" Column="strVoucherNumber" />
</OuterReferences>
<RelOp AvgRowSize="78" EstimateCPU="4.18E-06" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1" LogicalOp="Left Outer Join" NodeId="4" Parallel="false" PhysicalOp="Nested Loops" EstimatedTotalSubtreeCost="0.0409075">
<OutputList>
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sintOrderChannelID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sintOrderTypeID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sdtmOrdCreated" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sintMarketID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="lngPaymentID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="strBxOrderNo" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="sintPaymentTypeID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="strCurrencyCode" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="decPaymentAmount" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="strBCCurrencyCode" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="decBCPaymentAmount" />
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBAccountParticipant]" Alias="[ap]" Column="strAccountCode" />
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBOrderPaymentGiftVoucher]" Alias="[opgv]" Column="lngPaymentID" />
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBOrderPaymentGiftVoucher]" Alias="[opgv]" Column="strVoucherNumber" />
</OutputList>
<RunTimeInformation>
<RunTimeCountersPerThread Thread="0" ActualRows="226" ActualEndOfScans="1" ActualExecutions="1" />
</RunTimeInformation>
<NestedLoops Optimized="false">
<OuterReferences>
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="lngPaymentID" />
</OuterReferences>
<RelOp AvgRowSize="73" EstimateCPU="1.02976E-05" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1" LogicalOp="Inner Join" NodeId="5" Parallel="false" PhysicalOp="Nested Loops" EstimatedTotalSubtreeCost="0.0376202">
<OutputList>
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sintOrderChannelID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sintOrderTypeID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sdtmOrdCreated" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sintMarketID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="lngPaymentID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="strBxOrderNo" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="sintPaymentTypeID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="strCurrencyCode" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="decPaymentAmount" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="strBCCurrencyCode" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="decBCPaymentAmount" />
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBAccountParticipant]" Alias="[ap]" Column="strAccountCode" />
</OutputList>
<RunTimeInformation>
<RunTimeCountersPerThread Thread="0" ActualRows="226" ActualEndOfScans="1" ActualExecutions="1" />
</RunTimeInformation>
<NestedLoops Optimized="true">
<OuterReferences>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBOrderItemReturn]" Alias="[oir]" Column="strBxOrderNo" />
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBOrderItemReturn]" Alias="[oir]" Column="sintOrderSeqNo" />
</OuterReferences>
<RelOp AvgRowSize="86" EstimateCPU="1.02976E-05" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="2.46353" LogicalOp="Inner Join" NodeId="7" Parallel="false" PhysicalOp="Nested Loops" EstimatedTotalSubtreeCost="0.0317776">
<OutputList>
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sintOrderChannelID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sintOrderTypeID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sdtmOrdCreated" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sintMarketID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="lngPaymentID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="strBxOrderNo" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="sintPaymentTypeID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="strCurrencyCode" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="decPaymentAmount" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="strBCCurrencyCode" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="decBCPaymentAmount" />
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBOrderItemReturn]" Alias="[oir]" Column="strBxOrderNo" />
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBOrderItemReturn]" Alias="[oir]" Column="sintOrderSeqNo" />
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBAccountParticipant]" Alias="[ap]" Column="strAccountCode" />
</OutputList>
<RunTimeInformation>
<RunTimeCountersPerThread Thread="0" ActualRows="226" ActualEndOfScans="1" ActualExecutions="1" />
</RunTimeInformation>
<NestedLoops Optimized="true">
<OuterReferences>
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="lngPaymentID" />
</OuterReferences>
<RelOp AvgRowSize="62" EstimateCPU="1.02976E-05" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="2.46353" LogicalOp="Inner Join" NodeId="9" Parallel="false" PhysicalOp="Nested Loops" EstimatedTotalSubtreeCost="0.0258137">
<OutputList>
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sintOrderChannelID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sintOrderTypeID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sdtmOrdCreated" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sintMarketID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="lngPaymentID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="strBxOrderNo" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="sintPaymentTypeID" />
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBOrderItemReturn]" Alias="[oir]" Column="strBxOrderNo" />
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBOrderItemReturn]" Alias="[oir]" Column="sintOrderSeqNo" />
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBAccountParticipant]" Alias="[ap]" Column="strAccountCode" />
</OutputList>
<RunTimeInformation>
<RunTimeCountersPerThread Thread="0" ActualRows="226" ActualEndOfScans="1" ActualExecutions="1" />
</RunTimeInformation>
<NestedLoops Optimized="true">
<OuterReferences>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBOrderItemReturn]" Alias="[oir]" Column="strBxOrderNo" />
</OuterReferences>
<RelOp AvgRowSize="44" EstimateCPU="9.01764E-06" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="2.15733" LogicalOp="Inner Join" NodeId="11" Parallel="false" PhysicalOp="Nested Loops" EstimatedTotalSubtreeCost="0.0204794">
<OutputList>
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sintOrderChannelID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sintOrderTypeID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sdtmOrdCreated" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sintMarketID" />
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBOrderItemReturn]" Alias="[oir]" Column="strBxOrderNo" />
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBOrderItemReturn]" Alias="[oir]" Column="sintOrderSeqNo" />
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBAccountParticipant]" Alias="[ap]" Column="strAccountCode" />
</OutputList>
<RunTimeInformation>
<RunTimeCountersPerThread Thread="0" ActualRows="186" ActualEndOfScans="1" ActualExecutions="1" />
</RunTimeInformation>
<NestedLoops Optimized="false">
<OuterReferences>
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="lngAccountParticipantID" />
</OuterReferences>
<RelOp AvgRowSize="36" EstimateCPU="9.01764E-06" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="2.15733" LogicalOp="Inner Join" NodeId="12" Parallel="false" PhysicalOp="Nested Loops" EstimatedTotalSubtreeCost="0.0151964">
<OutputList>
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sintOrderChannelID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sintOrderTypeID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sdtmOrdCreated" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sintMarketID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="lngAccountParticipantID" />
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBOrderItemReturn]" Alias="[oir]" Column="strBxOrderNo" />
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBOrderItemReturn]" Alias="[oir]" Column="sintOrderSeqNo" />
</OutputList>
<RunTimeInformation>
<RunTimeCountersPerThread Thread="0" ActualRows="3556" ActualEndOfScans="1" ActualExecutions="1" />
</RunTimeInformation>
<NestedLoops Optimized="false">
<OuterReferences>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBOrderItemReturn]" Alias="[oir]" Column="strBxOrderNo" />
</OuterReferences>
<RelOp AvgRowSize="22" EstimateCPU="9.01764E-06" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="2.15733" LogicalOp="Inner Join" NodeId="13" Parallel="false" PhysicalOp="Nested Loops" EstimatedTotalSubtreeCost="0.00986377">
<OutputList>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBOrderItemReturn]" Alias="[oir]" Column="strBxOrderNo" />
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBOrderItemReturn]" Alias="[oir]" Column="sintOrderSeqNo" />
</OutputList>
<RunTimeInformation>
<RunTimeCountersPerThread Thread="0" ActualRows="3557" ActualEndOfScans="1" ActualExecutions="1" />
</RunTimeInformation>
<NestedLoops Optimized="false">
<OuterReferences>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBReturn]" Alias="[r]" Column="strBxOrderNo" />
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBReturn]" Alias="[r]" Column="sintReturnId" />
</OuterReferences>
<RelOp AvgRowSize="22" EstimateCPU="4.18E-06" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1" LogicalOp="Inner Join" NodeId="14" Parallel="false" PhysicalOp="Nested Loops" EstimatedTotalSubtreeCost="0.00657038">
<OutputList>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBReturn]" Alias="[r]" Column="strBxOrderNo" />
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBReturn]" Alias="[r]" Column="sintReturnId" />
</OutputList>
<RunTimeInformation>
<RunTimeCountersPerThread Thread="0" ActualRows="1951" ActualEndOfScans="1" ActualExecutions="1" />
</RunTimeInformation>
<NestedLoops Optimized="false">
<OuterReferences>
<ColumnReference Table="@tmp" Alias="[rh]" Column="strBxOrderNo" />
<ColumnReference Table="@tmp" Alias="[rh]" Column="sintReturnId" />
</OuterReferences>
<RelOp AvgRowSize="25" EstimateCPU="0.0001581" EstimateIO="0.003125" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1" LogicalOp="Table Scan" NodeId="15" Parallel="false" PhysicalOp="Table Scan" EstimatedTotalSubtreeCost="0.0032831" TableCardinality="0">
<OutputList>
<ColumnReference Table="@tmp" Alias="[rh]" Column="strBxOrderNo" />
<ColumnReference Table="@tmp" Alias="[rh]" Column="sintReturnId" />
</OutputList>
<RunTimeInformation>
<RunTimeCountersPerThread Thread="0" ActualRows="1951" ActualEndOfScans="1" ActualExecutions="1" />
</RunTimeInformation>
<TableScan Ordered="false" ForcedIndex="false" ForceScan="false" NoExpandHint="false">
<DefinedValues>
<DefinedValue>
<ColumnReference Table="@tmp" Alias="[rh]" Column="strBxOrderNo" />
</DefinedValue>
<DefinedValue>
<ColumnReference Table="@tmp" Alias="[rh]" Column="sintReturnId" />
</DefinedValue>
</DefinedValues>
<Object Table="[@tmp]" Alias="[rh]" />
</TableScan>
</RelOp>
<RelOp AvgRowSize="22" EstimateCPU="0.0001581" EstimateIO="0.003125" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1" LogicalOp="Clustered Index Seek" NodeId="16" Parallel="false" PhysicalOp="Clustered Index Seek" EstimatedTotalSubtreeCost="0.0032831" TableCardinality="7321">
<OutputList>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBReturn]" Alias="[r]" Column="strBxOrderNo" />
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBReturn]" Alias="[r]" Column="sintReturnId" />
</OutputList>
<RunTimeInformation>
<RunTimeCountersPerThread Thread="0" ActualRows="1951" ActualEndOfScans="0" ActualExecutions="1951" />
</RunTimeInformation>
<IndexScan Ordered="true" ScanDirection="FORWARD" ForcedIndex="false" ForceSeek="false" ForceScan="false" NoExpandHint="false" Storage="RowStore">
<DefinedValues>
<DefinedValue>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBReturn]" Alias="[r]" Column="strBxOrderNo" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBReturn]" Alias="[r]" Column="sintReturnId" />
</DefinedValue>
</DefinedValues>
<Object Database="[TableBackups]" Schema="[dbo]" Table="[tblBReturn]" Index="[PK_tblBReturn]" Alias="[r]" IndexKind="Clustered" />
<SeekPredicates>
<SeekPredicateNew>
<SeekKeys>
<Prefix ScanType="EQ">
<RangeColumns>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBReturn]" Alias="[r]" Column="strBxOrderNo" />
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBReturn]" Alias="[r]" Column="sintReturnId" />
</RangeColumns>
<RangeExpressions>
<ScalarOperator ScalarString="@tmp.[strBxOrderNo] as [rh].[strBxOrderNo]">
<Identifier>
<ColumnReference Table="@tmp" Alias="[rh]" Column="strBxOrderNo" />
</Identifier>
</ScalarOperator>
<ScalarOperator ScalarString="@tmp.[sintReturnId] as [rh].[sintReturnId]">
<Identifier>
<ColumnReference Table="@tmp" Alias="[rh]" Column="sintReturnId" />
</Identifier>
</ScalarOperator>
</RangeExpressions>
</Prefix>
</SeekKeys>
</SeekPredicateNew>
</SeekPredicates>
</IndexScan>
</RelOp>
</NestedLoops>
</RelOp>
<RelOp AvgRowSize="22" EstimateCPU="0.000159373" EstimateIO="0.003125" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="2.15733" LogicalOp="Index Seek" NodeId="17" Parallel="false" PhysicalOp="Index Seek" EstimatedTotalSubtreeCost="0.00328437" TableCardinality="913823">
<OutputList>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBOrderItemReturn]" Alias="[oir]" Column="strBxOrderNo" />
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBOrderItemReturn]" Alias="[oir]" Column="sintOrderSeqNo" />
</OutputList>
<RunTimeInformation>
<RunTimeCountersPerThread Thread="0" ActualRows="3557" ActualEndOfScans="1951" ActualExecutions="1951" />
</RunTimeInformation>
<IndexScan Ordered="true" ScanDirection="FORWARD" ForcedIndex="false" ForceSeek="false" ForceScan="false" NoExpandHint="false" Storage="RowStore">
<DefinedValues>
<DefinedValue>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBOrderItemReturn]" Alias="[oir]" Column="strBxOrderNo" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBOrderItemReturn]" Alias="[oir]" Column="sintOrderSeqNo" />
</DefinedValue>
</DefinedValues>
<Object Database="[TableBackups]" Schema="[dbo]" Table="[tblBOrderItemReturn]" Index="[IX_tblBOrderItemReturn_fil_decReturnFinalAmount]" Filtered="true" Alias="[oir]" IndexKind="NonClustered" />
<SeekPredicates>
<SeekPredicateNew>
<SeekKeys>
<Prefix ScanType="EQ">
<RangeColumns>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBOrderItemReturn]" Alias="[oir]" Column="strBxOrderNo" />
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBOrderItemReturn]" Alias="[oir]" Column="sintReturnID" />
</RangeColumns>
<RangeExpressions>
<ScalarOperator ScalarString="[TableBackups].[dbo].[tblBReturn].[strBxOrderNo] as [r].[strBxOrderNo]">
<Identifier>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBReturn]" Alias="[r]" Column="strBxOrderNo" />
</Identifier>
</ScalarOperator>
<ScalarOperator ScalarString="[TableBackups].[dbo].[tblBReturn].[sintReturnId] as [r].[sintReturnId]">
<Identifier>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBReturn]" Alias="[r]" Column="sintReturnId" />
</Identifier>
</ScalarOperator>
</RangeExpressions>
</Prefix>
</SeekKeys>
</SeekPredicateNew>
</SeekPredicates>
</IndexScan>
</RelOp>
</NestedLoops>
</RelOp>
<RelOp AvgRowSize="21" EstimateCPU="0.0001581" EstimateIO="0.003125" EstimateRebinds="1.15733" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1" LogicalOp="Inner Join" NodeId="18" Parallel="false" PhysicalOp="Nested Loops" EstimatedTotalSubtreeCost="0.0053236" TableCardinality="42528500">
<OutputList>
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sintOrderChannelID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sintOrderTypeID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sdtmOrdCreated" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sintMarketID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="lngAccountParticipantID" />
</OutputList>
<RunTimeInformation>
<RunTimeCountersPerThread Thread="0" ActualRows="3556" ActualEndOfScans="1" ActualExecutions="3557" />
</RunTimeInformation>
<NestedLoops Optimized="false">
<OuterReferences>
<ColumnReference Column="Expr1024" />
<ColumnReference Column="Expr1025" />
<ColumnReference Column="Expr1023" />
</OuterReferences>
<RelOp AvgRowSize="19" EstimateCPU="0" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1" LogicalOp="Compute Scalar" NodeId="19" Parallel="false" PhysicalOp="Compute Scalar" EstimatedTotalSubtreeCost="0">
<OutputList>
<ColumnReference Column="Expr1024" />
<ColumnReference Column="Expr1025" />
<ColumnReference Column="Expr1023" />
</OutputList>
<RunTimeInformation>
<RunTimeCountersPerThread Thread="0" ActualRows="3557" ActualEndOfScans="1" ActualExecutions="3557" />
</RunTimeInformation>
<ComputeScalar>
<DefinedValues>
<DefinedValue>
<ValueVector>
<ColumnReference Column="Expr1024" />
<ColumnReference Column="Expr1025" />
<ColumnReference Column="Expr1023" />
</ValueVector>
<ScalarOperator ScalarString="GetRangeWithMismatchedTypes([@OrderStartDate],NULL,(22))">
<Intrinsic FunctionName="GetRangeWithMismatchedTypes">
<ScalarOperator>
<Identifier>
<ColumnReference Column="@OrderStartDate" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Const ConstValue="NULL" />
</ScalarOperator>
<ScalarOperator>
<Const ConstValue="(22)" />
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</DefinedValue>
</DefinedValues>
<RelOp AvgRowSize="0" EstimateCPU="0" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1" LogicalOp="Constant Scan" NodeId="20" Parallel="false" PhysicalOp="Constant Scan" EstimatedTotalSubtreeCost="0">
<OutputList />
<RunTimeInformation>
<RunTimeCountersPerThread Thread="0" ActualRows="3557" ActualEndOfScans="1" ActualExecutions="3557" />
</RunTimeInformation>
<ConstantScan />
</RelOp>
</ComputeScalar>
</RelOp>
<RelOp AvgRowSize="21" EstimateCPU="0.0001581" EstimateIO="0.003125" EstimateRebinds="1.15733" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1" LogicalOp="Index Seek" NodeId="24" Parallel="false" PhysicalOp="Index Seek" EstimatedTotalSubtreeCost="0.0053236" TableCardinality="42528500">
<OutputList>
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sintOrderChannelID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sintOrderTypeID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sdtmOrdCreated" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sintMarketID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="lngAccountParticipantID" />
</OutputList>
<RunTimeInformation>
<RunTimeCountersPerThread Thread="0" ActualRows="3556" ActualEndOfScans="1" ActualExecutions="3557" />
</RunTimeInformation>
<IndexScan Ordered="true" ScanDirection="FORWARD" ForcedIndex="false" ForceSeek="false" ForceScan="false" NoExpandHint="false" Storage="RowStore">
<DefinedValues>
<DefinedValue>
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sintOrderChannelID" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sintOrderTypeID" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sdtmOrdCreated" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sintMarketID" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="lngAccountParticipantID" />
</DefinedValue>
</DefinedValues>
<Object Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Index="[IX_tblBOrder_strBxOrderNo_sdtmOrdCreated_incl]" Alias="[o]" IndexKind="NonClustered" />
<SeekPredicates>
<SeekPredicateNew>
<SeekKeys>
<Prefix ScanType="EQ">
<RangeColumns>
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="strBxOrderNo" />
</RangeColumns>
<RangeExpressions>
<ScalarOperator ScalarString="[TableBackups].[dbo].[tblBOrderItemReturn].[strBxOrderNo] as [oir].[strBxOrderNo]">
<Identifier>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBOrderItemReturn]" Alias="[oir]" Column="strBxOrderNo" />
</Identifier>
</ScalarOperator>
</RangeExpressions>
</Prefix>
<StartRange ScanType="GT">
<RangeColumns>
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sdtmOrdCreated" />
</RangeColumns>
<RangeExpressions>
<ScalarOperator ScalarString="[Expr1024]">
<Identifier>
<ColumnReference Column="Expr1024" />
</Identifier>
</ScalarOperator>
</RangeExpressions>
</StartRange>
<EndRange ScanType="LT">
<RangeColumns>
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sdtmOrdCreated" />
</RangeColumns>
<RangeExpressions>
<ScalarOperator ScalarString="[Expr1025]">
<Identifier>
<ColumnReference Column="Expr1025" />
</Identifier>
</ScalarOperator>
</RangeExpressions>
</EndRange>
</SeekKeys>
</SeekPredicateNew>
</SeekPredicates>
</IndexScan>
</RelOp>
</NestedLoops>
</RelOp>
</NestedLoops>
</RelOp>
<RelOp AvgRowSize="21" EstimateCPU="0.0001581" EstimateIO="0.003125" EstimateRebinds="1.15733" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1" LogicalOp="Index Seek" NodeId="25" Parallel="false" PhysicalOp="Index Seek" EstimatedTotalSubtreeCost="0.00527402" TableCardinality="9685">
<OutputList>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBAccountParticipant]" Alias="[ap]" Column="strAccountCode" />
</OutputList>
<RunTimeInformation>
<RunTimeCountersPerThread Thread="0" ActualRows="186" ActualEndOfScans="3370" ActualExecutions="3556" />
</RunTimeInformation>
<IndexScan Ordered="true" ScanDirection="FORWARD" ForcedIndex="false" ForceSeek="false" ForceScan="false" NoExpandHint="false" Storage="RowStore">
<DefinedValues>
<DefinedValue>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBAccountParticipant]" Alias="[ap]" Column="strAccountCode" />
</DefinedValue>
</DefinedValues>
<Object Database="[TableBackups]" Schema="[dbo]" Table="[tblBAccountParticipant]" Index="[PK_tblBAccountParticipants]" Alias="[ap]" IndexKind="NonClustered" />
<SeekPredicates>
<SeekPredicateNew>
<SeekKeys>
<Prefix ScanType="EQ">
<RangeColumns>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBAccountParticipant]" Alias="[ap]" Column="lngParticipantID" />
</RangeColumns>
<RangeExpressions>
<ScalarOperator ScalarString="[Bocss2].[dbo].[tblBOrder].[lngAccountParticipantID] as [o].[lngAccountParticipantID]">
<Identifier>
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="lngAccountParticipantID" />
</Identifier>
</ScalarOperator>
</RangeExpressions>
</Prefix>
</SeekKeys>
</SeekPredicateNew>
</SeekPredicates>
</IndexScan>
</RelOp>
</NestedLoops>
</RelOp>
<RelOp AvgRowSize="26" EstimateCPU="0.000158256" EstimateIO="0.003125" EstimateRebinds="1.15733" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1.14194" LogicalOp="Index Seek" NodeId="26" Parallel="false" PhysicalOp="Index Seek" EstimatedTotalSubtreeCost="0.00532393" TableCardinality="48338600">
<OutputList>
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="lngPaymentID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="strBxOrderNo" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="sintPaymentTypeID" />
</OutputList>
<RunTimeInformation>
<RunTimeCountersPerThread Thread="0" ActualRows="226" ActualEndOfScans="186" ActualExecutions="186" />
</RunTimeInformation>
<IndexScan Ordered="true" ScanDirection="FORWARD" ForcedIndex="false" ForceSeek="false" ForceScan="false" NoExpandHint="false" Storage="RowStore">
<DefinedValues>
<DefinedValue>
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="lngPaymentID" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="strBxOrderNo" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="sintPaymentTypeID" />
</DefinedValue>
</DefinedValues>
<Object Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Index="[IX_tblBOrderPayment__strBxOrderNo_include_lngPaymentID_sintPaymentTypeID]" Alias="[op]" IndexKind="NonClustered" />
<SeekPredicates>
<SeekPredicateNew>
<SeekKeys>
<Prefix ScanType="EQ">
<RangeColumns>
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="strBxOrderNo" />
</RangeColumns>
<RangeExpressions>
<ScalarOperator ScalarString="[TableBackups].[dbo].[tblBOrderItemReturn].[strBxOrderNo] as [oir].[strBxOrderNo]">
<Identifier>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBOrderItemReturn]" Alias="[oir]" Column="strBxOrderNo" />
</Identifier>
</ScalarOperator>
</RangeExpressions>
</Prefix>
</SeekKeys>
</SeekPredicateNew>
</SeekPredicates>
</IndexScan>
</RelOp>
</NestedLoops>
</RelOp>
<RelOp AvgRowSize="33" EstimateCPU="0.0001581" EstimateIO="0.003125" EstimateRebinds="1.46353" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1" LogicalOp="Clustered Index Seek" NodeId="28" Parallel="false" PhysicalOp="Clustered Index Seek" EstimatedTotalSubtreeCost="0.00595367" TableCardinality="48338600">
<OutputList>
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="strCurrencyCode" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="decPaymentAmount" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="strBCCurrencyCode" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="decBCPaymentAmount" />
</OutputList>
<RunTimeInformation>
<RunTimeCountersPerThread Thread="0" ActualRows="226" ActualEndOfScans="0" ActualExecutions="226" />
</RunTimeInformation>
<IndexScan Lookup="true" Ordered="true" ScanDirection="FORWARD" ForcedIndex="false" ForceSeek="false" ForceScan="false" NoExpandHint="false" Storage="RowStore">
<DefinedValues>
<DefinedValue>
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="strCurrencyCode" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="decPaymentAmount" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="strBCCurrencyCode" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="decBCPaymentAmount" />
</DefinedValue>
</DefinedValues>
<Object Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Index="[PK_tblBPayment]" Alias="[op]" TableReferenceId="-1" IndexKind="Clustered" />
<SeekPredicates>
<SeekPredicateNew>
<SeekKeys>
<Prefix ScanType="EQ">
<RangeColumns>
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="lngPaymentID" />
</RangeColumns>
<RangeExpressions>
<ScalarOperator ScalarString="[Bocss2].[dbo].[tblBOrderPayment].[lngPaymentID] as [op].[lngPaymentID]">
<Identifier>
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="lngPaymentID" />
</Identifier>
</ScalarOperator>
</RangeExpressions>
</Prefix>
</SeekKeys>
</SeekPredicateNew>
</SeekPredicates>
</IndexScan>
</RelOp>
</NestedLoops>
</RelOp>
<RelOp AvgRowSize="9" EstimateCPU="0.0001581" EstimateIO="0.003125" EstimateRebinds="1.42343" EstimateRewinds="0.0401028" EstimatedExecutionMode="Row" EstimateRows="1" LogicalOp="Index Seek" NodeId="38" Parallel="false" PhysicalOp="Index Seek" EstimatedTotalSubtreeCost="0.00583227" TableCardinality="165968000">
<OutputList />
<RunTimeInformation>
<RunTimeCountersPerThread Thread="0" ActualRows="226" ActualEndOfScans="0" ActualExecutions="226" />
</RunTimeInformation>
<IndexScan Ordered="true" ScanDirection="FORWARD" ForcedIndex="false" ForceSeek="false" ForceScan="false" NoExpandHint="false" Storage="RowStore">
<DefinedValues />
<Object Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderItem]" Index="[IX_tblBOrderItem__strBxOrderNo]" Alias="[i]" IndexKind="NonClustered" />
<SeekPredicates>
<SeekPredicateNew>
<SeekKeys>
<Prefix ScanType="EQ">
<RangeColumns>
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderItem]" Alias="[i]" Column="strBxOrderNo" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderItem]" Alias="[i]" Column="sintOrderSeqNo" />
</RangeColumns>
<RangeExpressions>
<ScalarOperator ScalarString="[TableBackups].[dbo].[tblBOrderItemReturn].[strBxOrderNo] as [oir].[strBxOrderNo]">
<Identifier>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBOrderItemReturn]" Alias="[oir]" Column="strBxOrderNo" />
</Identifier>
</ScalarOperator>
<ScalarOperator ScalarString="[TableBackups].[dbo].[tblBOrderItemReturn].[sintOrderSeqNo] as [oir].[sintOrderSeqNo]">
<Identifier>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBOrderItemReturn]" Alias="[oir]" Column="sintOrderSeqNo" />
</Identifier>
</ScalarOperator>
</RangeExpressions>
</Prefix>
</SeekKeys>
</SeekPredicateNew>
</SeekPredicates>
</IndexScan>
</RelOp>
</NestedLoops>
</RelOp>
<RelOp AvgRowSize="12" EstimateCPU="0.0001581" EstimateIO="0.003125" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1" LogicalOp="Clustered Index Seek" NodeId="39" Parallel="false" PhysicalOp="Clustered Index Seek" EstimatedTotalSubtreeCost="0.0032831" TableCardinality="483">
<OutputList>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBOrderPaymentGiftVoucher]" Alias="[opgv]" Column="lngPaymentID" />
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBOrderPaymentGiftVoucher]" Alias="[opgv]" Column="strVoucherNumber" />
</OutputList>
<RunTimeInformation>
<RunTimeCountersPerThread Thread="0" ActualRows="0" ActualEndOfScans="226" ActualExecutions="226" />
</RunTimeInformation>
<IndexScan Ordered="true" ScanDirection="FORWARD" ForcedIndex="false" ForceSeek="false" ForceScan="false" NoExpandHint="false" Storage="RowStore">
<DefinedValues>
<DefinedValue>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBOrderPaymentGiftVoucher]" Alias="[opgv]" Column="lngPaymentID" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBOrderPaymentGiftVoucher]" Alias="[opgv]" Column="strVoucherNumber" />
</DefinedValue>
</DefinedValues>
<Object Database="[TableBackups]" Schema="[dbo]" Table="[tblBOrderPaymentGiftVoucher]" Index="[PK_tblBOrderPaymentGiftVoucher]" Alias="[opgv]" IndexKind="Clustered" />
<SeekPredicates>
<SeekPredicateNew>
<SeekKeys>
<Prefix ScanType="EQ">
<RangeColumns>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBOrderPaymentGiftVoucher]" Alias="[opgv]" Column="lngPaymentID" />
</RangeColumns>
<RangeExpressions>
<ScalarOperator ScalarString="[Bocss2].[dbo].[tblBOrderPayment].[lngPaymentID] as [op].[lngPaymentID]">
<Identifier>
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="lngPaymentID" />
</Identifier>
</ScalarOperator>
</RangeExpressions>
</Prefix>
</SeekKeys>
</SeekPredicateNew>
</SeekPredicates>
</IndexScan>
</RelOp>
</NestedLoops>
</RelOp>
<RelOp AvgRowSize="22" EstimateCPU="0.0001581" EstimateIO="0.003125" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1" LogicalOp="Index Seek" NodeId="40" Parallel="false" PhysicalOp="Index Seek" EstimatedTotalSubtreeCost="0.0032831" TableCardinality="12679300">
<OutputList>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBGiftVoucher]" Alias="[gv]" Column="strIssuedBxOrderNo" />
</OutputList>
<RunTimeInformation>
<RunTimeCountersPerThread Thread="0" ActualRows="0" ActualEndOfScans="226" ActualExecutions="226" />
</RunTimeInformation>
<IndexScan Ordered="true" ScanDirection="FORWARD" ForcedIndex="false" ForceSeek="false" ForceScan="false" NoExpandHint="false" Storage="RowStore">
<DefinedValues>
<DefinedValue>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBGiftVoucher]" Alias="[gv]" Column="strIssuedBxOrderNo" />
</DefinedValue>
</DefinedValues>
<Object Database="[TableBackups]" Schema="[dbo]" Table="[tblBGiftVoucher]" Index="[IDX_tblBGiftVoucher_strVoucherNumber_INCL]" Alias="[gv]" IndexKind="NonClustered" />
<SeekPredicates>
<SeekPredicateNew>
<SeekKeys>
<Prefix ScanType="EQ">
<RangeColumns>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBGiftVoucher]" Alias="[gv]" Column="strVoucherNumber" />
</RangeColumns>
<RangeExpressions>
<ScalarOperator ScalarString="[TableBackups].[dbo].[tblBOrderPaymentGiftVoucher].[strVoucherNumber] as [opgv].[strVoucherNumber]">
<Identifier>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBOrderPaymentGiftVoucher]" Alias="[opgv]" Column="strVoucherNumber" />
</Identifier>
</ScalarOperator>
</RangeExpressions>
</Prefix>
</SeekKeys>
</SeekPredicateNew>
</SeekPredicates>
</IndexScan>
</RelOp>
</NestedLoops>
</RelOp>
<RelOp AvgRowSize="22" EstimateCPU="0.0001581" EstimateIO="0.003125" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1" LogicalOp="Clustered Index Seek" NodeId="41" Parallel="false" PhysicalOp="Clustered Index Seek" EstimatedTotalSubtreeCost="0.0032831" TableCardinality="845">
<OutputList>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBGiftVoucherPromotion]" Alias="[gvp]" Column="strIssuedBxOrderNo" />
</OutputList>
<RunTimeInformation>
<RunTimeCountersPerThread Thread="0" ActualRows="0" ActualEndOfScans="226" ActualExecutions="226" />
</RunTimeInformation>
<IndexScan Ordered="true" ScanDirection="FORWARD" ForcedIndex="false" ForceSeek="false" ForceScan="false" NoExpandHint="false" Storage="RowStore">
<DefinedValues>
<DefinedValue>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBGiftVoucherPromotion]" Alias="[gvp]" Column="strIssuedBxOrderNo" />
</DefinedValue>
</DefinedValues>
<Object Database="[TableBackups]" Schema="[dbo]" Table="[tblBGiftVoucherPromotion]" Index="[PK_tblBGiftVoucherPromotion]" Alias="[gvp]" IndexKind="Clustered" />
<SeekPredicates>
<SeekPredicateNew>
<SeekKeys>
<Prefix ScanType="EQ">
<RangeColumns>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBGiftVoucherPromotion]" Alias="[gvp]" Column="strIssuedBxOrderNo" />
</RangeColumns>
<RangeExpressions>
<ScalarOperator ScalarString="[TableBackups].[dbo].[tblBGiftVoucher].[strIssuedBxOrderNo] as [gv].[strIssuedBxOrderNo]">
<Identifier>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBGiftVoucher]" Alias="[gv]" Column="strIssuedBxOrderNo" />
</Identifier>
</ScalarOperator>
</RangeExpressions>
</Prefix>
</SeekKeys>
</SeekPredicateNew>
</SeekPredicates>
</IndexScan>
</RelOp>
</NestedLoops>
</RelOp>
</ComputeScalar>
</RelOp>
<ParameterList>
<ColumnReference Column="@OrderStartDate" ParameterRuntimeValue="'2015-02-15 00:00:00.000'" />
</ParameterList>
</QueryPlan>
</StmtSimple>
</Statements>
</Batch>
</BatchSequence>
</ShowPlanXML>
<?xml version="1.0" encoding="utf-16"?>
<ShowPlanXML xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Version="1.2" Build="11.0.3412.0" xmlns="http://schemas.microsoft.com/sqlserver/2004/07/showplan">
<BatchSequence>
<Batch>
<Statements>
<StmtSimple StatementCompId="6" StatementEstRows="318.556" StatementId="1" StatementOptmLevel="FULL" StatementOptmEarlyAbortReason="TimeOut" StatementSubTreeCost="5.13159" StatementText="SELECT &#xD;&#xA; op.lngPaymentID&#xD;&#xA; ,op.strBxOrderNo&#xD;&#xA; ,op.sintPaymentTypeID&#xD;&#xA; ,op.strCurrencyCode&#xD;&#xA; ,op.strBCCurrencyCode&#xD;&#xA; ,op.decPaymentAmount&#xD;&#xA; ,op.decBCPaymentAmount&#xD;&#xA; ,ap.strAccountCode&#xD;&#xA; ,o.sintMarketID&#xD;&#xA; ,o.sintOrderChannelID&#xD;&#xA; ,o.sintOrderTypeID&#xD;&#xA; ,CASE WHEN opgv.lngpaymentID IS NULL &#xD;&#xA; THEN NULL -- Not a Voucher = Null&#xD;&#xA; WHEN gvp.strIssuedBxOrderNo IS NULL &#xD;&#xA; THEN 0 ELSE 1 END AS [IsPromoVoucher] &#xD;&#xA; -- Is a Voucher - check type&#xD;&#xA; ,o.sdtmOrdCreated&#xD;&#xA;&#xD;&#xA; FROM TABLEBACKUPS.dbo.tblBReturnHistory rh&#xD;&#xA;&#xD;&#xA; INNER JOIN TABLEBACKUPS.dbo.tblBReturn r &#xD;&#xA; ON r.sintReturnId = rh.sintReturnId &#xD;&#xA; AND r.strBxOrderNo = rh.strBxOrderNo&#xD;&#xA;&#xD;&#xA; INNER JOIN bocss2.dbo.tblBOrder o &#xD;&#xA; ON o.strBxOrderNo = r.strBxOrderNo&#xD;&#xA; AND o.sdtmOrdCreated &gt;= @OrderStartDate&#xD;&#xA;&#xD;&#xA; INNER JOIN Bocss2.dbo.tblBOrderPayment op &#xD;&#xA; ON op.strBxOrderNo = o.strBxOrderNo&#xD;&#xA;&#xD;&#xA; INNER JOIN TABLEBACKUPS.dbo.tblBOrderItemReturn AS oir &#xD;&#xA; ON r.sintReturnId = oir.sintReturnID &#xD;&#xA; AND r.strBxOrderNo = oir.strBxOrderNo&#xD;&#xA; AND oir.decReturnFinalAmount &gt; 0&#xD;&#xA;&#xD;&#xA; INNER JOIN Bocss2.dbo.tblBOrderItem AS i &#xD;&#xA; ON i.strBxOrderNo = oir.strBxOrderNo &#xD;&#xA; AND i.sintOrderSeqNo = oir.sintOrderSeqNo&#xD;&#xA;&#xD;&#xA; INNER JOIN TABLEBACKUPS.dbo.tblBAccountParticipant ap &#xD;&#xA; ON o.lngAccountParticipantID = ap.lngParticipantID&#xD;&#xA;&#xD;&#xA; LEFT OUTER JOIN TABLEBACKUPS.dbo.tblBOrderPaymentGiftVoucher opgv &#xD;&#xA; ON op.lngPaymentID = opgv.lngPaymentID&#xD;&#xA;&#xD;&#xA; LEFT OUTER JOIN TABLEBACKUPS.dbo.tblBGiftVoucher gv &#xD;&#xA; ON opgv.strVoucherNumber = gv.strVoucherNumber&#xD;&#xA;&#xD;&#xA; LEFT OUTER JOIN TABLEBACKUPS.dbo.tblBGiftVoucherPromotion gvp &#xD;&#xA; ON gvp.strIssuedBxOrderNo = gv.strIssuedBxOrderNo&#xD;&#xA; &#xD;&#xA; WHERE rh.sintReturnStatusId in ( 3 )&#xD;&#xA; AND rh.dtmAdded &gt;= @OrderStartDate&#xD;&#xA; AND rh.dtmAdded &lt; @OrderEndDate&#xD;&#xA;&#xD;&#xA;" StatementType="SELECT" QueryHash="0x5C1941BE38B9F828" QueryPlanHash="0xA5813A5680261E75" RetrievedFromCache="true">
<StatementSetOptions ANSI_NULLS="true" ANSI_PADDING="true" ANSI_WARNINGS="true" ARITHABORT="true" CONCAT_NULL_YIELDS_NULL="true" NUMERIC_ROUNDABORT="false" QUOTED_IDENTIFIER="true" />
<QueryPlan DegreeOfParallelism="1" MemoryGrant="7392" CachedPlanSize="264" CompileTime="830" CompileCPU="341" CompileMemory="4680">
<MemoryGrantInfo SerialRequiredMemory="6144" SerialDesiredMemory="7392" RequiredMemory="6144" DesiredMemory="7392" RequestedMemory="7392" GrantWaitTime="0" GrantedMemory="7392" MaxUsedMemory="1728" />
<OptimizerHardwareDependentProperties EstimatedAvailableMemoryGrant="218453" EstimatedPagesCached="327680" EstimatedAvailableDegreeOfParallelism="8" />
<RelOp AvgRowSize="77" EstimateCPU="3.18556E-05" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="318.556" LogicalOp="Compute Scalar" NodeId="0" Parallel="false" PhysicalOp="Compute Scalar" EstimatedTotalSubtreeCost="5.13159">
<OutputList>
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sintOrderChannelID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sintOrderTypeID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sdtmOrdCreated" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sintMarketID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="lngPaymentID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="strBxOrderNo" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="sintPaymentTypeID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="strCurrencyCode" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="decPaymentAmount" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="strBCCurrencyCode" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="decBCPaymentAmount" />
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBAccountParticipant]" Alias="[ap]" Column="strAccountCode" />
<ColumnReference Column="Expr1021" />
</OutputList>
<ComputeScalar>
<DefinedValues>
<DefinedValue>
<ColumnReference Column="Expr1021" />
<ScalarOperator ScalarString="CASE WHEN [TableBackups].[dbo].[tblBOrderPaymentGiftVoucher].[lngPaymentID] as [opgv].[lngPaymentID] IS NULL THEN NULL ELSE CASE WHEN [TableBackups].[dbo].[tblBGiftVoucherPromotion].[strIssuedBxOrderNo] as [gvp].[strIssuedBxOrderNo] IS NULL THEN (0) ELSE (1) END END">
<IF>
<Condition>
<ScalarOperator>
<Compare CompareOp="IS">
<ScalarOperator>
<Identifier>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBOrderPaymentGiftVoucher]" Alias="[opgv]" Column="lngPaymentID" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Const ConstValue="NULL" />
</ScalarOperator>
</Compare>
</ScalarOperator>
</Condition>
<Then>
<ScalarOperator>
<Const ConstValue="NULL" />
</ScalarOperator>
</Then>
<Else>
<ScalarOperator>
<IF>
<Condition>
<ScalarOperator>
<Compare CompareOp="IS">
<ScalarOperator>
<Identifier>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBGiftVoucherPromotion]" Alias="[gvp]" Column="strIssuedBxOrderNo" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Const ConstValue="NULL" />
</ScalarOperator>
</Compare>
</ScalarOperator>
</Condition>
<Then>
<ScalarOperator>
<Const ConstValue="(0)" />
</ScalarOperator>
</Then>
<Else>
<ScalarOperator>
<Const ConstValue="(1)" />
</ScalarOperator>
</Else>
</IF>
</ScalarOperator>
</Else>
</IF>
</ScalarOperator>
</DefinedValue>
</DefinedValues>
<RelOp AvgRowSize="90" EstimateCPU="0.0364891" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="318.556" LogicalOp="Right Outer Join" NodeId="1" Parallel="false" PhysicalOp="Hash Match" EstimatedTotalSubtreeCost="5.13156">
<OutputList>
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sintOrderChannelID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sintOrderTypeID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sdtmOrdCreated" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sintMarketID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="lngPaymentID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="strBxOrderNo" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="sintPaymentTypeID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="strCurrencyCode" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="decPaymentAmount" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="strBCCurrencyCode" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="decBCPaymentAmount" />
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBAccountParticipant]" Alias="[ap]" Column="strAccountCode" />
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBOrderPaymentGiftVoucher]" Alias="[opgv]" Column="lngPaymentID" />
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBGiftVoucherPromotion]" Alias="[gvp]" Column="strIssuedBxOrderNo" />
</OutputList>
<MemoryFractions Input="0.205128" Output="0.205128" />
<RunTimeInformation>
<RunTimeCountersPerThread Thread="0" ActualRows="226" ActualEndOfScans="1" ActualExecutions="1" />
</RunTimeInformation>
<Hash>
<DefinedValues />
<HashKeysBuild>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBGiftVoucherPromotion]" Alias="[gvp]" Column="strIssuedBxOrderNo" />
</HashKeysBuild>
<HashKeysProbe>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBGiftVoucher]" Alias="[gv]" Column="strIssuedBxOrderNo" />
</HashKeysProbe>
<ProbeResidual>
<ScalarOperator ScalarString="[TableBackups].[dbo].[tblBGiftVoucherPromotion].[strIssuedBxOrderNo] as [gvp].[strIssuedBxOrderNo]=[TableBackups].[dbo].[tblBGiftVoucher].[strIssuedBxOrderNo] as [gv].[strIssuedBxOrderNo]">
<Compare CompareOp="EQ">
<ScalarOperator>
<Identifier>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBGiftVoucherPromotion]" Alias="[gvp]" Column="strIssuedBxOrderNo" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Identifier>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBGiftVoucher]" Alias="[gv]" Column="strIssuedBxOrderNo" />
</Identifier>
</ScalarOperator>
</Compare>
</ScalarOperator>
</ProbeResidual>
<RelOp AvgRowSize="22" EstimateCPU="0.0010865" EstimateIO="0.0209028" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="845" LogicalOp="Clustered Index Scan" NodeId="2" Parallel="false" PhysicalOp="Clustered Index Scan" EstimatedTotalSubtreeCost="0.0219893" TableCardinality="845">
<OutputList>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBGiftVoucherPromotion]" Alias="[gvp]" Column="strIssuedBxOrderNo" />
</OutputList>
<RunTimeInformation>
<RunTimeCountersPerThread Thread="0" ActualRows="845" ActualEndOfScans="1" ActualExecutions="1" />
</RunTimeInformation>
<IndexScan Ordered="false" ForcedIndex="false" ForceScan="false" NoExpandHint="false">
<DefinedValues>
<DefinedValue>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBGiftVoucherPromotion]" Alias="[gvp]" Column="strIssuedBxOrderNo" />
</DefinedValue>
</DefinedValues>
<Object Database="[TableBackups]" Schema="[dbo]" Table="[tblBGiftVoucherPromotion]" Index="[PK_tblBGiftVoucherPromotion]" Alias="[gvp]" IndexKind="Clustered" />
</IndexScan>
</RelOp>
<RelOp AvgRowSize="90" EstimateCPU="0.00133156" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="318.556" LogicalOp="Left Outer Join" NodeId="3" Parallel="false" PhysicalOp="Nested Loops" EstimatedTotalSubtreeCost="5.07308">
<OutputList>
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sintOrderChannelID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sintOrderTypeID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sdtmOrdCreated" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sintMarketID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="lngPaymentID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="strBxOrderNo" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="sintPaymentTypeID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="strCurrencyCode" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="decPaymentAmount" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="strBCCurrencyCode" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="decBCPaymentAmount" />
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBAccountParticipant]" Alias="[ap]" Column="strAccountCode" />
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBOrderPaymentGiftVoucher]" Alias="[opgv]" Column="lngPaymentID" />
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBGiftVoucher]" Alias="[gv]" Column="strIssuedBxOrderNo" />
</OutputList>
<RunTimeInformation>
<RunTimeCountersPerThread Thread="0" ActualRows="226" ActualEndOfScans="1" ActualExecutions="1" />
</RunTimeInformation>
<NestedLoops Optimized="true" WithUnorderedPrefetch="true">
<OuterReferences>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBOrderPaymentGiftVoucher]" Alias="[opgv]" Column="strVoucherNumber" />
<ColumnReference Column="Expr1035" />
</OuterReferences>
<RelOp AvgRowSize="78" EstimateCPU="0.0241607" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="318.556" LogicalOp="Right Outer Join" NodeId="6" Parallel="false" PhysicalOp="Hash Match" EstimatedTotalSubtreeCost="4.83192">
<OutputList>
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sintOrderChannelID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sintOrderTypeID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sdtmOrdCreated" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sintMarketID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="lngPaymentID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="strBxOrderNo" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="sintPaymentTypeID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="strCurrencyCode" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="decPaymentAmount" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="strBCCurrencyCode" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="decBCPaymentAmount" />
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBAccountParticipant]" Alias="[ap]" Column="strAccountCode" />
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBOrderPaymentGiftVoucher]" Alias="[opgv]" Column="lngPaymentID" />
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBOrderPaymentGiftVoucher]" Alias="[opgv]" Column="strVoucherNumber" />
</OutputList>
<MemoryFractions Input="0.141941" Output="0.128205" />
<RunTimeInformation>
<RunTimeCountersPerThread Thread="0" ActualRows="226" ActualEndOfScans="1" ActualExecutions="1" />
</RunTimeInformation>
<Hash>
<DefinedValues />
<HashKeysBuild>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBOrderPaymentGiftVoucher]" Alias="[opgv]" Column="lngPaymentID" />
</HashKeysBuild>
<HashKeysProbe>
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="lngPaymentID" />
</HashKeysProbe>
<RelOp AvgRowSize="12" EstimateCPU="0.0006883" EstimateIO="0.00386574" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="483" LogicalOp="Clustered Index Scan" NodeId="7" Parallel="false" PhysicalOp="Clustered Index Scan" EstimatedTotalSubtreeCost="0.00455404" TableCardinality="483">
<OutputList>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBOrderPaymentGiftVoucher]" Alias="[opgv]" Column="lngPaymentID" />
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBOrderPaymentGiftVoucher]" Alias="[opgv]" Column="strVoucherNumber" />
</OutputList>
<RunTimeInformation>
<RunTimeCountersPerThread Thread="0" ActualRows="483" ActualEndOfScans="1" ActualExecutions="1" />
</RunTimeInformation>
<IndexScan Ordered="false" ForcedIndex="false" ForceScan="false" NoExpandHint="false">
<DefinedValues>
<DefinedValue>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBOrderPaymentGiftVoucher]" Alias="[opgv]" Column="lngPaymentID" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBOrderPaymentGiftVoucher]" Alias="[opgv]" Column="strVoucherNumber" />
</DefinedValue>
</DefinedValues>
<Object Database="[TableBackups]" Schema="[dbo]" Table="[tblBOrderPaymentGiftVoucher]" Index="[PK_tblBOrderPaymentGiftVoucher]" Alias="[opgv]" IndexKind="Clustered" />
</IndexScan>
</RelOp>
<RelOp AvgRowSize="73" EstimateCPU="0.00176202" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="318.556" LogicalOp="Inner Join" NodeId="8" Parallel="false" PhysicalOp="Nested Loops" EstimatedTotalSubtreeCost="4.8032">
<OutputList>
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sintOrderChannelID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sintOrderTypeID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sdtmOrdCreated" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sintMarketID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="lngPaymentID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="strBxOrderNo" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="sintPaymentTypeID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="strCurrencyCode" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="decPaymentAmount" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="strBCCurrencyCode" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="decBCPaymentAmount" />
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBAccountParticipant]" Alias="[ap]" Column="strAccountCode" />
</OutputList>
<RunTimeInformation>
<RunTimeCountersPerThread Thread="0" ActualRows="226" ActualEndOfScans="1" ActualExecutions="1" />
</RunTimeInformation>
<NestedLoops Optimized="true" WithUnorderedPrefetch="true">
<OuterReferences>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBOrderItemReturn]" Alias="[oir]" Column="strBxOrderNo" />
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBOrderItemReturn]" Alias="[oir]" Column="sintOrderSeqNo" />
<ColumnReference Column="Expr1034" />
</OuterReferences>
<RelOp AvgRowSize="86" EstimateCPU="0.00176202" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="421.537" LogicalOp="Inner Join" NodeId="11" Parallel="false" PhysicalOp="Nested Loops" EstimatedTotalSubtreeCost="3.42136">
<OutputList>
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sintOrderChannelID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sintOrderTypeID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sdtmOrdCreated" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sintMarketID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="lngPaymentID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="strBxOrderNo" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="sintPaymentTypeID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="strCurrencyCode" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="decPaymentAmount" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="strBCCurrencyCode" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="decBCPaymentAmount" />
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBOrderItemReturn]" Alias="[oir]" Column="strBxOrderNo" />
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBOrderItemReturn]" Alias="[oir]" Column="sintOrderSeqNo" />
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBAccountParticipant]" Alias="[ap]" Column="strAccountCode" />
</OutputList>
<RunTimeInformation>
<RunTimeCountersPerThread Thread="0" ActualRows="226" ActualEndOfScans="1" ActualExecutions="1" />
</RunTimeInformation>
<NestedLoops Optimized="true" WithUnorderedPrefetch="true">
<OuterReferences>
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="lngPaymentID" />
<ColumnReference Column="Expr1033" />
</OuterReferences>
<RelOp AvgRowSize="62" EstimateCPU="0.00176202" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="421.537" LogicalOp="Inner Join" NodeId="14" Parallel="false" PhysicalOp="Nested Loops" EstimatedTotalSubtreeCost="3.34386">
<OutputList>
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sintOrderChannelID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sintOrderTypeID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sdtmOrdCreated" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sintMarketID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="lngPaymentID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="strBxOrderNo" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrderPayment]" Alias="[op]" Column="sintPaymentTypeID" />
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBOrderItemReturn]" Alias="[oir]" Column="strBxOrderNo" />
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBOrderItemReturn]" Alias="[oir]" Column="sintOrderSeqNo" />
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBAccountParticipant]" Alias="[ap]" Column="strAccountCode" />
</OutputList>
<RunTimeInformation>
<RunTimeCountersPerThread Thread="0" ActualRows="226" ActualEndOfScans="1" ActualExecutions="1" />
</RunTimeInformation>
<NestedLoops Optimized="true" WithUnorderedPrefetch="true">
<OuterReferences>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBOrderItemReturn]" Alias="[oir]" Column="strBxOrderNo" />
<ColumnReference Column="Expr1032" />
</OuterReferences>
<RelOp AvgRowSize="44" EstimateCPU="0.0703565" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="379.668" LogicalOp="Inner Join" NodeId="17" Parallel="false" PhysicalOp="Hash Match" EstimatedTotalSubtreeCost="2.10044">
<OutputList>
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sintOrderChannelID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sintOrderTypeID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sdtmOrdCreated" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sintMarketID" />
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBOrderItemReturn]" Alias="[oir]" Column="strBxOrderNo" />
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBOrderItemReturn]" Alias="[oir]" Column="sintOrderSeqNo" />
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBAccountParticipant]" Alias="[ap]" Column="strAccountCode" />
</OutputList>
<MemoryFractions Input="0.439472" Output="0.333333" />
<RunTimeInformation>
<RunTimeCountersPerThread Thread="0" ActualRows="186" ActualEndOfScans="1" ActualExecutions="1" />
</RunTimeInformation>
<Hash>
<DefinedValues />
<HashKeysBuild>
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="lngAccountParticipantID" />
</HashKeysBuild>
<HashKeysProbe>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBAccountParticipant]" Alias="[ap]" Column="lngParticipantID" />
</HashKeysProbe>
<RelOp AvgRowSize="36" EstimateCPU="0.00159147" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="380.732" LogicalOp="Inner Join" NodeId="18" Parallel="false" PhysicalOp="Nested Loops" EstimatedTotalSubtreeCost="1.99467">
<OutputList>
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sintOrderChannelID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sintOrderTypeID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sdtmOrdCreated" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sintMarketID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="lngAccountParticipantID" />
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBOrderItemReturn]" Alias="[oir]" Column="strBxOrderNo" />
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBOrderItemReturn]" Alias="[oir]" Column="sintOrderSeqNo" />
</OutputList>
<RunTimeInformation>
<RunTimeCountersPerThread Thread="0" ActualRows="3556" ActualEndOfScans="1" ActualExecutions="1" />
</RunTimeInformation>
<NestedLoops Optimized="false">
<OuterReferences>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBOrderItemReturn]" Alias="[oir]" Column="strBxOrderNo" />
</OuterReferences>
<RelOp AvgRowSize="22" EstimateCPU="0.00159147" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="380.736" LogicalOp="Inner Join" NodeId="19" Parallel="false" PhysicalOp="Nested Loops" EstimatedTotalSubtreeCost="0.746686">
<OutputList>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBOrderItemReturn]" Alias="[oir]" Column="strBxOrderNo" />
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBOrderItemReturn]" Alias="[oir]" Column="sintOrderSeqNo" />
</OutputList>
<RunTimeInformation>
<RunTimeCountersPerThread Thread="0" ActualRows="3557" ActualEndOfScans="1" ActualExecutions="1" />
</RunTimeInformation>
<NestedLoops Optimized="false" WithUnorderedPrefetch="true">
<OuterReferences>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBReturn]" Alias="[r]" Column="strBxOrderNo" />
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBReturn]" Alias="[r]" Column="sintReturnId" />
<ColumnReference Column="Expr1028" />
</OuterReferences>
<RelOp AvgRowSize="22" EstimateCPU="0.0695829" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="175.59" LogicalOp="Inner Join" NodeId="21" Parallel="false" PhysicalOp="Hash Match" EstimatedTotalSubtreeCost="0.208104">
<OutputList>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBReturn]" Alias="[r]" Column="strBxOrderNo" />
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBReturn]" Alias="[r]" Column="sintReturnId" />
</OutputList>
<MemoryFractions Input="0.65293" Output="0.213458" />
<RunTimeInformation>
<RunTimeCountersPerThread Thread="0" ActualRows="1951" ActualEndOfScans="1" ActualExecutions="1" />
</RunTimeInformation>
<Hash>
<DefinedValues />
<HashKeysBuild>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBReturnHistory]" Alias="[rh]" Column="strBxOrderNo" />
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBReturnHistory]" Alias="[rh]" Column="sintReturnId" />
</HashKeysBuild>
<HashKeysProbe>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBReturn]" Alias="[r]" Column="strBxOrderNo" />
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBReturn]" Alias="[r]" Column="sintReturnId" />
</HashKeysProbe>
<ProbeResidual>
<ScalarOperator ScalarString="[TableBackups].[dbo].[tblBReturn].[strBxOrderNo] as [r].[strBxOrderNo]=[TableBackups].[dbo].[tblBReturnHistory].[strBxOrderNo] as [rh].[strBxOrderNo] AND [TableBackups].[dbo].[tblBReturn].[sintReturnId] as [r].[sintReturnId]=[TableBackups].[dbo].[tblBReturnHistory].[sintReturnId] as [rh].[sintReturnId]">
<Logical Operation="AND">
<ScalarOperator>
<Compare CompareOp="EQ">
<ScalarOperator>
<Identifier>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBReturn]" Alias="[r]" Column="strBxOrderNo" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Identifier>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBReturnHistory]" Alias="[rh]" Column="strBxOrderNo" />
</Identifier>
</ScalarOperator>
</Compare>
</ScalarOperator>
<ScalarOperator>
<Compare CompareOp="EQ">
<ScalarOperator>
<Identifier>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBReturn]" Alias="[r]" Column="sintReturnId" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Identifier>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBReturnHistory]" Alias="[rh]" Column="sintReturnId" />
</Identifier>
</ScalarOperator>
</Compare>
</ScalarOperator>
</Logical>
</ScalarOperator>
</ProbeResidual>
<RelOp AvgRowSize="23" EstimateCPU="0.000350149" EstimateIO="0.003125" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="175.59" LogicalOp="Index Seek" NodeId="22" Parallel="false" PhysicalOp="Index Seek" EstimatedTotalSubtreeCost="0.00347515" TableCardinality="1951">
<OutputList>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBReturnHistory]" Alias="[rh]" Column="strBxOrderNo" />
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBReturnHistory]" Alias="[rh]" Column="sintReturnId" />
</OutputList>
<RunTimeInformation>
<RunTimeCountersPerThread Thread="0" ActualRows="1951" ActualEndOfScans="1" ActualExecutions="1" />
</RunTimeInformation>
<IndexScan Ordered="true" ScanDirection="FORWARD" ForcedIndex="false" ForceSeek="false" ForceScan="false" NoExpandHint="false" Storage="RowStore">
<DefinedValues>
<DefinedValue>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBReturnHistory]" Alias="[rh]" Column="strBxOrderNo" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBReturnHistory]" Alias="[rh]" Column="sintReturnId" />
</DefinedValue>
</DefinedValues>
<Object Database="[TableBackups]" Schema="[dbo]" Table="[tblBReturnHistory]" Index="[IX_tblBReturnHistory__sintReturnStatusId_dtmAdded]" Alias="[rh]" IndexKind="NonClustered" />
<SeekPredicates>
<SeekPredicateNew>
<SeekKeys>
<Prefix ScanType="EQ">
<RangeColumns>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBReturnHistory]" Alias="[rh]" Column="sintReturnStatusId" />
</RangeColumns>
<RangeExpressions>
<ScalarOperator ScalarString="(3)">
<Const ConstValue="(3)" />
</ScalarOperator>
</RangeExpressions>
</Prefix>
<StartRange ScanType="GE">
<RangeColumns>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBReturnHistory]" Alias="[rh]" Column="dtmAdded" />
</RangeColumns>
<RangeExpressions>
<ScalarOperator ScalarString="[@OrderStartDate]">
<Identifier>
<ColumnReference Column="@OrderStartDate" />
</Identifier>
</ScalarOperator>
</RangeExpressions>
</StartRange>
<EndRange ScanType="LT">
<RangeColumns>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBReturnHistory]" Alias="[rh]" Column="dtmAdded" />
</RangeColumns>
<RangeExpressions>
<ScalarOperator ScalarString="[@OrderEndDate]">
<Identifier>
<ColumnReference Column="@OrderEndDate" />
</Identifier>
</ScalarOperator>
</RangeExpressions>
</EndRange>
</SeekKeys>
</SeekPredicateNew>
</SeekPredicates>
</IndexScan>
</RelOp>
<RelOp AvgRowSize="22" EstimateCPU="0.0082101" EstimateIO="0.126829" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="7321" LogicalOp="Clustered Index Scan" NodeId="23" Parallel="false" PhysicalOp="Clustered Index Scan" EstimatedTotalSubtreeCost="0.135039" TableCardinality="7321">
<OutputList>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBReturn]" Alias="[r]" Column="strBxOrderNo" />
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBReturn]" Alias="[r]" Column="sintReturnId" />
</OutputList>
<RunTimeInformation>
<RunTimeCountersPerThread Thread="0" ActualRows="7321" ActualEndOfScans="1" ActualExecutions="1" />
</RunTimeInformation>
<IndexScan Ordered="false" ForcedIndex="false" ForceScan="false" NoExpandHint="false">
<DefinedValues>
<DefinedValue>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBReturn]" Alias="[r]" Column="strBxOrderNo" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBReturn]" Alias="[r]" Column="sintReturnId" />
</DefinedValue>
</DefinedValues>
<Object Database="[TableBackups]" Schema="[dbo]" Table="[tblBReturn]" Index="[PK_tblBReturn]" Alias="[r]" IndexKind="Clustered" />
</IndexScan>
</RelOp>
</Hash>
</RelOp>
<RelOp AvgRowSize="22" EstimateCPU="0.000159385" EstimateIO="0.003125" EstimateRebinds="174.59" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="2.16832" LogicalOp="Index Seek" NodeId="25" Parallel="false" PhysicalOp="Index Seek" EstimatedTotalSubtreeCost="0.53699" TableCardinality="913823">
<OutputList>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBOrderItemReturn]" Alias="[oir]" Column="strBxOrderNo" />
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBOrderItemReturn]" Alias="[oir]" Column="sintOrderSeqNo" />
</OutputList>
<RunTimeInformation>
<RunTimeCountersPerThread Thread="0" ActualRows="3557" ActualEndOfScans="1951" ActualExecutions="1951" />
</RunTimeInformation>
<IndexScan Ordered="true" ScanDirection="FORWARD" ForcedIndex="false" ForceSeek="false" ForceScan="false" NoExpandHint="false" Storage="RowStore">
<DefinedValues>
<DefinedValue>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBOrderItemReturn]" Alias="[oir]" Column="strBxOrderNo" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBOrderItemReturn]" Alias="[oir]" Column="sintOrderSeqNo" />
</DefinedValue>
</DefinedValues>
<Object Database="[TableBackups]" Schema="[dbo]" Table="[tblBOrderItemReturn]" Index="[IX_tblBOrderItemReturn_fil_decReturnFinalAmount]" Filtered="true" Alias="[oir]" IndexKind="NonClustered" />
<SeekPredicates>
<SeekPredicateNew>
<SeekKeys>
<Prefix ScanType="EQ">
<RangeColumns>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBOrderItemReturn]" Alias="[oir]" Column="strBxOrderNo" />
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBOrderItemReturn]" Alias="[oir]" Column="sintReturnID" />
</RangeColumns>
<RangeExpressions>
<ScalarOperator ScalarString="[TableBackups].[dbo].[tblBReturn].[strBxOrderNo] as [r].[strBxOrderNo]">
<Identifier>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBReturn]" Alias="[r]" Column="strBxOrderNo" />
</Identifier>
</ScalarOperator>
<ScalarOperator ScalarString="[TableBackups].[dbo].[tblBReturn].[sintReturnId] as [r].[sintReturnId]">
<Identifier>
<ColumnReference Database="[TableBackups]" Schema="[dbo]" Table="[tblBReturn]" Alias="[r]" Column="sintReturnId" />
</Identifier>
</ScalarOperator>
</RangeExpressions>
</Prefix>
</SeekKeys>
</SeekPredicateNew>
</SeekPredicates>
</IndexScan>
</RelOp>
</NestedLoops>
</RelOp>
<RelOp AvgRowSize="21" EstimateCPU="0.0001581" EstimateIO="0.003125" EstimateRebinds="379.736" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1" LogicalOp="Inner Join" NodeId="26" Parallel="false" PhysicalOp="Nested Loops" EstimatedTotalSubtreeCost="1.24639" TableCardinality="42528500">
<OutputList>
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sintOrderChannelID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sintOrderTypeID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sdtmOrdCreated" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="sintMarketID" />
<ColumnReference Database="[Bocss2]" Schema="[dbo]" Table="[tblBOrder]" Alias="[o]" Column="lngAccountParticipantID" />
</OutputList>
<RunTimeInformation>
<RunTimeCountersPerThread Thread="0" ActualRows="3556" ActualEndOfScans="1" ActualExecutions="3557" />
</RunTimeInformation>
<NestedLoops Optimized="false">
<OuterReferences>
<ColumnReference Column="Expr1030" />
<ColumnReference Column="Expr1031" />
<ColumnReference Column="Expr1029" />
</OuterReferences>
<RelOp AvgRowSize="19" EstimateCPU="0" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1" LogicalOp="Compute Scalar" NodeId="27" Parallel="false" PhysicalOp="Compute Scalar" EstimatedTotalSubtreeCost="0">
<OutputList>
<ColumnReference Column="Expr1030" />
<ColumnReference Column="Expr1031" />
<ColumnReference Column="Expr1029" />
</OutputList>
<RunTimeInformation>
<RunTimeCountersPerThread Thread="0" ActualRows="3557" ActualEndOfScans="1" ActualExecutions="3557" />
</RunTimeInformation>
<ComputeScalar>
<DefinedValues>