December 8, 2014 at 1:20 pm
Here are the non-clustered indexes
CREATE NONCLUSTERED INDEX [IDX_PieceIDAccounts] ON [dbo].[ProcessPiece_Details]
(
[AccountID] ASC,
[PieceID] ASC,
[CreationMethod] ASC,
[CreatedDate] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 80) ON [INDEX]
GO
CREATE NONCLUSTERED INDEX [IDX_AccountID_Activated_eVs_IsDemo_Type_CreatedDate] ON [dbo].[ProcessPiece_Details]
(
[AccountID] ASC,
[Activated] ASC,
[eVS] ASC,
[IsDemo] ASC,
[Type] ASC,
[CreatedDate] ASC
)
INCLUDE ( [PieceID],
[ReturnAddressID],
[ProcessClass],
[Name],
[CompanyName],
[Address1],
[Address2],
[City],
[State],
[ZIP],
[EntryPoint],
[Country],
[Cost],
[UnitOfMeasureCode],
[Weight],
[Height],
[Width],
[Depth],
[ProcessingCategory],
[DestinationRateIndicator],
[Zone],
[ValueOfArticle],
[CostAmountDueShipper],
[HandlingCharge],
[SignatureWaiver],
[SurchargeType],
[SurchargeAmount],
[CreationMethod],
[ProcessingStatus],
[Booked],
[Delivered],
[SignatureFileAvailable],
[SignatureFileRequested],
[LastModified],
[RecordCaseNumber],
[Memo],
[LastProcessingEventCheck],
[EFNumber],
[PermitID],
[UnitOfMeasurement_Dimensions],
[ServiceTypeCode],
[BarcodeConstructCode],
[OD_ContainerID1],
[OD_ContainerType1],
[OD_ContainerID2],
[OD_ContainerType2],
[OD_ContainerID3],
[OD_ContainerType3],
[OD_ContentsIndicator],
[OD_MailClassEnclosed],
[ReturnAddress_CompanyName],
[ReturnAddress_Name],
[ReturnAddress_Address1],
[ReturnAddress_Address2],
[ReturnAddress_City],
[ReturnAddress_State],
[ReturnAddress_ZIP],
[IsCubic]) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 80) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_DetailCreationDate] ON [dbo].[ProcessPiece_Details]
(
[CreatedDate] ASC,
[AccountID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 80) ON [INDEX]
GO
CREATE NONCLUSTERED INDEX [IX_ProcessPeice_Details_Delivered_SignatureFileAvailable_INC_PieceID_AccountID] ON [dbo].[ProcessPiece_Details]
(
[Delivered] ASC,
[SignatureFileAvailable] ASC
)
INCLUDE ( [PieceID],
[AccountID]) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [IX_ProcessPeice_Details_LastProcessingEventCheck_INC_PieceID_Type] ON [dbo].[ProcessPiece_Details]
(
[LastProcessingEventCheck] ASC
)
INCLUDE ( [PieceID],
[Type]) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [INDEX]
GO
CREATE NONCLUSTERED INDEX [ix_ProcessPiece_Details_IsDemoCreatedDate] ON [dbo].[ProcessPiece_Details]
(
[IsDemo] ASC,
[CreatedDate] ASC
)
INCLUDE ( [PieceID]) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 80) ON [INDEX]
GO
CREATE NONCLUSTERED INDEX [IX_ProcessPiece_Details_PieceID] ON [dbo].[ProcessPiece_Details]
(
[PieceID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [INDEX]
GO
CREATE NONCLUSTERED INDEX [IX_ProcessPiece_Details_VendorPieceID] ON [dbo].[ProcessPiece_Details]
(
[VendorPieceID] ASC
)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [INDEX]
GO
December 8, 2014 at 1:21 pm
There is also one view index.
CREATE NONCLUSTERED INDEX [IDX_View_ProcessPieceDetails] ON [dbo].[ProcessPiece_Details]
(
[AccountID] ASC,
[CreatedDate] ASC,
[ServiceTypeCode] ASC
)
INCLUDE ( [PieceID],
[ReturnAddressID],
[ProcessClass],
[Name],
[CompanyName],
[Address1],
[Address2],
[City],
[State],
[ZIP],
[EntryPoint],
[Country],
[Cost],
[UnitOfMeasureCode],
[Weight],
[Height],
[Width],
[Depth],
[ProcessingCategory],
[DestinationRateIndicator],
[Zone],
[ValueOfArticle],
[CostAmountDueShipper],
[HandlingCharge],
[SignatureWaiver],
[SurchargeType],
[SurchargeAmount],
[CreationMethod],
[Activated],
[ProcessingStatus],
[Booked],
[Delivered],
[SignatureFileAvailable],
[SignatureFileRequested],
[LastModified],
[RecordCaseNumber],
[Memo],
[EFNumber],
[Type],
[ReturnAddress_CompanyName],
[ReturnAddress_Name],
[ReturnAddress_Address1],
[ReturnAddress_Address2],
[ReturnAddress_City],
[ReturnAddress_State],
[ReturnAddress_ZIP]) WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, SORT_IN_TEMPDB = OFF, IGNORE_DUP_KEY = OFF, DROP_EXISTING = OFF, ONLINE = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON, FILLFACTOR = 80) ON [PRIMARY]
GO
December 8, 2014 at 1:24 pm
December 8, 2014 at 1:34 pm
Just to elaborate on my theory (and it is just that) what I think might be going on is that the index I mention (the one with a bunch of include columns already) previously "Covered" the query. That is to say, in the internal structure of the index, when it found the row it cared about, all subsequent pieces of data that were needed for the query were built into the index; included.
An index basically holds a key and a pointer to the clustered index. So lets say you had a table with users and names, say UserID, FirstName, LastName, clustered on UserID, and an additional index on LastName. The table looks like
--Depiction of clustered index (i.e the table)
1, John, Smith
2, Abe, Lincoln,
3, Gabe, Tower
4, Barack, Obama
--Depicition of nonclustered index on LastName
Lincoln, <onRow: 2>
Obama, <onRow: 4>
Smith, <onRow: 1>
Tower <onRow:3>
If I look in the nonclustered index, I quickly find my last name; tower. But what if I need my first name? It doesnt exist anywhere in the nonclustered index. I have to see that it's on row 3, and then look on the clustered index for my first name, Gabe.
the "inclusion" of columns in a nonclustered index basically tags on additional information in the nonclustered indexes structure so that additional (and costly) operation of looking up the value from the clustered index never needs to take place.
It's possible that by adding additiona columns to your query, the nonclustered index no longer contained everything it needed to return at once and became no longer "covering". If you INCLUDE these new columns, the query may again be covered and run faster.
December 8, 2014 at 2:43 pm
Here is the execution plan
<?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.1" Build="10.50.4000.0" xmlns="http://schemas.microsoft.com/sqlserver/2004/07/showplan">
<BatchSequence>
<Batch>
<Statements>
<StmtSimple StatementCompId="9" StatementEstRows="1" StatementId="2" StatementOptmLevel="FULL" StatementOptmEarlyAbortReason="GoodEnoughPlanFound" StatementSubTreeCost="0.0132875" StatementText="INSERT INTO @IncludedIds SELECT CAST(REPLACE(Items, '''', '') AS INT) FROM dbo.FUNCT_SplitStringToTable(@AdditionalIdsToManifest,',') " StatementType="INSERT" QueryHash="0xD205F9D0ECA5530A" QueryPlanHash="0x3B1CB9CB79678FE1">
<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" CachedPlanSize="24" CompileTime="2" CompileCPU="2" CompileMemory="416">
<RelOp AvgRowSize="9" EstimateCPU="2E-06" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimateRows="1" LogicalOp="Sequence" NodeId="0" Parallel="false" PhysicalOp="Sequence" EstimatedTotalSubtreeCost="0.0132875">
<OutputList />
<RunTimeInformation>
<RunTimeCountersPerThread Thread="0" ActualRows="0" ActualEndOfScans="1" ActualExecutions="1" />
</RunTimeInformation>
<Sequence>
<RelOp AvgRowSize="9" EstimateCPU="1.157E-06" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimateRows="1" LogicalOp="Table-valued function" NodeId="1" Parallel="false" PhysicalOp="Table-valued function" EstimatedTotalSubtreeCost="1.157E-06">
<OutputList />
<RunTimeInformation>
<RunTimeCountersPerThread Thread="0" ActualRebinds="1" ActualRewinds="0" ActualRows="0" ActualEndOfScans="0" ActualExecutions="1" />
</RunTimeInformation>
<TableValuedFunction>
<DefinedValues />
<Object Database="[MainDB]" Schema="[dbo]" Table="[FUNCT_SplitStringToTable]" />
<ParameterList>
<ScalarOperator ScalarString="[@AdditionalIdsToManifest]">
<Identifier>
<ColumnReference Column="@AdditionalIdsToManifest" />
</Identifier>
</ScalarOperator>
<ScalarOperator ScalarString="','">
<Const ConstValue="','" />
</ScalarOperator>
</ParameterList>
</TableValuedFunction>
</RelOp>
<RelOp AvgRowSize="9" EstimateCPU="1E-06" EstimateIO="0.01" EstimateRebinds="0" EstimateRewinds="0" EstimateRows="1" LogicalOp="Insert" NodeId="4" Parallel="false" PhysicalOp="Table Insert" EstimatedTotalSubtreeCost="0.0132843">
<OutputList />
<RunTimeInformation>
<RunTimeCountersPerThread Thread="0" ActualRows="0" ActualEndOfScans="1" ActualExecutions="1" />
</RunTimeInformation>
<Update DMLRequestSort="false">
<Object Table="[@IncludedIds]" />
<SetPredicate>
<ScalarOperator ScalarString="[ID] = [Expr1006]">
<ScalarExpressionList>
<ScalarOperator>
<MultipleAssign>
<Assign>
<ColumnReference Column="ID" />
<ScalarOperator>
<Identifier>
<ColumnReference Column="Expr1006" />
</Identifier>
</ScalarOperator>
</Assign>
</MultipleAssign>
</ScalarOperator>
</ScalarExpressionList>
</ScalarOperator>
</SetPredicate>
<RelOp AvgRowSize="11" EstimateCPU="1E-07" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimateRows="1" LogicalOp="Compute Scalar" NodeId="5" Parallel="false" PhysicalOp="Compute Scalar" EstimatedTotalSubtreeCost="0.0032833">
<OutputList>
<ColumnReference Column="Expr1006" />
</OutputList>
<ComputeScalar>
<DefinedValues>
<DefinedValue>
<ColumnReference Column="Expr1006" />
<ScalarOperator ScalarString="CONVERT(int,replace([MainDB].[dbo].[FUNCT_SplitStringToTable].[Items],'''',CONVERT_IMPLICIT(varchar(max),'',0)),0)">
<Convert DataType="int" Style="0" Implicit="false">
<ScalarOperator>
<Intrinsic FunctionName="replace">
<ScalarOperator>
<Identifier>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[FUNCT_SplitStringToTable]" Column="Items" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Const ConstValue="''''" />
</ScalarOperator>
<ScalarOperator>
<Identifier>
<ColumnReference Column="ConstExpr1008">
<ScalarOperator>
<Convert DataType="varchar(max)" Length="2147483647" Style="0" Implicit="true">
<ScalarOperator>
<Const ConstValue="''" />
</ScalarOperator>
</Convert>
</ScalarOperator>
</ColumnReference>
</Identifier>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Convert>
</ScalarOperator>
</DefinedValue>
</DefinedValues>
<RelOp AvgRowSize="4035" EstimateCPU="1E-07" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimateRows="1" LogicalOp="Top" NodeId="6" Parallel="false" PhysicalOp="Top" EstimatedTotalSubtreeCost="0.0032832">
<OutputList>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[FUNCT_SplitStringToTable]" Column="Items" />
</OutputList>
<RunTimeInformation>
<RunTimeCountersPerThread Thread="0" ActualRows="0" ActualEndOfScans="1" ActualExecutions="1" />
</RunTimeInformation>
<Top RowCount="true" IsPercent="false" WithTies="false">
<TopExpression>
<ScalarOperator ScalarString="(0)">
<Const ConstValue="(0)" />
</ScalarOperator>
</TopExpression>
<RelOp AvgRowSize="4035" EstimateCPU="0.0001581" EstimateIO="0.003125" EstimateRebinds="0" EstimateRewinds="0" EstimateRows="1" LogicalOp="Table Scan" NodeId="7" Parallel="false" PhysicalOp="Table Scan" EstimatedTotalSubtreeCost="0.0032831" TableCardinality="0">
<OutputList>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[FUNCT_SplitStringToTable]" Column="Items" />
</OutputList>
<RunTimeInformation>
<RunTimeCountersPerThread Thread="0" ActualRows="0" ActualEndOfScans="1" ActualExecutions="1" />
</RunTimeInformation>
<TableScan Ordered="false" ForcedIndex="false" NoExpandHint="false">
<DefinedValues>
<DefinedValue>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[FUNCT_SplitStringToTable]" Column="Items" />
</DefinedValue>
</DefinedValues>
<Object Database="[MainDB]" Schema="[dbo]" Table="[FUNCT_SplitStringToTable]" />
</TableScan>
</RelOp>
</Top>
</RelOp>
</ComputeScalar>
</RelOp>
</Update>
</RelOp>
</Sequence>
</RelOp>
<ParameterList>
<ColumnReference Column="@AdditionalIdsToManifest" ParameterCompiledValue="NULL" ParameterRuntimeValue="NULL" />
</ParameterList>
</QueryPlan>
</StmtSimple>
</Statements>
</Batch>
<Batch>
<Statements>
<StmtSimple StatementCompId="11" StatementEstRows="1" StatementId="3" StatementOptmLevel="TRIVIAL" StatementSubTreeCost="0.0100022" StatementText="INSERT INTO @ManifestWithStatus ([Status]) VALUES (0) " StatementType="INSERT" QueryHash="0x9B5106E184B359B4" QueryPlanHash="0x2460F41B76262156">
<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" CachedPlanSize="8" CompileTime="4" CompileCPU="0" CompileMemory="352">
<RelOp AvgRowSize="9" EstimateCPU="1E-06" EstimateIO="0.01" EstimateRebinds="0" EstimateRewinds="0" EstimateRows="1" LogicalOp="Insert" NodeId="0" Parallel="false" PhysicalOp="Table Insert" EstimatedTotalSubtreeCost="0.0100022">
<OutputList />
<RunTimeInformation>
<RunTimeCountersPerThread Thread="0" ActualRows="1" ActualEndOfScans="1" ActualExecutions="1" />
</RunTimeInformation>
<ScalarInsert>
<DefinedValues>
<DefinedValue>
<ColumnReference Column="Expr1004" />
<ScalarOperator ScalarString="(0)">
<Const ConstValue="(0)" />
</ScalarOperator>
</DefinedValue>
</DefinedValues>
<Object Table="[@ManifestWithStatus]" />
<SetPredicate>
<ScalarOperator ScalarString="[Status] = [Expr1004]">
<ScalarExpressionList>
<ScalarOperator>
<MultipleAssign>
<Assign>
<ColumnReference Column="Status" />
<ScalarOperator>
<Identifier>
<ColumnReference Column="Expr1004" />
</Identifier>
</ScalarOperator>
</Assign>
</MultipleAssign>
</ScalarOperator>
</ScalarExpressionList>
</ScalarOperator>
</SetPredicate>
</ScalarInsert>
</RelOp>
</QueryPlan>
</StmtSimple>
</Statements>
</Batch>
<Batch>
<Statements>
<StmtSimple StatementCompId="12" StatementEstRows="1" StatementId="4" StatementOptmLevel="TRIVIAL" StatementSubTreeCost="0.0100022" StatementText="INSERT INTO @ManifestWithStatus ([Status]) VALUES (1) " StatementType="INSERT" QueryHash="0x9B5106E184B359B4" QueryPlanHash="0x2460F41B76262156">
<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" CachedPlanSize="8" CompileTime="0" CompileCPU="0" CompileMemory="352">
<RelOp AvgRowSize="9" EstimateCPU="1E-06" EstimateIO="0.01" EstimateRebinds="0" EstimateRewinds="0" EstimateRows="1" LogicalOp="Insert" NodeId="0" Parallel="false" PhysicalOp="Table Insert" EstimatedTotalSubtreeCost="0.0100022">
<OutputList />
<RunTimeInformation>
<RunTimeCountersPerThread Thread="0" ActualRows="1" ActualEndOfScans="1" ActualExecutions="1" />
</RunTimeInformation>
<ScalarInsert>
<DefinedValues>
<DefinedValue>
<ColumnReference Column="Expr1004" />
<ScalarOperator ScalarString="(1)">
<Const ConstValue="(1)" />
</ScalarOperator>
</DefinedValue>
</DefinedValues>
<Object Table="[@ManifestWithStatus]" />
<SetPredicate>
<ScalarOperator ScalarString="[Status] = [Expr1004]">
<ScalarExpressionList>
<ScalarOperator>
<MultipleAssign>
<Assign>
<ColumnReference Column="Status" />
<ScalarOperator>
<Identifier>
<ColumnReference Column="Expr1004" />
</Identifier>
</ScalarOperator>
</Assign>
</MultipleAssign>
</ScalarOperator>
</ScalarExpressionList>
</ScalarOperator>
</SetPredicate>
</ScalarInsert>
</RelOp>
</QueryPlan>
</StmtSimple>
</Statements>
</Batch>
<Batch>
<Statements>
<StmtSimple StatementCompId="13" StatementEstRows="1" StatementId="75203" StatementOptmLevel="FULL" StatementOptmEarlyAbortReason="GoodEnoughPlanFound" StatementSubTreeCost="0.0132874" StatementText="INSERT INTO @UserIDs SELECT * FROM FUNCT_GetAssociatedUserIDs(@UserID) " StatementType="INSERT" QueryHash="0x756B8238636D4100" QueryPlanHash="0x0B5972114FCF15D4">
<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" CachedPlanSize="16" CompileTime="1" CompileCPU="1" CompileMemory="384">
<RelOp AvgRowSize="9" EstimateCPU="2E-06" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimateRows="1" LogicalOp="Sequence" NodeId="0" Parallel="false" PhysicalOp="Sequence" EstimatedTotalSubtreeCost="0.0132874">
<OutputList />
<RunTimeInformation>
<RunTimeCountersPerThread Thread="0" ActualRows="37593" ActualEndOfScans="1" ActualExecutions="1" />
</RunTimeInformation>
<Sequence>
<RelOp AvgRowSize="9" EstimateCPU="1.157E-06" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimateRows="1" LogicalOp="Table-valued function" NodeId="1" Parallel="false" PhysicalOp="Table-valued function" EstimatedTotalSubtreeCost="1.157E-06">
<OutputList />
<RunTimeInformation>
<RunTimeCountersPerThread Thread="0" ActualRebinds="1" ActualRewinds="0" ActualRows="0" ActualEndOfScans="0" ActualExecutions="1" />
</RunTimeInformation>
<TableValuedFunction>
<DefinedValues />
<Object Database="[MainDB]" Schema="[dbo]" Table="[FUNCT_GetAssociatedUserIDs]" />
<ParameterList>
<ScalarOperator ScalarString="[@UserId]">
<Identifier>
<ColumnReference Column="@UserId" />
</Identifier>
</ScalarOperator>
</ParameterList>
</TableValuedFunction>
</RelOp>
<RelOp AvgRowSize="9" EstimateCPU="1E-06" EstimateIO="0.01" EstimateRebinds="0" EstimateRewinds="0" EstimateRows="1" LogicalOp="Insert" NodeId="3" Parallel="false" PhysicalOp="Table Insert" EstimatedTotalSubtreeCost="0.0132842">
<OutputList />
<RunTimeInformation>
<RunTimeCountersPerThread Thread="0" ActualRows="37593" ActualEndOfScans="1" ActualExecutions="1" />
</RunTimeInformation>
<Update DMLRequestSort="false">
<Object Table="[@UserIDs]" />
<SetPredicate>
<ScalarOperator ScalarString="[ID] = [MainDB].[dbo].[FUNCT_GetAssociatedUserIDs].[ID]">
<ScalarExpressionList>
<ScalarOperator>
<MultipleAssign>
<Assign>
<ColumnReference Column="ID" />
<ScalarOperator>
<Identifier>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[FUNCT_GetAssociatedUserIDs]" Column="ID" />
</Identifier>
</ScalarOperator>
</Assign>
</MultipleAssign>
</ScalarOperator>
</ScalarExpressionList>
</ScalarOperator>
</SetPredicate>
<RelOp AvgRowSize="11" EstimateCPU="1E-07" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimateRows="1" LogicalOp="Top" NodeId="4" Parallel="false" PhysicalOp="Top" EstimatedTotalSubtreeCost="0.0032832">
<OutputList>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[FUNCT_GetAssociatedUserIDs]" Column="ID" />
</OutputList>
<RunTimeInformation>
<RunTimeCountersPerThread Thread="0" ActualRows="37593" ActualEndOfScans="1" ActualExecutions="1" />
</RunTimeInformation>
<Top RowCount="true" IsPercent="false" WithTies="false">
<TopExpression>
<ScalarOperator ScalarString="(0)">
<Const ConstValue="(0)" />
</ScalarOperator>
</TopExpression>
<RelOp AvgRowSize="11" EstimateCPU="0.0001581" EstimateIO="0.003125" EstimateRebinds="0" EstimateRewinds="0" EstimateRows="1" LogicalOp="Table Scan" NodeId="5" Parallel="false" PhysicalOp="Table Scan" EstimatedTotalSubtreeCost="0.0032831" TableCardinality="0">
<OutputList>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[FUNCT_GetAssociatedUserIDs]" Column="ID" />
</OutputList>
<RunTimeInformation>
<RunTimeCountersPerThread Thread="0" ActualRows="37593" ActualEndOfScans="1" ActualExecutions="1" />
</RunTimeInformation>
<TableScan Ordered="false" ForcedIndex="false" NoExpandHint="false">
<DefinedValues>
<DefinedValue>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[FUNCT_GetAssociatedUserIDs]" Column="ID" />
</DefinedValue>
</DefinedValues>
<Object Database="[MainDB]" Schema="[dbo]" Table="[FUNCT_GetAssociatedUserIDs]" />
</TableScan>
</RelOp>
</Top>
</RelOp>
</Update>
</RelOp>
</Sequence>
</RelOp>
<ParameterList>
<ColumnReference Column="@UserId" ParameterRuntimeValue="(1)" />
</ParameterList>
</QueryPlan>
</StmtSimple>
</Statements>
</Batch>
<Batch>
<Statements>
<StmtSimple StatementCompId="21" StatementEstRows="16.2572" StatementId="75204" StatementOptmLevel="FULL" StatementOptmEarlyAbortReason="TimeOut" StatementSubTreeCost="1.33118" StatementText="SELECT CAST(IsNULL(sub.ChildPieceID,d.PieceID) AS VARCHAR(30)) AS PieceID, CAST(SUBSTRING(CASE WHEN LEN(RTRIM(LTRIM(d.EntryPoint))) = 0 THEN d.ReturnAddress_ZIP ELSE ISNULL(d.EntryPoint,'') END, 1, 5) AS VARCHAR(50)) AS ProcessingEntryPoint, d.EntryPoint, d.UserID, d.ReturnAddressID, d.ProcessClass, d.Name, d.CompanyName, d.Address1, d.Address2, d.City, d.State, d.ZIP, CAST(ISNULL(d.Country, ' ') AS CHAR(2)) AS Country, d.Cost, d.UnitOfMeasureCode, d.Weight, d.Height, d.Width, d.Depth, d.ProcessingCategory, ISNULL(d.DestinationCostIndicator, 'N') AS DestinationCostIndicator, ISNULL(d.Zone, '') AS Zone, d.ValueOfArticle, d.CostAmountDueShipper, d.HandlingCharge, d.SignatureWaiver, ISNULL(d.SurchargeType, '') AS SurchargeType, d.SurchargeAmount, d.CreationMethod, d.Activated, d.ProcessingStatus, d.Booked, d.Delivered, d.SignatureFileAvailable, d.SignatureFileRequested, d.LastModified, d.CreatedDate, d.RecordCaseNumber, d.Memo, d.LastProcessingEventCheck, d.EFNumber, d.TID, d.eVS, d.IsDemo, d.PermitID, d.UnitOfMeasurement_Dimensions, d.ServiceTypeCode, d.[Type], d.BarcodeConstructCode, d.OD_ContainerID1, d.OD_ContainerType1, d.OD_ContainerID2, d.OD_ContainerType2, d.OD_ContainerID3, d.OD_ContainerType3, d.OD_ContentsIndicator, d.OD_ProcessClassEnclosed, d.ReturnAddress_CompanyName, d.ReturnAddress_Name, d.ReturnAddress_Address1, d.ReturnAddress_Address2, d.ReturnAddress_City, d.ReturnAddress_State, d.ReturnAddress_ZIP, d.IsCubic, u.UserName, u.Name AS CreatorName, u.CompanyName As CreatorCompanyName, CAST(' ' AS CHAR(1)) AS DestinationFacilityType, CAST(' ' AS CHAR(5)) AS CarrierRouteCode, CAST(' ' AS CHAR(11)) AS ForeignPostalCode, CAST('' AS VARCHAR(9)) AS LogisticsMID, CAST('' AS VARCHAR(9)) AS OwnerMID, CAST('' AS VARCHAR(15)) AS CustomerRegistrationID, CAST('' AS CHAR(15)) AS FASTReservationNumber, CAST(NULL AS SMALLDATETIME) AS FASTInductionDate, CAST(2 AS TINYINT) AS ElectronicFileType, CAST('00000' AS CHAR(5)) AS PostOfficeOfAccountZIP, CAST('' AS VARCHAR(20)) AS MeterSerialNumber, CAST('' AS VARCHAR(6)) AS ChargeBackCode, CAST('' AS CHAR(1)) AS CostType, CAST('' AS VARCHAR(22)) AS ShippingServicesContractNumber, CAST('' AS VARCHAR(14)) AS ShippingServicesContractsProductId, CAST('' AS CHAR(2)) AS DiscountType, CAST(NULL AS DECIMAL) AS DiscountAmount, CAST('' AS CHAR(2)) AS NonIncidentalEnclosureRateIndicator, CAST('' AS CHAR(2)) AS NonIncidentalEnclosureClass, CAST(NULL AS DECIMAL) AS NonIncidentalEnclosureCost, CAST(NULL AS DECIMAL) AS NonIncidentalEnclosureWeight, CAST('' AS CHAR(1)) AS NonIncidentalEnclosureProcessingCategory, CAST('' AS CHAR(1)) AS PostalRoutingBarcode, CAST('' AS CHAR(2)) AS OpenAndDistributeContentsIndicator, CAST('N' AS CHAR(1)) AS POBoxIndicator, CAST('N' AS CHAR(1)) AS WaiverOfSignature, CAST(CASE WHEN d.ProcessClass = 'PM' THEN 'P' ELSE '1' END AS CHAR(1)) AS DeliveryOptionIndicator, CAST('1' AS CHAR(1)) AS DeliveryOptionIndicator, CAST('00' AS CHAR(2)) AS DestinationDeliveryPoint, CAST('' AS VARCHAR(64)) AS RecipientEmailAddress, CAST('' AS VARCHAR(64)) AS RecipientSMSNumber, CAST('' AS VARCHAR(48)) AS SenderName, CAST('' AS VARCHAR(64)) AS SenderEmailAddres" StatementType="SELECT" QueryHash="0x5FE82068B0216D67" QueryPlanHash="0x46D4B7398A4B07A2">
<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="2768" CachedPlanSize="328" CompileTime="340" CompileCPU="249" CompileMemory="4104">
<RelOp AvgRowSize="1269" EstimateCPU="1.62572E-06" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimateRows="16.2572" LogicalOp="Compute Scalar" NodeId="0" Parallel="false" PhysicalOp="Compute Scalar" EstimatedTotalSubtreeCost="1.33118">
<OutputList>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="UserID" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddressID" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ProcessClass" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Name" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="CompanyName" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Address1" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Address2" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="City" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="State" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ZIP" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="EntryPoint" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Cost" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="UnitOfMeasureCode" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Weight" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Height" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Width" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Depth" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ProcessingCategory" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ValueOfArticle" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="CostAmountDueShipper" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="HandlingCharge" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="SignatureWaiver" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="SurchargeAmount" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="CreationMethod" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Activated" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ProcessingStatus" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Booked" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Delivered" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="SignatureFileAvailable" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="SignatureFileRequested" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="LastModified" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="CreatedDate" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="RecordCaseNumber" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Memo" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="LastProcessingEventCheck" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="EFNumber" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="eVS" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="IsDemo" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="PermitID" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="UnitOfMeasurement_Dimensions" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ServiceTypeCode" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Type" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="BarcodeConstructCode" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ContainerID1" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ContainerType1" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ContainerID2" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ContainerType2" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ContainerID3" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ContainerType3" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ContentsIndicator" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ProcessClassEnclosed" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddress_CompanyName" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddress_Name" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddress_Address1" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddress_Address2" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddress_City" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddress_State" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddress_ZIP" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="IsCubic" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="TID" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[Users]" Alias="" Column="Username" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[Users]" Alias="" Column="CompanyName" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[Users]" Alias="" Column="Name" />
<ColumnReference Column="Expr1016" />
<ColumnReference Column="Expr1017" />
<ColumnReference Column="Expr1018" />
<ColumnReference Column="Expr1019" />
<ColumnReference Column="Expr1020" />
<ColumnReference Column="Expr1021" />
<ColumnReference Column="Expr1022" />
<ColumnReference Column="Expr1023" />
<ColumnReference Column="Expr1024" />
<ColumnReference Column="Expr1025" />
<ColumnReference Column="Expr1026" />
<ColumnReference Column="Expr1027" />
<ColumnReference Column="Expr1028" />
<ColumnReference Column="Expr1029" />
<ColumnReference Column="Expr1030" />
<ColumnReference Column="Expr1031" />
<ColumnReference Column="Expr1032" />
<ColumnReference Column="Expr1033" />
<ColumnReference Column="Expr1034" />
<ColumnReference Column="Expr1035" />
<ColumnReference Column="Expr1036" />
<ColumnReference Column="Expr1037" />
<ColumnReference Column="Expr1038" />
<ColumnReference Column="Expr1039" />
<ColumnReference Column="Expr1040" />
<ColumnReference Column="Expr1041" />
<ColumnReference Column="Expr1042" />
<ColumnReference Column="Expr1043" />
<ColumnReference Column="Expr1044" />
<ColumnReference Column="Expr1045" />
<ColumnReference Column="Expr1046" />
<ColumnReference Column="Expr1047" />
<ColumnReference Column="Expr1048" />
<ColumnReference Column="Expr1049" />
<ColumnReference Column="Expr1050" />
<ColumnReference Column="Expr1051" />
<ColumnReference Column="Expr1052" />
<ColumnReference Column="Expr1053" />
<ColumnReference Column="Expr1054" />
<ColumnReference Column="Expr1055" />
<ColumnReference Column="Expr1056" />
</OutputList>
<ComputeScalar>
<DefinedValues>
<DefinedValue>
<ColumnReference Column="Expr1016" />
<ScalarOperator ScalarString="CONVERT(varchar(30),isnull([MainDB].[dbo].[MailPiece_AssociatedPieceIDs].[ChildPieceID] as .[ChildPieceID],[MainDB].[dbo].[ProcessPiece_Details].[PieceID] as [d].[PieceID]),0)">
<Convert DataType="varchar" Length="30" Style="0" Implicit="false">
<ScalarOperator>
<Intrinsic FunctionName="isnull">
<ScalarOperator>
<Identifier>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[MailPiece_AssociatedPieceIDs]" Alias="" Column="ChildPieceID" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Identifier>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="PieceID" />
</Identifier>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Convert>
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1022" />
<ScalarOperator ScalarString="' '">
<Const ConstValue="' '" />
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1023" />
<ScalarOperator ScalarString="' '">
<Const ConstValue="' '" />
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1024" />
<ScalarOperator ScalarString="' '">
<Const ConstValue="' '" />
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1025" />
<ScalarOperator ScalarString="''">
<Const ConstValue="''" />
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1026" />
<ScalarOperator ScalarString="''">
<Const ConstValue="''" />
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1027" />
<ScalarOperator ScalarString="''">
<Const ConstValue="''" />
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1028" />
<ScalarOperator ScalarString="' '">
<Const ConstValue="' '" />
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1029" />
<ScalarOperator ScalarString="NULL">
<Const ConstValue="NULL" />
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1030" />
<ScalarOperator ScalarString="(2)">
<Const ConstValue="(2)" />
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1031" />
<ScalarOperator ScalarString="'00000'">
<Const ConstValue="'00000'" />
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1032" />
<ScalarOperator ScalarString="''">
<Const ConstValue="''" />
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1033" />
<ScalarOperator ScalarString="''">
<Const ConstValue="''" />
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1034" />
<ScalarOperator ScalarString="' '">
<Const ConstValue="' '" />
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1035" />
<ScalarOperator ScalarString="''">
<Const ConstValue="''" />
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1036" />
<ScalarOperator ScalarString="''">
<Const ConstValue="''" />
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1037" />
<ScalarOperator ScalarString="' '">
<Const ConstValue="' '" />
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1038" />
<ScalarOperator ScalarString="NULL">
<Const ConstValue="NULL" />
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1039" />
<ScalarOperator ScalarString="' '">
<Const ConstValue="' '" />
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1040" />
<ScalarOperator ScalarString="' '">
<Const ConstValue="' '" />
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1041" />
<ScalarOperator ScalarString="NULL">
<Const ConstValue="NULL" />
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1042" />
<ScalarOperator ScalarString="NULL">
<Const ConstValue="NULL" />
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1043" />
<ScalarOperator ScalarString="' '">
<Const ConstValue="' '" />
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1044" />
<ScalarOperator ScalarString="' '">
<Const ConstValue="' '" />
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1045" />
<ScalarOperator ScalarString="' '">
<Const ConstValue="' '" />
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1046" />
<ScalarOperator ScalarString="'N'">
<Const ConstValue="'N'" />
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1047" />
<ScalarOperator ScalarString="'N'">
<Const ConstValue="'N'" />
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1049" />
<ScalarOperator ScalarString="'1'">
<Const ConstValue="'1'" />
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1050" />
<ScalarOperator ScalarString="'00'">
<Const ConstValue="'00'" />
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1051" />
<ScalarOperator ScalarString="''">
<Const ConstValue="''" />
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1052" />
<ScalarOperator ScalarString="''">
<Const ConstValue="''" />
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1053" />
<ScalarOperator ScalarString="''">
<Const ConstValue="''" />
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1054" />
<ScalarOperator ScalarString="''">
<Const ConstValue="''" />
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1055" />
<ScalarOperator ScalarString="''">
<Const ConstValue="''" />
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1056" />
<ScalarOperator ScalarString="(0)">
<Const ConstValue="(0)" />
</ScalarOperator>
</DefinedValue>
</DefinedValues>
<RelOp AvgRowSize="990" EstimateCPU="2.10694E-05" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimateRows="16.2572" LogicalOp="Filter" NodeId="1" Parallel="false" PhysicalOp="Filter" EstimatedTotalSubtreeCost="1.33118">
<OutputList>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="PieceID" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="UserID" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddressID" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ProcessClass" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Name" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="CompanyName" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Address1" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Address2" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="City" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="State" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ZIP" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="EntryPoint" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Cost" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="UnitOfMeasureCode" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Weight" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Height" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Width" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Depth" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ProcessingCategory" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ValueOfArticle" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="CostAmountDueShipper" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="HandlingCharge" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="SignatureWaiver" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="SurchargeAmount" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="CreationMethod" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Activated" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ProcessingStatus" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Booked" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Delivered" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="SignatureFileAvailable" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="SignatureFileRequested" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="LastModified" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="CreatedDate" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="RecordCaseNumber" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Memo" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="LastProcessingEventCheck" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="EFNumber" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="eVS" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="IsDemo" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="PermitID" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="UnitOfMeasurement_Dimensions" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ServiceTypeCode" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Type" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="BarcodeConstructCode" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ContainerID1" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ContainerType1" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ContainerID2" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ContainerType2" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ContainerID3" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ContainerType3" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ContentsIndicator" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ProcessClassEnclosed" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddress_CompanyName" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddress_Name" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddress_Address1" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddress_Address2" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddress_City" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddress_State" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddress_ZIP" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="IsCubic" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="TID" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[Users]" Alias="" Column="Username" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[Users]" Alias="" Column="CompanyName" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[Users]" Alias="" Column="Name" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[MailPiece_AssociatedPieceIDs]" Alias="" Column="ChildPieceID" />
<ColumnReference Column="Expr1017" />
<ColumnReference Column="Expr1018" />
<ColumnReference Column="Expr1019" />
<ColumnReference Column="Expr1020" />
<ColumnReference Column="Expr1021" />
<ColumnReference Column="Expr1048" />
</OutputList>
<RunTimeInformation>
<RunTimeCountersPerThread Thread="0" ActualRows="4158" ActualEndOfScans="1" ActualExecutions="1" />
</RunTimeInformation>
<Filter StartupExpression="false">
<RelOp AvgRowSize="998" EstimateCPU="0.00010008" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimateRows="23.9425" LogicalOp="Left Outer Join" NodeId="2" Parallel="false" PhysicalOp="Nested Loops" EstimatedTotalSubtreeCost="1.33116">
<OutputList>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="PieceID" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="UserID" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddressID" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ProcessClass" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Name" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="CompanyName" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Address1" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Address2" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="City" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="State" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ZIP" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="EntryPoint" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Cost" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="UnitOfMeasureCode" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Weight" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Height" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Width" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Depth" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ProcessingCategory" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ValueOfArticle" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="CostAmountDueShipper" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="HandlingCharge" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="SignatureWaiver" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="SurchargeAmount" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="CreationMethod" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Activated" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ProcessingStatus" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Booked" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Delivered" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="SignatureFileAvailable" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="SignatureFileRequested" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="LastModified" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="CreatedDate" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="RecordCaseNumber" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Memo" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="LastProcessingEventCheck" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="EFNumber" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="eVS" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="IsDemo" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="PermitID" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="UnitOfMeasurement_Dimensions" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ServiceTypeCode" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Type" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="BarcodeConstructCode" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ContainerID1" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ContainerType1" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ContainerID2" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ContainerType2" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ContainerID3" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ContainerType3" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ContentsIndicator" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ProcessClassEnclosed" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddress_CompanyName" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddress_Name" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddress_Address1" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddress_Address2" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddress_City" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddress_State" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddress_ZIP" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="IsCubic" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="TID" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[Users]" Alias="" Column="Username" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[Users]" Alias="" Column="CompanyName" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[Users]" Alias="" Column="Name" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[MailPiece_AssociatedPieceIDs]" Alias="" Column="ChildPieceID" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d2]" Column="Type" />
<ColumnReference Column="Expr1017" />
<ColumnReference Column="Expr1018" />
<ColumnReference Column="Expr1019" />
<ColumnReference Column="Expr1020" />
<ColumnReference Column="Expr1021" />
<ColumnReference Column="Expr1048" />
</OutputList>
<RunTimeInformation>
<RunTimeCountersPerThread Thread="0" ActualRows="4168" ActualEndOfScans="1" ActualExecutions="1" />
</RunTimeInformation>
<NestedLoops Optimized="true">
<OuterReferences>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[MailPiece_AssociatedPieceIDs]" Alias="" Column="ChildPieceID" />
</OuterReferences>
<RelOp AvgRowSize="990" EstimateCPU="0.00010008" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimateRows="23.9425" LogicalOp="Left Outer Join" NodeId="4" Parallel="false" PhysicalOp="Nested Loops" EstimatedTotalSubtreeCost="1.25558">
<OutputList>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="PieceID" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="UserID" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddressID" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ProcessClass" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Name" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="CompanyName" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Address1" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Address2" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="City" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="State" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ZIP" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="EntryPoint" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Cost" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="UnitOfMeasureCode" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Weight" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Height" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Width" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Depth" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ProcessingCategory" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ValueOfArticle" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="CostAmountDueShipper" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="HandlingCharge" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="SignatureWaiver" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="SurchargeAmount" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="CreationMethod" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Activated" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ProcessingStatus" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Booked" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Delivered" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="SignatureFileAvailable" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="SignatureFileRequested" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="LastModified" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="CreatedDate" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="RecordCaseNumber" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Memo" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="LastProcessingEventCheck" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="EFNumber" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="eVS" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="IsDemo" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="PermitID" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="UnitOfMeasurement_Dimensions" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ServiceTypeCode" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Type" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="BarcodeConstructCode" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ContainerID1" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ContainerType1" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ContainerID2" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ContainerType2" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ContainerID3" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ContainerType3" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ContentsIndicator" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ProcessClassEnclosed" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddress_CompanyName" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddress_Name" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddress_Address1" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddress_Address2" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddress_City" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddress_State" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddress_ZIP" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="IsCubic" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="TID" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[Users]" Alias="" Column="Username" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[Users]" Alias="" Column="CompanyName" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[Users]" Alias="" Column="Name" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[MailPiece_AssociatedPieceIDs]" Alias="" Column="ChildPieceID" />
<ColumnReference Column="Expr1017" />
<ColumnReference Column="Expr1018" />
<ColumnReference Column="Expr1019" />
<ColumnReference Column="Expr1020" />
<ColumnReference Column="Expr1021" />
<ColumnReference Column="Expr1048" />
</OutputList>
<RunTimeInformation>
<RunTimeCountersPerThread Thread="0" ActualRows="4168" ActualEndOfScans="1" ActualExecutions="1" />
</RunTimeInformation>
<NestedLoops Optimized="false">
<OuterReferences>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="PieceID" />
</OuterReferences>
<RelOp AvgRowSize="965" EstimateCPU="0.0200353" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimateRows="23.9425" LogicalOp="Right Semi Join" NodeId="5" Parallel="false" PhysicalOp="Hash Match" EstimatedTotalSubtreeCost="1.18726">
<OutputList>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="PieceID" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="UserID" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddressID" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ProcessClass" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Name" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="CompanyName" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Address1" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Address2" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="City" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="State" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ZIP" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="EntryPoint" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Cost" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="UnitOfMeasureCode" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Weight" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Height" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Width" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Depth" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ProcessingCategory" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ValueOfArticle" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="CostAmountDueShipper" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="HandlingCharge" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="SignatureWaiver" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="SurchargeAmount" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="CreationMethod" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Activated" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ProcessingStatus" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Booked" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Delivered" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="SignatureFileAvailable" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="SignatureFileRequested" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="LastModified" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="CreatedDate" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="RecordCaseNumber" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Memo" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="LastProcessingEventCheck" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="EFNumber" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="eVS" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="IsDemo" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="PermitID" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="UnitOfMeasurement_Dimensions" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ServiceTypeCode" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Type" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="BarcodeConstructCode" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ContainerID1" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ContainerType1" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ContainerID2" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ContainerType2" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ContainerID3" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ContainerType3" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ContentsIndicator" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ProcessClassEnclosed" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddress_CompanyName" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddress_Name" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddress_Address1" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddress_Address2" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddress_City" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddress_State" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddress_ZIP" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="IsCubic" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="TID" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[Users]" Alias="" Column="Username" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[Users]" Alias="" Column="CompanyName" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[Users]" Alias="" Column="Name" />
<ColumnReference Column="Expr1017" />
<ColumnReference Column="Expr1018" />
<ColumnReference Column="Expr1019" />
<ColumnReference Column="Expr1020" />
<ColumnReference Column="Expr1021" />
<ColumnReference Column="Expr1048" />
</OutputList>
<MemoryFractions Input="0" Output="0" />
<RunTimeInformation>
<RunTimeCountersPerThread Thread="0" ActualRows="4168" ActualEndOfScans="1" ActualExecutions="1" />
</RunTimeInformation>
<Hash>
<DefinedValues />
<HashKeysBuild>
<ColumnReference Column="Status" />
</HashKeysBuild>
<HashKeysProbe>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ProcessingStatus" />
</HashKeysProbe>
<ProbeResidual>
<ScalarOperator ScalarString="[Status]=[MainDB].[dbo].[ProcessPiece_Details].[ProcessingStatus] as [d].[ProcessingStatus]">
<Compare CompareOp="EQ">
<ScalarOperator>
<Identifier>
<ColumnReference Column="Status" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Identifier>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ProcessingStatus" />
</Identifier>
</ScalarOperator>
</Compare>
</ScalarOperator>
</ProbeResidual>
<RelOp AvgRowSize="11" EstimateCPU="0.0001581" EstimateIO="0.003125" EstimateRebinds="0" EstimateRewinds="0" EstimateRows="1" LogicalOp="Table Scan" NodeId="6" Parallel="false" PhysicalOp="Table Scan" EstimatedTotalSubtreeCost="0.0032831" TableCardinality="0">
<OutputList>
<ColumnReference Column="Status" />
</OutputList>
<RunTimeInformation>
<RunTimeCountersPerThread Thread="0" ActualRows="2" ActualEndOfScans="1" ActualExecutions="1" />
</RunTimeInformation>
<TableScan Ordered="false" ForcedIndex="false" NoExpandHint="false">
<DefinedValues>
<DefinedValue>
<ColumnReference Column="Status" />
</DefinedValue>
</DefinedValues>
<Object Table="[@ManifestWithStatus]" />
</TableScan>
</RelOp>
<RelOp AvgRowSize="965" EstimateCPU="3.43529E-05" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimateRows="343.529" LogicalOp="Compute Scalar" NodeId="7" Parallel="false" PhysicalOp="Compute Scalar" EstimatedTotalSubtreeCost="1.16394">
<OutputList>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="PieceID" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="UserID" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddressID" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ProcessClass" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Name" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="CompanyName" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Address1" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Address2" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="City" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="State" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ZIP" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="EntryPoint" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Cost" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="UnitOfMeasureCode" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Weight" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Height" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Width" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Depth" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ProcessingCategory" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ValueOfArticle" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="CostAmountDueShipper" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="HandlingCharge" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="SignatureWaiver" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="SurchargeAmount" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="CreationMethod" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Activated" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ProcessingStatus" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Booked" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Delivered" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="SignatureFileAvailable" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="SignatureFileRequested" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="LastModified" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="CreatedDate" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="RecordCaseNumber" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Memo" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="LastProcessingEventCheck" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="EFNumber" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="eVS" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="IsDemo" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="PermitID" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="UnitOfMeasurement_Dimensions" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ServiceTypeCode" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Type" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="BarcodeConstructCode" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ContainerID1" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ContainerType1" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ContainerID2" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ContainerType2" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ContainerID3" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ContainerType3" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ContentsIndicator" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ProcessClassEnclosed" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddress_CompanyName" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddress_Name" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddress_Address1" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddress_Address2" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddress_City" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddress_State" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddress_ZIP" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="IsCubic" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="TID" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[Users]" Alias="" Column="Username" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[Users]" Alias="" Column="CompanyName" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[Users]" Alias="" Column="Name" />
<ColumnReference Column="Expr1017" />
<ColumnReference Column="Expr1018" />
<ColumnReference Column="Expr1019" />
<ColumnReference Column="Expr1020" />
<ColumnReference Column="Expr1021" />
<ColumnReference Column="Expr1048" />
</OutputList>
<ComputeScalar>
<DefinedValues>
<DefinedValue>
<ColumnReference Column="Expr1017" />
<ScalarOperator ScalarString="CONVERT(varchar(50),substring(CASE WHEN len(rtrim(ltrim([MainDB].[dbo].[ProcessPiece_Details].[EntryPoint] as [d].[EntryPoint])))=(0) THEN [MainDB].[dbo].[ProcessPiece_Details].[ReturnAddress_ZIP] as [d].[ReturnAddress_ZIP] ELSE [MainDB].[dbo].[ProcessPiece_Details].[EntryPoint] as [d].[EntryPoint] END,(1),(5)),0)">
<Convert DataType="varchar" Length="50" Style="0" Implicit="false">
<ScalarOperator>
<Intrinsic FunctionName="substring">
<ScalarOperator>
<IF>
<Condition>
<ScalarOperator>
<Compare CompareOp="EQ">
<ScalarOperator>
<Intrinsic FunctionName="len">
<ScalarOperator>
<Intrinsic FunctionName="rtrim">
<ScalarOperator>
<Intrinsic FunctionName="ltrim">
<ScalarOperator>
<Identifier>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="EntryPoint" />
</Identifier>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
<ScalarOperator>
<Const ConstValue="(0)" />
</ScalarOperator>
</Compare>
</ScalarOperator>
</Condition>
<Then>
<ScalarOperator>
<Identifier>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddress_ZIP" />
</Identifier>
</ScalarOperator>
</Then>
<Else>
<ScalarOperator>
<Identifier>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="EntryPoint" />
</Identifier>
</ScalarOperator>
</Else>
</IF>
</ScalarOperator>
<ScalarOperator>
<Const ConstValue="(1)" />
</ScalarOperator>
<ScalarOperator>
<Const ConstValue="(5)" />
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Convert>
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1018" />
<ScalarOperator ScalarString="CONVERT(char(2),isnull([MainDB].[dbo].[ProcessPiece_Details].[Country] as [d].[Country],' '),0)">
<Convert DataType="char" Length="2" Style="0" Implicit="false">
<ScalarOperator>
<Intrinsic FunctionName="isnull">
<ScalarOperator>
<Identifier>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Country" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Const ConstValue="' '" />
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Convert>
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1019" />
<ScalarOperator ScalarString="isnull([MainDB].[dbo].[ProcessPiece_Details].[DestinationCostIndicator] as [d].[DestinationCostIndicator],'N')">
<Intrinsic FunctionName="isnull">
<ScalarOperator>
<Identifier>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="DestinationCostIndicator" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Const ConstValue="'N'" />
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1020" />
<ScalarOperator ScalarString="isnull([MainDB].[dbo].[ProcessPiece_Details].[Zone] as [d].[Zone],'')">
<Intrinsic FunctionName="isnull">
<ScalarOperator>
<Identifier>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Zone" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Const ConstValue="''" />
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1021" />
<ScalarOperator ScalarString="isnull([MainDB].[dbo].[ProcessPiece_Details].[SurchargeType] as [d].[SurchargeType],'')">
<Intrinsic FunctionName="isnull">
<ScalarOperator>
<Identifier>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="SurchargeType" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Const ConstValue="''" />
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</DefinedValue>
<DefinedValue>
<ColumnReference Column="Expr1048" />
<ScalarOperator ScalarString="CONVERT(char(1),CASE WHEN [MainDB].[dbo].[ProcessPiece_Details].[ProcessClass] as [d].[ProcessClass]='PM' THEN 'P' ELSE '1' END,0)">
<Convert DataType="char" Length="1" Style="0" Implicit="false">
<ScalarOperator>
<IF>
<Condition>
<ScalarOperator>
<Compare CompareOp="EQ">
<ScalarOperator>
<Identifier>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ProcessClass" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Const ConstValue="'PM'" />
</ScalarOperator>
</Compare>
</ScalarOperator>
</Condition>
<Then>
<ScalarOperator>
<Const ConstValue="'P'" />
</ScalarOperator>
</Then>
<Else>
<ScalarOperator>
<Const ConstValue="'1'" />
</ScalarOperator>
</Else>
</IF>
</ScalarOperator>
</Convert>
</ScalarOperator>
</DefinedValue>
</DefinedValues>
<RelOp AvgRowSize="937" EstimateCPU="0.00143595" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimateRows="343.529" LogicalOp="Inner Join" NodeId="8" Parallel="false" PhysicalOp="Nested Loops" EstimatedTotalSubtreeCost="1.1639">
<OutputList>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="PieceID" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="UserID" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddressID" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ProcessClass" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Name" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="CompanyName" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Address1" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Address2" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="City" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="State" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ZIP" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="EntryPoint" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Country" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Cost" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="UnitOfMeasureCode" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Weight" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Height" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Width" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Depth" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ProcessingCategory" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="DestinationCostIndicator" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Zone" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ValueOfArticle" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="CostAmountDueShipper" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="HandlingCharge" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="SignatureWaiver" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="SurchargeType" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="SurchargeAmount" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="CreationMethod" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Activated" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ProcessingStatus" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Booked" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Delivered" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="SignatureFileAvailable" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="SignatureFileRequested" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="LastModified" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="CreatedDate" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="RecordCaseNumber" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Memo" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="LastProcessingEventCheck" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="EFNumber" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="eVS" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="IsDemo" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="PermitID" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="UnitOfMeasurement_Dimensions" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ServiceTypeCode" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Type" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="BarcodeConstructCode" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ContainerID1" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ContainerType1" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ContainerID2" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ContainerType2" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ContainerID3" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ContainerType3" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ContentsIndicator" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ProcessClassEnclosed" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddress_CompanyName" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddress_Name" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddress_Address1" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddress_Address2" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddress_City" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddress_State" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddress_ZIP" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="IsCubic" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="TID" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[Users]" Alias="" Column="Username" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[Users]" Alias="" Column="CompanyName" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[Users]" Alias="" Column="Name" />
</OutputList>
<RunTimeInformation>
<RunTimeCountersPerThread Thread="0" ActualRows="11372214" ActualEndOfScans="1" ActualExecutions="1" />
</RunTimeInformation>
<NestedLoops Optimized="true" WithUnorderedPrefetch="true">
<OuterReferences>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="PieceID" />
<ColumnReference Column="Expr1061" />
</OuterReferences>
<RelOp AvgRowSize="920" EstimateCPU="0.00143595" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimateRows="343.529" LogicalOp="Inner Join" NodeId="11" Parallel="false" PhysicalOp="Nested Loops" EstimatedTotalSubtreeCost="0.0379849">
<OutputList>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="PieceID" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="UserID" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddressID" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ProcessClass" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Name" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="CompanyName" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Address1" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Address2" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="City" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="State" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ZIP" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="EntryPoint" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Country" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Cost" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="UnitOfMeasureCode" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Weight" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Height" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Width" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Depth" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ProcessingCategory" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="DestinationCostIndicator" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Zone" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ValueOfArticle" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="CostAmountDueShipper" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="HandlingCharge" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="SignatureWaiver" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="SurchargeType" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="SurchargeAmount" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="CreationMethod" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Activated" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ProcessingStatus" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Booked" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Delivered" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="SignatureFileAvailable" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="SignatureFileRequested" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="LastModified" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="CreatedDate" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="RecordCaseNumber" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Memo" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="LastProcessingEventCheck" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="EFNumber" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="eVS" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="IsDemo" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="PermitID" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="UnitOfMeasurement_Dimensions" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ServiceTypeCode" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Type" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="BarcodeConstructCode" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ContainerID1" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ContainerType1" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ContainerID2" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ContainerType2" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ContainerID3" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ContainerType3" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ContentsIndicator" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ProcessClassEnclosed" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddress_CompanyName" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddress_Name" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddress_Address1" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddress_Address2" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddress_City" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddress_State" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddress_ZIP" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="IsCubic" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[Users]" Alias="" Column="Username" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[Users]" Alias="" Column="CompanyName" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[Users]" Alias="" Column="Name" />
</OutputList>
<RunTimeInformation>
<RunTimeCountersPerThread Thread="0" ActualRows="11372214" ActualEndOfScans="1" ActualExecutions="1" />
</RunTimeInformation>
<NestedLoops Optimized="false">
<OuterReferences>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[Users]" Alias="" Column="ID" />
</OuterReferences>
<RelOp AvgRowSize="50" EstimateCPU="4.18E-06" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimateRows="1" LogicalOp="Inner Join" NodeId="12" Parallel="false" PhysicalOp="Nested Loops" EstimatedTotalSubtreeCost="0.00657038">
<OutputList>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[Users]" Alias="" Column="ID" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[Users]" Alias="" Column="Username" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[Users]" Alias="" Column="CompanyName" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[Users]" Alias="" Column="Name" />
</OutputList>
<RunTimeInformation>
<RunTimeCountersPerThread Thread="0" ActualRows="37593" ActualEndOfScans="1" ActualExecutions="1" />
</RunTimeInformation>
<NestedLoops Optimized="false">
<OuterReferences>
<ColumnReference Table="@UserIDs" Alias="[tmpUsers]" Column="ID" />
</OuterReferences>
<RelOp AvgRowSize="11" EstimateCPU="0.0001581" EstimateIO="0.003125" EstimateRebinds="0" EstimateRewinds="0" EstimateRows="1" LogicalOp="Table Scan" NodeId="13" Parallel="false" PhysicalOp="Table Scan" EstimatedTotalSubtreeCost="0.0032831" TableCardinality="0">
<OutputList>
<ColumnReference Table="@UserIDs" Alias="[tmpUsers]" Column="ID" />
</OutputList>
<RunTimeInformation>
<RunTimeCountersPerThread Thread="0" ActualRows="37593" ActualEndOfScans="1" ActualExecutions="1" />
</RunTimeInformation>
<TableScan Ordered="false" ForcedIndex="false" NoExpandHint="false">
<DefinedValues>
<DefinedValue>
<ColumnReference Table="@UserIDs" Alias="[tmpUsers]" Column="ID" />
</DefinedValue>
</DefinedValues>
<Object Table="[@UserIDs]" Alias="[tmpUsers]" />
</TableScan>
</RelOp>
<RelOp AvgRowSize="50" EstimateCPU="0.0001581" EstimateIO="0.003125" EstimateRebinds="0" EstimateRewinds="0" EstimateRows="1" LogicalOp="Clustered Index Seek" NodeId="14" Parallel="false" PhysicalOp="Clustered Index Seek" EstimatedTotalSubtreeCost="0.0032831" TableCardinality="37618">
<OutputList>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[Users]" Alias="" Column="ID" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[Users]" Alias="" Column="Username" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[Users]" Alias="" Column="CompanyName" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[Users]" Alias="" Column="Name" />
</OutputList>
<RunTimeInformation>
<RunTimeCountersPerThread Thread="0" ActualRows="37593" ActualEndOfScans="0" ActualExecutions="37593" />
</RunTimeInformation>
<IndexScan Ordered="true" ScanDirection="FORWARD" ForcedIndex="false" ForceSeek="false" NoExpandHint="false">
<DefinedValues>
<DefinedValue>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[Users]" Alias="" Column="ID" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[Users]" Alias="" Column="Username" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[Users]" Alias="" Column="CompanyName" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[Users]" Alias="" Column="Name" />
</DefinedValue>
</DefinedValues>
<Object Database="[MainDB]" Schema="[dbo]" Table="[Users]" Index="[PK_User]" Alias="" IndexKind="Clustered" />
<SeekPredicates>
<SeekPredicateNew>
<SeekKeys>
<Prefix ScanType="EQ">
<RangeColumns>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[Users]" Alias="" Column="ID" />
</RangeColumns>
<RangeExpressions>
<ScalarOperator ScalarString="@UserIDs.[ID] as [tmpUsers].[ID]">
<Identifier>
<ColumnReference Table="@UserIDs" Alias="[tmpUsers]" Column="ID" />
</Identifier>
</ScalarOperator>
</RangeExpressions>
</Prefix>
</SeekKeys>
</SeekPredicateNew>
</SeekPredicates>
</IndexScan>
</RelOp>
</NestedLoops>
</RelOp>
<RelOp AvgRowSize="882" EstimateCPU="0.0010413" EstimateIO="0.0283102" EstimateRebinds="0" EstimateRewinds="0" EstimateRows="343.529" LogicalOp="Index Seek" NodeId="15" Parallel="false" PhysicalOp="Index Seek" EstimatedTotalSubtreeCost="0.0293515" TableCardinality="17300900">
<OutputList>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="PieceID" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="UserID" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddressID" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ProcessClass" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Name" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="CompanyName" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Address1" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Address2" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="City" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="State" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ZIP" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="EntryPoint" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Country" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Cost" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="UnitOfMeasureCode" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Weight" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Height" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Width" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Depth" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ProcessingCategory" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="DestinationCostIndicator" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Zone" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ValueOfArticle" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="CostAmountDueShipper" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="HandlingCharge" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="SignatureWaiver" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="SurchargeType" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="SurchargeAmount" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="CreationMethod" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Activated" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ProcessingStatus" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Booked" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Delivered" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="SignatureFileAvailable" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="SignatureFileRequested" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="LastModified" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="CreatedDate" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="RecordCaseNumber" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Memo" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="LastProcessingEventCheck" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="EFNumber" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="eVS" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="IsDemo" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="PermitID" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="UnitOfMeasurement_Dimensions" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ServiceTypeCode" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Type" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="BarcodeConstructCode" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ContainerID1" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ContainerType1" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ContainerID2" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ContainerType2" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ContainerID3" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ContainerType3" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ContentsIndicator" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ProcessClassEnclosed" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddress_CompanyName" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddress_Name" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddress_Address1" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddress_Address2" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddress_City" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddress_State" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddress_ZIP" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="IsCubic" />
</OutputList>
<RunTimeInformation>
<RunTimeCountersPerThread Thread="0" ActualRows="11372214" ActualEndOfScans="37593" ActualExecutions="37593" />
</RunTimeInformation>
<IndexScan Ordered="true" ScanDirection="FORWARD" ForcedIndex="false" ForceSeek="false" NoExpandHint="false">
<DefinedValues>
<DefinedValue>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="PieceID" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="UserID" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddressID" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ProcessClass" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Name" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="CompanyName" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Address1" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Address2" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="City" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="State" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ZIP" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="EntryPoint" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Country" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Cost" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="UnitOfMeasureCode" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Weight" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Height" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Width" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Depth" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ProcessingCategory" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="DestinationCostIndicator" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Zone" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ValueOfArticle" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="CostAmountDueShipper" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="HandlingCharge" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="SignatureWaiver" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="SurchargeType" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="SurchargeAmount" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="CreationMethod" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Activated" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ProcessingStatus" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Booked" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Delivered" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="SignatureFileAvailable" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="SignatureFileRequested" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="LastModified" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="CreatedDate" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="RecordCaseNumber" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Memo" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="LastProcessingEventCheck" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="EFNumber" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="eVS" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="IsDemo" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="PermitID" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="UnitOfMeasurement_Dimensions" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ServiceTypeCode" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Type" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="BarcodeConstructCode" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ContainerID1" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ContainerType1" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ContainerID2" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ContainerType2" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ContainerID3" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ContainerType3" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ContentsIndicator" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="OD_ProcessClassEnclosed" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddress_CompanyName" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddress_Name" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddress_Address1" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddress_Address2" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddress_City" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddress_State" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ReturnAddress_ZIP" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="IsCubic" />
</DefinedValue>
</DefinedValues>
<Object Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Index="[IDX_UserID_Activated_eVs_IsDemo_Type_CreatedDate]" Alias="[d]" IndexKind="NonClustered" />
<SeekPredicates>
<SeekPredicateNew>
<SeekKeys>
<Prefix ScanType="EQ">
<RangeColumns>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="UserID" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Activated" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="eVS" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="IsDemo" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="Type" />
</RangeColumns>
<RangeExpressions>
<ScalarOperator ScalarString="[MainDB].[dbo].[Users].[ID] as .[ID]">
<Identifier>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[Users]" Alias="" Column="ID" />
</Identifier>
</ScalarOperator>
<ScalarOperator ScalarString="(1)">
<Const ConstValue="(1)" />
</ScalarOperator>
<ScalarOperator ScalarString="(0)">
<Const ConstValue="(0)" />
</ScalarOperator>
<ScalarOperator ScalarString="(0)">
<Const ConstValue="(0)" />
</ScalarOperator>
<ScalarOperator ScalarString="'impb'">
<Const ConstValue="'impb'" />
</ScalarOperator>
</RangeExpressions>
</Prefix>
<StartRange ScanType="GT">
<RangeColumns>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="CreatedDate" />
</RangeColumns>
<RangeExpressions>
<ScalarOperator ScalarString="'2012-09-01 00:00:00.000'">
<Const ConstValue="'2012-09-01 00:00:00.000'" />
</ScalarOperator>
</RangeExpressions>
</StartRange>
</SeekKeys>
</SeekPredicateNew>
</SeekPredicates>
<Predicate>
<ScalarOperator ScalarString="len(rtrim(ltrim([MainDB].[dbo].[ProcessPiece_Details].[ZIP] as [d].[ZIP])))>(0)">
<Compare CompareOp="GT">
<ScalarOperator>
<Intrinsic FunctionName="len">
<ScalarOperator>
<Intrinsic FunctionName="rtrim">
<ScalarOperator>
<Intrinsic FunctionName="ltrim">
<ScalarOperator>
<Identifier>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="ZIP" />
</Identifier>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
</Intrinsic>
</ScalarOperator>
<ScalarOperator>
<Const ConstValue="(0)" />
</ScalarOperator>
</Compare>
</ScalarOperator>
</Predicate>
</IndexScan>
</RelOp>
</NestedLoops>
</RelOp>
<RelOp AvgRowSize="26" EstimateCPU="0.0001581" EstimateIO="0.003125" EstimateRebinds="342.529" EstimateRewinds="0" EstimateRows="1" LogicalOp="Clustered Index Seek" NodeId="17" Parallel="false" PhysicalOp="Clustered Index Seek" EstimatedTotalSubtreeCost="1.12448" TableCardinality="17300900">
<OutputList>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="TID" />
</OutputList>
<RunTimeInformation>
<RunTimeCountersPerThread Thread="0" ActualRows="11372214" ActualEndOfScans="0" ActualExecutions="11372214" />
</RunTimeInformation>
<IndexScan Lookup="true" Ordered="true" ScanDirection="FORWARD" ForcedIndex="false" ForceSeek="false" NoExpandHint="false">
<DefinedValues>
<DefinedValue>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="TID" />
</DefinedValue>
</DefinedValues>
<Object Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Index="[PK_Detail]" Alias="[d]" TableReferenceId="-1" IndexKind="Clustered" />
<SeekPredicates>
<SeekPredicateNew>
<SeekKeys>
<Prefix ScanType="EQ">
<RangeColumns>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="PieceID" />
</RangeColumns>
<RangeExpressions>
<ScalarOperator ScalarString="[MainDB].[dbo].[ProcessPiece_Details].[PieceID] as [d].[PieceID]">
<Identifier>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="PieceID" />
</Identifier>
</ScalarOperator>
</RangeExpressions>
</Prefix>
</SeekKeys>
</SeekPredicateNew>
</SeekPredicates>
</IndexScan>
</RelOp>
</NestedLoops>
</RelOp>
</ComputeScalar>
</RelOp>
</Hash>
</RelOp>
<RelOp AvgRowSize="34" EstimateCPU="0.0001581" EstimateIO="0.003125" EstimateRebinds="22.9425" EstimateRewinds="0" EstimateRows="1" LogicalOp="Index Seek" NodeId="35" Parallel="false" PhysicalOp="Index Seek" EstimatedTotalSubtreeCost="0.0682225" TableCardinality="15734">
<OutputList>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[MailPiece_AssociatedPieceIDs]" Alias="" Column="ChildPieceID" />
</OutputList>
<RunTimeInformation>
<RunTimeCountersPerThread Thread="0" ActualRows="36" ActualEndOfScans="4168" ActualExecutions="4168" />
</RunTimeInformation>
<IndexScan Ordered="true" ScanDirection="FORWARD" ForcedIndex="false" ForceSeek="false" NoExpandHint="false">
<DefinedValues>
<DefinedValue>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[MailPiece_AssociatedPieceIDs]" Alias="" Column="ChildPieceID" />
</DefinedValue>
</DefinedValues>
<Object Database="[MainDB]" Schema="[dbo]" Table="[MailPiece_AssociatedPieceIDs]" Index="[IX_MailPiece_AssociatedPieceIDs_WEBSITE_DHO_GetMail_Details_V3_1_TEST]" Alias="" IndexKind="NonClustered" />
<SeekPredicates>
<SeekPredicateNew>
<SeekKeys>
<Prefix ScanType="EQ">
<RangeColumns>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[MailPiece_AssociatedPieceIDs]" Alias="" Column="PieceIDAssociationType" />
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[MailPiece_AssociatedPieceIDs]" Alias="" Column="ParentPieceID" />
</RangeColumns>
<RangeExpressions>
<ScalarOperator ScalarString="'substitution'">
<Const ConstValue="'substitution'" />
</ScalarOperator>
<ScalarOperator ScalarString="[MainDB].[dbo].[ProcessPiece_Details].[PieceID] as [d].[PieceID]">
<Identifier>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d]" Column="PieceID" />
</Identifier>
</ScalarOperator>
</RangeExpressions>
</Prefix>
</SeekKeys>
</SeekPredicateNew>
</SeekPredicates>
</IndexScan>
</RelOp>
</NestedLoops>
</RelOp>
<RelOp AvgRowSize="17" EstimateCPU="0.0001581" EstimateIO="0.003125" EstimateRebinds="22.9425" EstimateRewinds="0" EstimateRows="1" LogicalOp="Clustered Index Seek" NodeId="36" Parallel="false" PhysicalOp="Clustered Index Seek" EstimatedTotalSubtreeCost="0.0754786" TableCardinality="17300900">
<OutputList>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d2]" Column="Type" />
</OutputList>
<RunTimeInformation>
<RunTimeCountersPerThread Thread="0" ActualRows="36" ActualEndOfScans="4132" ActualExecutions="4168" />
</RunTimeInformation>
<IndexScan Ordered="true" ScanDirection="FORWARD" ForcedIndex="false" ForceSeek="false" NoExpandHint="false">
<DefinedValues>
<DefinedValue>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d2]" Column="Type" />
</DefinedValue>
</DefinedValues>
<Object Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Index="[PK_Detail]" Alias="[d2]" IndexKind="Clustered" />
<SeekPredicates>
<SeekPredicateNew>
<SeekKeys>
<Prefix ScanType="EQ">
<RangeColumns>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d2]" Column="PieceID" />
</RangeColumns>
<RangeExpressions>
<ScalarOperator ScalarString="[MainDB].[dbo].[MailPiece_AssociatedPieceIDs].[ChildPieceID] as .[ChildPieceID]">
<Identifier>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[MailPiece_AssociatedPieceIDs]" Alias="" Column="ChildPieceID" />
</Identifier>
</ScalarOperator>
</RangeExpressions>
</Prefix>
</SeekKeys>
</SeekPredicateNew>
</SeekPredicates>
</IndexScan>
</RelOp>
</NestedLoops>
</RelOp>
<Predicate>
<ScalarOperator ScalarString="[MainDB].[dbo].[ProcessPiece_Details].[Type] as [d2].[Type] IS NULL OR [MainDB].[dbo].[ProcessPiece_Details].[Type] as [d2].[Type]<>'LEGACY_IMPB'">
<Logical Operation="OR">
<ScalarOperator>
<Compare CompareOp="IS">
<ScalarOperator>
<Identifier>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d2]" Column="Type" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Const ConstValue="NULL" />
</ScalarOperator>
</Compare>
</ScalarOperator>
<ScalarOperator>
<Compare CompareOp="NE">
<ScalarOperator>
<Identifier>
<ColumnReference Database="[MainDB]" Schema="[dbo]" Table="[ProcessPiece_Details]" Alias="[d2]" Column="Type" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Const ConstValue="'LEGACY_IMPB'" />
</ScalarOperator>
</Compare>
</ScalarOperator>
</Logical>
</ScalarOperator>
</Predicate>
</Filter>
</RelOp>
</ComputeScalar>
</RelOp>
</QueryPlan>
</StmtSimple>
</Statements>
</Batch>
</BatchSequence>
</ShowPlanXML>
December 8, 2014 at 2:47 pm
December 8, 2014 at 3:00 pm
FYI - 84% of the cost in the execution plan is spent in a Key lookup on the PK_Details Clustered index
December 8, 2014 at 3:13 pm
Sry, I posted that before I noticed you had identified the same thing. I am adding the field to the included columns of the NC index you recommended now.
December 8, 2014 at 3:30 pm
JeeTee,
That did the trick. My performance is now the same with or without the new column included. Thanks for all of your help.
Dave
December 9, 2014 at 12:09 pm
You probably have here the table being more index than data. The covering index helps but know the cost.... longer inserts, updates, deletes and makes maintenance plans (such as backups) run longer at take more space. It is good this solution helped but I would also in the long run look at ways to improve the overall performance if these other items I mention become on issue. On that note, NOLOCK is being dropped in future releases of sql server (you had this in your procedure). Also you had a clustered and non clustered index for the field PieceID. I am not sure this is necessary. Glad the forum helped solve your issue.
----------------------------------------------------
December 9, 2014 at 12:14 pm
Where did you read nolock is deprecated?
Not that I'm encouraging use of nolock, but I see it's deprecated in from clauses in updates and inserts, but not straight selects. Unless I'm misinterpreting this:
December 9, 2014 at 1:23 pm
MMartin1 - My next plan is to change the clustered index key to a new Identity field so I can reduce the size of the indexes.This would remove the PieceID from the clustered index.
December 9, 2014 at 2:20 pm
JeeTee (12/9/2014)
Not that I'm encouraging use of nolock, but I see it's deprecated in from clauses in updates and inserts, but not straight selects. Unless I'm misinterpreting this:
http://msdn.microsoft.com/en-us/library/ms143729.aspx%5B/quote%5D
This could be getting lost in interpretation
From http://msdn.microsoft.com/en-us/library/ms187373.aspx
It states
For UPDATE or DELETE statements: This feature will be removed in a future version of Microsoft SQL Server. Avoid using this feature in new development work, and plan to modify applications that currently use this feature.
I am not sure if that means do not include with SELECTs in all future work so I am not taking any chances. Of course this knowing that NOLOCK is not something you use in production code at all to begin with.
----------------------------------------------------
January 2, 2015 at 10:16 am
Y, so I don't know your app, but I want to caution you before you go changing your cluster. Just make sure you do some decent perf testing before you put that change into prod. I've seen ill-conceived clusters many times.
And if you do change it, then you may also need to replace it with an equal NC index.
Watch my free SQL Server Tutorials at:
http://MidnightDBA.com
Blog Author of:
DBA Rant – http://www.MidnightDBA.com/DBARant
Viewing 14 posts - 16 through 28 (of 28 total)
You must be logged in to reply to this topic. Login to reply