Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 General SQL Server Forums
 New to SQL Server Administration
 Huge Table

Author  Topic 

ahmeds08
Aged Yak Warrior

737 Posts

Posted - 2013-06-11 : 12:16:45
Dear Experts,
Need your advice on the below.

I have a table with around 100 million records and it is properly indexed.
The queries which are using this table are consuming huge CPU.
So,what are the possible ways I can tune this table.

we are on standard edition,so partitioning is not an option for me.

please help

mohammad.javeed.ahmed@gmail.com

russell
Pyro-ma-ni-yak

5072 Posts

Posted - 2013-06-11 : 14:29:50
Sounds like it is NOT properly indexed for these queries.

You'll need to examine the execution plan of the queries hogging up CPU.
Go to Top of Page

jackv
Master Smack Fu Yak Hacker

2179 Posts

Posted - 2013-06-11 : 14:58:40
Can you post the execution plan?
Typically , but not exclusively, high CPU is a result of : Hash Joins, Sorts, Filters.
Some guidance on tuning a slow running query - http://www.sqlserver-dba.com/2012/11/sql-server-how-to-troubleshoot-a-slow-running-query.html

Jack Vamvas
--------------------
http://www.sqlserver-dba.com
Go to Top of Page

ahmeds08
Aged Yak Warrior

737 Posts

Posted - 2013-06-12 : 05:09:10
Here is the query consuming huge cpu,as per the standard report the average CPU for this query is 933,165.08

SELECT
INCOMING.BUSINESSDATE,
INCOMING.DETAILKEY,
INCOMING.TICKETID,
INCOMING.DEPTID,
INCOMING.ITEMTYPE,
INCOMING.DESCRIPTION,
INCOMING.PRICE,
INCOMING.TAXTYPE,
INCOMING.TAXRATE,
INCOMING.ENTRYTIME,
INCOMING.ORDERTYPE,
INCOMING.PRINTED,
INCOMING.PRINTERGROUP,
INCOMING.ACCOUNT,
INCOMING.ITEMID,
INCOMING.COSTPRICE,
INCOMING.GUESTCOUNT,
INCOMING.APPROVEDBY,
INCOMING.ENTEREDBY,
INCOMING.DISCOUNTID,
INCOMING.MENUID
FROM POSTICKETDETAIL.DBO.TBLTICKETDETAILARCHIVE INCOMING
LEFT OUTER JOIN
POSTICKETDETAILARCHIVE.DBO.TBLTICKETDETAILARCHIVE ARCHIVE
ON
INCOMING.BUSINESSDATE = ARCHIVE.BUSINESSDATE
AND CAST(INCOMING.DEPTID AS INT) = CAST(ARCHIVE.DEPTID AS INT)
AND INCOMING.DETAILKEY = ARCHIVE.DETAILKEY
AND INCOMING.TICKETID = ARCHIVE.TICKETID
WHERE
ARCHIVE.BUSINESSDATE IS NULL
AND ARCHIVE.DEPTID IS NULL
AND ARCHIVE.DETAILKEY IS NULL
AND ARCHIVE.TICKETID IS NULL

Below 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.1746.0" xmlns="http://schemas.microsoft.com/sqlserver/2004/07/showplan">
<BatchSequence>
<Batch>
<Statements>
<StmtSimple StatementCompId="1" StatementEstRows="31056200" StatementId="1" StatementOptmLevel="FULL" StatementSubTreeCost="4726.15" StatementText="SELECT #xD;#xA; INCOMING.BUSINESSDATE, #xD;#xA; INCOMING.DETAILKEY, #xD;#xA; INCOMING.TICKETID, #xD;#xA; INCOMING.DEPTID, #xD;#xA; INCOMING.ITEMTYPE, #xD;#xA; INCOMING.DESCRIPTION, #xD;#xA; INCOMING.PRICE, #xD;#xA; INCOMING.TAXTYPE, #xD;#xA; INCOMING.TAXRATE, #xD;#xA; INCOMING.ENTRYTIME, #xD;#xA; INCOMING.ORDERTYPE, #xD;#xA; INCOMING.PRINTED, #xD;#xA; INCOMING.PRINTERGROUP, #xD;#xA; INCOMING.ACCOUNT, #xD;#xA; INCOMING.ITEMID, #xD;#xA; INCOMING.COSTPRICE, #xD;#xA; INCOMING.GUESTCOUNT, #xD;#xA; INCOMING.APPROVEDBY, #xD;#xA; INCOMING.ENTEREDBY, #xD;#xA; INCOMING.DISCOUNTID, #xD;#xA; INCOMING.MENUID#xD;#xA;FROM POSTICKETDETAIL.DBO.TBLTICKETDETAILARCHIVE INCOMING#xD;#xA;LEFT OUTER JOIN #xD;#xA; POSTICKETDETAILARCHIVE.DBO.TBLTICKETDETAILARCHIVE ARCHIVE#xD;#xA;ON #xD;#xA; INCOMING.BUSINESSDATE = ARCHIVE.BUSINESSDATE#xD;#xA; AND CAST(INCOMING.DEPTID AS INT) = CAST(ARCHIVE.DEPTID AS INT)#xD;#xA; AND INCOMING.DETAILKEY = ARCHIVE.DETAILKEY#xD;#xA; AND INCOMING.TICKETID = ARCHIVE.TICKETID#xD;#xA;WHERE #xD;#xA; ARCHIVE.BUSINESSDATE IS NULL#xD;#xA; AND ARCHIVE.DEPTID IS NULL#xD;#xA; AND ARCHIVE.DETAILKEY IS NULL#xD;#xA; AND ARCHIVE.TICKETID IS NULL#xD;#xA;" StatementType="SELECT" QueryHash="0xB7B7D919EBCCB528" QueryPlanHash="0x72A9E41D08978A28">
<StatementSetOptions ANSI_NULLS="true" ANSI_PADDING="true" ANSI_WARNINGS="true" ARITHABORT="true" CONCAT_NULL_YIELDS_NULL="true" NUMERIC_ROUNDABORT="false" QUOTED_IDENTIFIER="true" />
<QueryPlan CachedPlanSize="96" CompileTime="104" CompileCPU="34" CompileMemory="1080">
<RelOp AvgRowSize="260" EstimateCPU="148.655" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimateRows="31056200" LogicalOp="Gather Streams" NodeId="0" Parallel="true" PhysicalOp="Parallelism" EstimatedTotalSubtreeCost="4726.15">
<OutputList>
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="BUSINESSDATE" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="DETAILKEY" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="TICKETID" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="DEPTID" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="ITEMTYPE" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="DESCRIPTION" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="PRICE" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="TAXTYPE" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="TAXRATE" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="ENTRYTIME" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="ORDERTYPE" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="PRINTED" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="PRINTERGROUP" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="ACCOUNT" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="ITEMID" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="CostPrice" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="GuestCount" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="ApprovedBy" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="ENTEREDBY" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="DISCOUNTID" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="MENUID" />
</OutputList>
<Parallelism>
<RelOp AvgRowSize="260" EstimateCPU="7.66052" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimateRows="31056200" LogicalOp="Filter" NodeId="1" Parallel="true" PhysicalOp="Filter" EstimatedTotalSubtreeCost="4577.5">
<OutputList>
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="BUSINESSDATE" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="DETAILKEY" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="TICKETID" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="DEPTID" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="ITEMTYPE" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="DESCRIPTION" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="PRICE" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="TAXTYPE" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="TAXRATE" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="ENTRYTIME" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="ORDERTYPE" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="PRINTED" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="PRINTERGROUP" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="ACCOUNT" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="ITEMID" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="CostPrice" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="GuestCount" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="ApprovedBy" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="ENTEREDBY" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="DISCOUNTID" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="MENUID" />
</OutputList>
<Filter StartupExpression="false">
<RelOp AvgRowSize="284" EstimateCPU="1060.05" EstimateIO="2017.5" EstimateRebinds="0" EstimateRewinds="0" EstimateRows="31056200" LogicalOp="Right Outer Join" NodeId="2" Parallel="true" PhysicalOp="Hash Match" EstimatedTotalSubtreeCost="4569.83">
<OutputList>
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="BUSINESSDATE" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="DETAILKEY" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="TICKETID" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="DEPTID" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="ITEMTYPE" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="DESCRIPTION" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="PRICE" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="TAXTYPE" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="TAXRATE" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="ENTRYTIME" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="ORDERTYPE" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="PRINTED" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="PRINTERGROUP" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="ACCOUNT" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="ITEMID" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="CostPrice" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="GuestCount" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="ApprovedBy" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="ENTEREDBY" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="DISCOUNTID" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="MENUID" />
<ColumnReference Database="[POSTicketDetailArchive]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[ARCHIVE]" Column="BUSINESSDATE" />
<ColumnReference Database="[POSTicketDetailArchive]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[ARCHIVE]" Column="DETAILKEY" />
<ColumnReference Database="[POSTicketDetailArchive]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[ARCHIVE]" Column="TICKETID" />
<ColumnReference Database="[POSTicketDetailArchive]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[ARCHIVE]" Column="DEPTID" />
</OutputList>
<MemoryFractions Input="1" Output="1" />
<Hash>
<DefinedValues />
<HashKeysBuild>
<ColumnReference Database="[POSTicketDetailArchive]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[ARCHIVE]" Column="BUSINESSDATE" />
<ColumnReference Column="Expr1005" />
<ColumnReference Database="[POSTicketDetailArchive]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[ARCHIVE]" Column="DETAILKEY" />
<ColumnReference Database="[POSTicketDetailArchive]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[ARCHIVE]" Column="TICKETID" />
</HashKeysBuild>
<HashKeysProbe>
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="BUSINESSDATE" />
<ColumnReference Column="Expr1004" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="DETAILKEY" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="TICKETID" />
</HashKeysProbe>
<ProbeResidual>
<ScalarOperator ScalarString="[POSTicketDetail].[dbo].[tblTicketDetailArchive].[BUSINESSDATE] as [INCOMING].[BUSINESSDATE]=[POSTicketDetailArchive].[dbo].[tblTicketDetailArchive].[BUSINESSDATE] as [ARCHIVE].[BUSINESSDATE] AND [Expr1004]=[Expr1005] AND [POSTicketDetail].[dbo].[tblTicketDetailArchive].[DETAILKEY] as [INCOMING].[DETAILKEY]=[POSTicketDetailArchive].[dbo].[tblTicketDetailArchive].[DETAILKEY] as [ARCHIVE].[DETAILKEY] AND [POSTicketDetail].[dbo].[tblTicketDetailArchive].[TICKETID] as [INCOMING].[TICKETID]=[POSTicketDetailArchive].[dbo].[tblTicketDetailArchive].[TICKETID] as [ARCHIVE].[TICKETID]">
<Logical Operation="AND">
<ScalarOperator>
<Compare CompareOp="EQ">
<ScalarOperator>
<Identifier>
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="BUSINESSDATE" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Identifier>
<ColumnReference Database="[POSTicketDetailArchive]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[ARCHIVE]" Column="BUSINESSDATE" />
</Identifier>
</ScalarOperator>
</Compare>
</ScalarOperator>
<ScalarOperator>
<Compare CompareOp="EQ">
<ScalarOperator>
<Identifier>
<ColumnReference Column="Expr1004" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Identifier>
<ColumnReference Column="Expr1005" />
</Identifier>
</ScalarOperator>
</Compare>
</ScalarOperator>
<ScalarOperator>
<Compare CompareOp="EQ">
<ScalarOperator>
<Identifier>
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="DETAILKEY" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Identifier>
<ColumnReference Database="[POSTicketDetailArchive]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[ARCHIVE]" Column="DETAILKEY" />
</Identifier>
</ScalarOperator>
</Compare>
</ScalarOperator>
<ScalarOperator>
<Compare CompareOp="EQ">
<ScalarOperator>
<Identifier>
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="TICKETID" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Identifier>
<ColumnReference Database="[POSTicketDetailArchive]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[ARCHIVE]" Column="TICKETID" />
</Identifier>
</ScalarOperator>
</Compare>
</ScalarOperator>
</Logical>
</ScalarOperator>
</ProbeResidual>
<RelOp AvgRowSize="36" EstimateCPU="202.855" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimateRows="173783000" LogicalOp="Repartition Streams" NodeId="3" Parallel="true" PhysicalOp="Parallelism" EstimatedTotalSubtreeCost="688.39">
<OutputList>
<ColumnReference Database="[POSTicketDetailArchive]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[ARCHIVE]" Column="BUSINESSDATE" />
<ColumnReference Database="[POSTicketDetailArchive]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[ARCHIVE]" Column="DETAILKEY" />
<ColumnReference Database="[POSTicketDetailArchive]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[ARCHIVE]" Column="TICKETID" />
<ColumnReference Database="[POSTicketDetailArchive]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[ARCHIVE]" Column="DEPTID" />
<ColumnReference Column="Expr1005" />
</OutputList>
<Parallelism PartitioningType="Hash">
<PartitionColumns>
<ColumnReference Database="[POSTicketDetailArchive]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[ARCHIVE]" Column="BUSINESSDATE" />
<ColumnReference Column="Expr1005" />
<ColumnReference Database="[POSTicketDetailArchive]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[ARCHIVE]" Column="DETAILKEY" />
<ColumnReference Database="[POSTicketDetailArchive]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[ARCHIVE]" Column="TICKETID" />
</PartitionColumns>
<RelOp AvgRowSize="36" EstimateCPU="2.89639" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimateRows="173783000" LogicalOp="Compute Scalar" NodeId="4" Parallel="true" PhysicalOp="Compute Scalar" EstimatedTotalSubtreeCost="485.535">
<OutputList>
<ColumnReference Database="[POSTicketDetailArchive]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[ARCHIVE]" Column="BUSINESSDATE" />
<ColumnReference Database="[POSTicketDetailArchive]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[ARCHIVE]" Column="DETAILKEY" />
<ColumnReference Database="[POSTicketDetailArchive]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[ARCHIVE]" Column="TICKETID" />
<ColumnReference Database="[POSTicketDetailArchive]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[ARCHIVE]" Column="DEPTID" />
<ColumnReference Column="Expr1005" />
</OutputList>
<ComputeScalar>
<DefinedValues>
<DefinedValue>
<ColumnReference Column="Expr1005" />
<ScalarOperator ScalarString="CONVERT(int,[POSTicketDetailArchive].[dbo].[tblTicketDetailArchive].[DEPTID] as [ARCHIVE].[DEPTID],0)">
<Convert DataType="int" Style="0" Implicit="false">
<ScalarOperator>
<Identifier>
<ColumnReference Database="[POSTicketDetailArchive]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[ARCHIVE]" Column="DEPTID" />
</Identifier>
</ScalarOperator>
</Convert>
</ScalarOperator>
</DefinedValue>
</DefinedValues>
<RelOp AvgRowSize="32" EstimateCPU="31.8603" EstimateIO="450.778" EstimateRebinds="0" EstimateRewinds="0" EstimateRows="173783000" LogicalOp="Index Scan" NodeId="5" Parallel="true" PhysicalOp="Index Scan" EstimatedTotalSubtreeCost="482.638" TableCardinality="173783000">
<OutputList>
<ColumnReference Database="[POSTicketDetailArchive]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[ARCHIVE]" Column="BUSINESSDATE" />
<ColumnReference Database="[POSTicketDetailArchive]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[ARCHIVE]" Column="DETAILKEY" />
<ColumnReference Database="[POSTicketDetailArchive]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[ARCHIVE]" Column="TICKETID" />
<ColumnReference Database="[POSTicketDetailArchive]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[ARCHIVE]" Column="DEPTID" />
</OutputList>
<IndexScan Ordered="false" ForcedIndex="false" ForceSeek="false" NoExpandHint="false">
<DefinedValues>
<DefinedValue>
<ColumnReference Database="[POSTicketDetailArchive]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[ARCHIVE]" Column="BUSINESSDATE" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[POSTicketDetailArchive]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[ARCHIVE]" Column="DETAILKEY" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[POSTicketDetailArchive]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[ARCHIVE]" Column="TICKETID" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[POSTicketDetailArchive]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[ARCHIVE]" Column="DEPTID" />
</DefinedValue>
</DefinedValues>
<Object Database="[POSTicketDetailArchive]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Index="[FK_tblTicketDetailArchive_tblDayClosings]" Alias="[ARCHIVE]" IndexKind="NonClustered" />
</IndexScan>
</RelOp>
</ComputeScalar>
</RelOp>
</Parallelism>
</RelOp>
<RelOp AvgRowSize="264" EstimateCPU="160.204" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimateRows="31056200" LogicalOp="Repartition Streams" NodeId="9" Parallel="true" PhysicalOp="Parallelism" EstimatedTotalSubtreeCost="803.893">
<OutputList>
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="BUSINESSDATE" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="DETAILKEY" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="TICKETID" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="DEPTID" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="ITEMTYPE" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="DESCRIPTION" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="PRICE" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="TAXTYPE" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="TAXRATE" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="ENTRYTIME" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="ORDERTYPE" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="PRINTED" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="PRINTERGROUP" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="ACCOUNT" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="ITEMID" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="CostPrice" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="GuestCount" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="ApprovedBy" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="ENTEREDBY" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="DISCOUNTID" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="MENUID" />
<ColumnReference Column="Expr1004" />
</OutputList>
<Parallelism PartitioningType="Hash">
<PartitionColumns>
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="BUSINESSDATE" />
<ColumnReference Column="Expr1004" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="DETAILKEY" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="TICKETID" />
</PartitionColumns>
<RelOp AvgRowSize="264" EstimateCPU="0.517603" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimateRows="31056200" LogicalOp="Compute Scalar" NodeId="10" Parallel="true" PhysicalOp="Compute Scalar" EstimatedTotalSubtreeCost="643.688">
<OutputList>
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="BUSINESSDATE" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="DETAILKEY" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="TICKETID" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="DEPTID" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="ITEMTYPE" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="DESCRIPTION" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="PRICE" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="TAXTYPE" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="TAXRATE" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="ENTRYTIME" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="ORDERTYPE" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="PRINTED" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="PRINTERGROUP" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="ACCOUNT" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="ITEMID" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="CostPrice" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="GuestCount" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="ApprovedBy" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="ENTEREDBY" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="DISCOUNTID" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="MENUID" />
<ColumnReference Column="Expr1004" />
</OutputList>
<ComputeScalar>
<DefinedValues>
<DefinedValue>
<ColumnReference Column="Expr1004" />
<ScalarOperator ScalarString="CONVERT(int,[POSTicketDetail].[dbo].[tblTicketDetailArchive].[DEPTID] as [INCOMING].[DEPTID],0)">
<Convert DataType="int" Style="0" Implicit="false">
<ScalarOperator>
<Identifier>
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="DEPTID" />
</Identifier>
</ScalarOperator>
</Convert>
</ScalarOperator>
</DefinedValue>
</DefinedValues>
<RelOp AvgRowSize="260" EstimateCPU="5.69365" EstimateIO="637.477" EstimateRebinds="0" EstimateRewinds="0" EstimateRows="31056200" LogicalOp="Clustered Index Scan" NodeId="11" Parallel="true" PhysicalOp="Clustered Index Scan" EstimatedTotalSubtreeCost="643.171" TableCardinality="31056200">
<OutputList>
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="BUSINESSDATE" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="DETAILKEY" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="TICKETID" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="DEPTID" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="ITEMTYPE" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="DESCRIPTION" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="PRICE" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="TAXTYPE" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="TAXRATE" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="ENTRYTIME" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="ORDERTYPE" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="PRINTED" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="PRINTERGROUP" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="ACCOUNT" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="ITEMID" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="CostPrice" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="GuestCount" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="ApprovedBy" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="ENTEREDBY" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="DISCOUNTID" />
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="MENUID" />
</OutputList>
<IndexScan Ordered="false" ForcedIndex="false" NoExpandHint="false">
<DefinedValues>
<DefinedValue>
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="BUSINESSDATE" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="DETAILKEY" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="TICKETID" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="DEPTID" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="ITEMTYPE" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="DESCRIPTION" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="PRICE" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="TAXTYPE" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="TAXRATE" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="ENTRYTIME" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="ORDERTYPE" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="PRINTED" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="PRINTERGROUP" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="ACCOUNT" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="ITEMID" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="CostPrice" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="GuestCount" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="ApprovedBy" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="ENTEREDBY" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="DISCOUNTID" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[INCOMING]" Column="MENUID" />
</DefinedValue>
</DefinedValues>
<Object Database="[POSTicketDetail]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Index="[PK_tblTicketDetailArchive]" Alias="[INCOMING]" IndexKind="Clustered" />
</IndexScan>
</RelOp>
</ComputeScalar>
</RelOp>
</Parallelism>
</RelOp>
</Hash>
</RelOp>
<Predicate>
<ScalarOperator ScalarString="[POSTicketDetailArchive].[dbo].[tblTicketDetailArchive].[BUSINESSDATE] as [ARCHIVE].[BUSINESSDATE] IS NULL AND [POSTicketDetailArchive].[dbo].[tblTicketDetailArchive].[DEPTID] as [ARCHIVE].[DEPTID] IS NULL AND [POSTicketDetailArchive].[dbo].[tblTicketDetailArchive].[DETAILKEY] as [ARCHIVE].[DETAILKEY] IS NULL AND [POSTicketDetailArchive].[dbo].[tblTicketDetailArchive].[TICKETID] as [ARCHIVE].[TICKETID] IS NULL">
<Logical Operation="AND">
<ScalarOperator>
<Compare CompareOp="IS">
<ScalarOperator>
<Identifier>
<ColumnReference Database="[POSTicketDetailArchive]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[ARCHIVE]" Column="BUSINESSDATE" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Const ConstValue="NULL" />
</ScalarOperator>
</Compare>
</ScalarOperator>
<ScalarOperator>
<Compare CompareOp="IS">
<ScalarOperator>
<Identifier>
<ColumnReference Database="[POSTicketDetailArchive]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[ARCHIVE]" Column="DEPTID" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Const ConstValue="NULL" />
</ScalarOperator>
</Compare>
</ScalarOperator>
<ScalarOperator>
<Compare CompareOp="IS">
<ScalarOperator>
<Identifier>
<ColumnReference Database="[POSTicketDetailArchive]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[ARCHIVE]" Column="DETAILKEY" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Const ConstValue="NULL" />
</ScalarOperator>
</Compare>
</ScalarOperator>
<ScalarOperator>
<Compare CompareOp="IS">
<ScalarOperator>
<Identifier>
<ColumnReference Database="[POSTicketDetailArchive]" Schema="[dbo]" Table="[tblTicketDetailArchive]" Alias="[ARCHIVE]" Column="TICKETID" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Const ConstValue="NULL" />
</ScalarOperator>
</Compare>
</ScalarOperator>
</Logical>
</ScalarOperator>
</Predicate>
</Filter>
</RelOp>
</Parallelism>
</RelOp>
</QueryPlan>
</StmtSimple>
</Statements>
</Batch>
</BatchSequence>
</ShowPlanXML>

mohammad.javeed.ahmed@gmail.com
Go to Top of Page
   

- Advertisement -