February 13, 2016 at 2:01 pm
We have some scripts worked out by development for purging old unnecessary data but it's extremely slow for this one table in particular. Some of the related tables ( related to Address ) such as work_queue_item and Service_Request are quite large. I'm thinking there must be a better way to do this. My latest attempt was to gather address_id's that are "deletable" into a temp table, then loop through that but the initial temp table load is very slow and deleting one at a time in the loop runs at about 10k deleted every 45 minutes.
[/code="sql"]
SELECT TOP ( 20000 )
ADDRESS_ID
FROM DBO.ADDRESS
WHERE ADDRESS.ADDRESS_ID IN (
SELECT ADDRESS.address_id
FROM ADDRESS
LEFT OUTER JOIN EARLY_PAYOFF_INFO EPI1 ON EPI1.ADDRESS_ID = ADDRESS.ADDRESS_ID
LEFT OUTER JOIN EARLY_PAYOFF_INFO EPI2 ON EPI2.ADDRESS_ID1 = ADDRESS.ADDRESS_ID
LEFT OUTER JOIN EARLY_PAYOFF_INFO EPI3 ON EPI3.ADDRESS_ID2 = ADDRESS.ADDRESS_ID
LEFT OUTER JOIN CHECK_REQUEST_DEFAULT_ADDRESS ON CHECK_REQUEST_DEFAULT_ADDRESS.ADDRESS_ID = ADDRESS.ADDRESS_ID
LEFT OUTER JOIN DIRECT_LENDING_SERVICE ON DIRECT_LENDING_SERVICE.PREV_LIENHOLDER_MAIL_TO_ADDRESS_ID = ADDRESS.ADDRESS_ID
LEFT OUTER JOIN PACKET ON PACKET.ADDRESS_ID = ADDRESS.ADDRESS_ID
LEFT OUTER JOIN WORK_QUEUE_ITEM ON WORK_QUEUE_ITEM.ADDRESS_ID = ADDRESS.ADDRESS_ID
LEFT OUTER JOIN LEGAL_ENTITY ON LEGAL_ENTITY.ADDRESS_ID = ADDRESS.ADDRESS_ID
LEFT OUTER JOIN SERVICE_REQUEST ON SERVICE_REQUEST.ADDRESS_ID = ADDRESS.ADDRESS_ID
LEFT OUTER JOIN LIENHOLDER ON LIENHOLDER.ADDRESS_ID = ADDRESS.ADDRESS_ID
WHERE EPI1.EARLY_PAYOFF_INFO_ID IS NULL
AND EPI2.EARLY_PAYOFF_INFO_ID IS NULL
AND EPI3.EARLY_PAYOFF_INFO_ID IS NULL
AND CHECK_REQUEST_DEFAULT_ADDRESS.CHECK_REQUEST_DEFAULT_ADDRESS_ID IS NULL
AND DIRECT_LENDING_SERVICE.DIRECT_LENDING_SERVICE_ID IS NULL
AND WORK_QUEUE_ITEM.ADDRESS_ID IS NULL
AND PACKET.PACKET_ID IS NULL
AND LEGAL_ENTITY.LEGAL_ENTITY_ID IS NULL
AND SERVICE_REQUEST.SERVICE_REQUEST_ID IS NULL
AND LIENHOLDER.ADDRESS_ID IS NULL ) ORDER BY ADDRESS_ID
[/code]
February 13, 2016 at 2:39 pm
Please post definitions including indexes and constraints for all tables involved.
There are no special teachers of virtue, because virtue is taught by the whole community.
--Plato
February 13, 2016 at 3:11 pm
I suspect all the joins in the sub-query will not do the query plan much good.
It will probably be best to create a temp table with all the IDs to keep which, assuming no addresses are being added, can then be reused.
Something like:
CREATE TABLE #Keep
(
Address_ID int NOT NULL PRIMARY KEY
);
WITH KeepIDs
AS
(
SELECT Address_ID
FROM
(
SELECT Address_ID AS ID1, Address_ID1 AS ID2, Address_ID2 AS ID3
FROM EARLY_PAYOFF_INFO
) A
UNPIVOT
(
Address_ID FOR Address_IDs IN (ID1, ID2, ID3)
) U
UNION ALL
SELECT Address_ID FROM CHECK_REQUEST_DEFAULT_ADDRESS WHERE Address_ID IS NOT NULL
UNION ALL
SELECT Address_ID FROM DIRECT_LENDING_SERVICE WHERE Address_ID IS NOT NULL
UNION ALL
SELECT Address_ID FROM PACKET WHERE Address_ID IS NOT NULL
UNION ALL
SELECT Address_ID FROM WORK_QUEUE_ITEM WHERE Address_ID IS NOT NULL
UNION ALL
SELECT Address_ID FROM LEGAL_ENTITY WHERE Address_ID IS NOT NULL
UNION ALL
SELECT Address_ID FROM SERVICE_REQUEST WHERE Address_ID IS NOT NULL
UNION ALL
SELECT Address_ID FROM LIENHOLDER WHERE Address_ID IS NOT NULL
)
INSERT INTO #Keep
SELECT DISTINCT Address_ID
FROM KeepIDs;
SELECT TOP (20000) A.Address_ID
FROM dbo.[Address] A
WHERE NOT EXISTS
(
SELECT 1
FROM #Keep K
WHERE K.Address_ID = A.Address_ID
);
If you want to purge while the system is in use then life becomes more complicated but your original script did not allow for this.
February 13, 2016 at 3:29 pm
Created13 February 2016 14:13
COLL Database
Tables
[dbo].[ADDRESS]
[dbo].[CHECK_REQUEST_DEFAULT_ADDRESS]
[dbo].[DIRECT_LENDING_SERVICE]
[dbo].[EARLY_PAYOFF_INFO]
[dbo].[LEGAL_ENTITY]
[dbo].[LIENHOLDER]
[dbo].[PACKET]
[dbo].[SERVICE_REQUEST]
[dbo].[WORK_QUEUE_ITEM]
prodserver
Databases(1)
• COLL__XXX
Server Properties
PropertyValue
ProductMicrosoft SQL Server
Version11.0.3350.0
LanguageEnglish (United States)
PlatformNT x64
EditionEnterprise Edition: Core-based Licensing (64-bit)
Processors64
OS Version6.1 (7601)
Physical Memory524275
Is ClusteredTrue
Root Directoryc:\Program Files\Microsoft SQL Server\MSSQL11.MSSQLSERVER\MSSQL
CollationSQL_Latin1_General_CP1_CI_AS
Server Settings
PropertyValue
Default data file pathG:\Microsoft SQL Server\MSSQL.1\MSSQL\DATADefault backup file pathG:\Microsoft SQL Server\MSSQL.1\MSSQL\Backup
Default log file pathG:\Microsoft SQL Server\MSSQL.1\MSSQL\DATARecovery Interval (minutes)0
Default index fill factor90
Default backup media retention0
Compress BackupTrue
Advanced Server Settings
PropertyValue
Full text upgrade option2
Locks0
Nested triggers enabledTrue
Allow triggers to fire othersTrue
Default languageEnglish
Network packet size4096
Default fulltext language LCID1033
Two-digit year cutoff2049
Remote login timeout10
Cursor threshold-1
Max text replication size65536
Parallelism cost threshold5
Scan for startup procsFalse
Transform noise wordsFalse
Blocked process threshold0
Filestream access levelFalse
Optimize for ad hoc workloadsTrue
User databases
Databases(1)
• COLL__XXX
COLL__XXX Database
Database Properties
PropertyValue
SQL Server VersionSQL Server 2012
Compatibility LevelSQL Server 2012
Database Encryption EnabledFalse
Last backup time02/13/2016
Last log backup time02/13/2016
Creation dateMay 20 2012
Users82
Database size5335453.00 MB
Unallocated space392405.48 MB
Database Options
PropertyValue
Compatibility Level110
Database collationSQL_Latin1_General_CP1_CI_AS
Restrict accessMULTI_USER
Is read-onlyFalse
Auto closeFalse
Auto shrinkFalse
Database statusONLINE
In standbyFalse
Cleanly shutdownFalse
Supplemental logging enabledFalse
Snapshot isolation stateOFF
Read committed snapshot onTrue
Recovery modelFULL
Page verify optionCHECKSUM
Auto create statisticsTrue
Auto update statisticsTrue
Auto update statistics asynchronouslyTrue
ANSI NULL defaultFalse
ANSI NULL enabledFalse
ANSI padding enabledFalse
ANSI warnings enabledFalse
Arithmetic abort enabledFalse
Concatenating NULL yields NULLFalse
Numeric roundabort enabledFalse
Quoted Identifier OnFalse
Recursive triggers enabledFalse
Close cursors on commitFalse
Local cursors by defaultFalse
Fulltext enabledTrue
TrustworthyTrue
Database chainingFalse
Forced parameterizationTrue
Master key encrypted by serverFalse
PublishedFalse
SubscribedFalse
Merge publishedFalse
Is distribution databaseFalse
Sync with backupFalse
Service broker GUID717b6c14-8006-4d30-a9d8-233eef465bb6
Service broker enabledFalse
Log reuse waitNOTHING
Date correlationFalse
CDC enabledFalse
EncryptedFalse
Honor broker priorityFalse
Default languageEnglish
Default fulltext language LCID1033
Nested triggers enabledTrue
Transform noise wordsFalse
Two-digit year cutoff2049
ContainmentNONE
Target recovery time0
Database ownersa
Files
NameTypeFile GroupSizeFile Name
COLL__xxxData882.40 GBK:\collmgr_data5\Data\COLL__XXX.mdf
COLL__xxx_logLog184.00 GBK:\collmgr_log\log\COLL__xxx_log.LDF
FdiDataDataFdiFileGroup2.00 MBK:\collmgr_data5\Data\COLL__XXX_FdiData.ndf
NmacDataDataNmacFileGroup270.00 MBK:\collmgr_data5\Data\COLL__XXX_NmacData.ndf
ChaseDataDataChaseFileGroup175.00 MBK:\collmgr_data5\Data\COLL__XXX_ChaseData.ndf
FordDataDataFordFileGroup70.00 MBK:\collmgr_data5\Data\COLL__XXX_FordData.ndf
CM_DataFile_01DataCM_Data191.30 GBK:\collmgr_data1\CM_DataFile_01.ndf
CM_DataFile_02DataCM_Data178.30 GBK:\collmgr_data2\CM_DataFile_02.ndf
CM_DataFile_03DataCM_Data180.30 GBK:\collmgr_data3\CM_DataFile_03.ndf
CM_DataFile_04DataCM_Data181.30 GBK:\collmgr_data4\CM_DataFile_04.ndf
CM_IdxFile_04DataCM_Index236.19 GBK:\collmgr_index1\CM_IdxFile_04.ndf
CM_IdxFile_03DataCM_Index219.42 GBK:\collmgr_index2\CM_IdxFile_03.ndf
CM_IdxFile_02DataCM_Index222.42 GBK:\collmgr_index3\CM_IdxFile_02.ndf
CM_IdxFile_01DataCM_Index227.30 GBK:\collmgr_index4\CM_IdxFile_01.ndf
CM_LogFile_01DataCM_Log67.13 GBK:\collmgr_data1\CM_LogFile_01.ndf
CM_LogFile_02DataCM_Log58.13 GBK:\collmgr_data2\CM_LogFile_02.ndf
CM_LogFile_03DataCM_Log61.13 GBK:\collmgr_data3\CM_LogFile_03.ndf
CM_LogFile_04DataCM_Log64.13 GBK:\collmgr_data4\CM_LogFile_04.ndf
CM_LogIdx_04DataCM_Log_Index133.89 GBK:\collmgr_index1\CM_LogIdx_04.ndf
CM_LogIdx_03DataCM_Log_Index99.59 GBK:\collmgr_index2\CM_LogIdx_03.ndf
CM_LogIdx_02DataCM_Log_Index105.48 GBK:\collmgr_index3\CM_LogIdx_02.ndf
CM_LogIdx_01DataCM_Log_Index113.36 GBK:\collmgr_index4\CM_LogIdx_01.ndf
CM_DataFile_06DataCM_Data181.30 GBK:\collmgr_data6\CM_DataFile_06.ndf
CM_DataFile_07DataCM_Data185.30 GBK:\collmgr_data7\CM_DataFile_07.ndf
CM_DataFile_08DataCM_Data188.30 GBK:\collmgr_data8\CM_DataFile_08.ndf
CM_DataFile_09DataCM_Data189.30 GBK:\collmgr_data9\CM_DataFile_09.ndf
CM_IdxFile_05DataCM_Index221.42 GBK:\collmgr_index5\CM_IdxFile_05.ndf
CM_IdxFile_06DataCM_Index228.42 GBK:\collmgr_index6\CM_IdxFile_06.ndf
CM_DataFile_10DataCM_Data191.30 GBK:\collmgr_data5\Data\CM_DataFile_10.ndf
CM_DataFile_11DataCM_Data193.30 GBK:\collmgr_data5\Data\CM_DataFile_11.ndf
CM_IdxFile_07DataCM_Index225.42 GBK:\collmgr_index1\CM_IdxFile_07.ndf
Tables
Objects
Name
dbo.ADDRESS
dbo.CHECK_REQUEST_DEFAULT_ADDRESS
dbo.DIRECT_LENDING_SERVICE
dbo.EARLY_PAYOFF_INFO
dbo.LEGAL_ENTITY
dbo.LIENHOLDER
dbo.PACKET
dbo.SERVICE_REQUEST
dbo.WORK_QUEUE_ITEM
[dbo].[ADDRESS]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
File GroupCM_Data
Row Count (~)497918570
Created3:25:22 PM Friday, August 6, 2004
Last Modified2:21:25 PM Sunday, October 14, 2012
Columns
KeyNameData TypeMax Length (Bytes)Allow NullsIdentityDefault
ADDRESS_IDint4False1 - 1
LAST_MODIFIERint4False
LAST_MOD_DATE_TIMEdatetime8False
TRANS_SEQ_NUMsmallint2False
ADDRESS_LINE_1varchar(50)50True
ADDRESS_LINE_2varchar(50)50True
CITYvarchar(30)30True
STATEvarchar(15)15True
POSTAL_CODEvarchar(10)10True
COUNTYvarchar(30)30True
COUNTRYvarchar(24)24True
ADDRESS_LINE_3varchar(50)50True
ADDRESS_LINE_4varchar(50)50True
MAILING_NAME_2varchar(100)100True
MAILING_NAME_1varchar(100)100True
IS_FDIbit1False((0))
Indexes
KeyNameColumnsUniqueFill FactorFile Group
ADDRESS_PKADDRESS_IDTrue100CM_Data
_dta_index_ADDRESS_16_1570104634__K8_K1STATE, ADDRESS_ID90CM_Index
SQL Script
CREATE TABLE [dbo].[ADDRESS]
(
[ADDRESS_ID] [int] NOT NULL IDENTITY(1, 1),
[LAST_MODIFIER] [int] NOT NULL,
[LAST_MOD_DATE_TIME] [datetime] NOT NULL,
[TRANS_SEQ_NUM] [smallint] NOT NULL,
[ADDRESS_LINE_1] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ADDRESS_LINE_2] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[CITY] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[STATE] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[POSTAL_CODE] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[COUNTY] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[COUNTRY] [varchar] (24) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ADDRESS_LINE_3] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ADDRESS_LINE_4] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[MAILING_NAME_2] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[MAILING_NAME_1] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[IS_FDI] [bit] NOT NULL CONSTRAINT [DF__ADDRESS__IS_FDI__22FFFAA8] DEFAULT ((0))
) ON [CM_Data]
GO
ALTER TABLE [dbo].[ADDRESS] ADD CONSTRAINT [ADDRESS_PK] PRIMARY KEY CLUSTERED ([ADDRESS_ID]) ON [CM_Data]
GO
CREATE NONCLUSTERED INDEX [_dta_index_ADDRESS_16_1570104634__K8_K1] ON [dbo].[ADDRESS] ([STATE], [ADDRESS_ID]) ON [CM_Index]
GO
Used By
[dbo].[CHECK_REQUEST_DEFAULT_ADDRESS]
[dbo].[DIRECT_LENDING_SERVICE]
[dbo].[EARLY_PAYOFF_INFO]
[dbo].[LEGAL_ENTITY]
[dbo].[LIENHOLDER]
[dbo].[PACKET]
[dbo].[SERVICE_REQUEST]
[dbo].[WORK_QUEUE_ITEM]
[dbo].[vAccountCollateralGroup]
[dbo].[CHECK_REQUEST_DEFAULT_ADDRESS]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
Row Count (~)6866
Created6:54:54 PM Friday, May 11, 2007
Last Modified10:16:58 PM Thursday, January 21, 2016
Columns
KeyNameData TypeMax Length (Bytes)Allow NullsIdentity
CHECK_REQUEST_DEFAULT_ADDRESS_IDint4False1 - 1
STATE_PROVINCE_IDint4False
ADDRESS_IDint4False
COUNTYvarchar(30)30True
REQUEST_TYPEvarchar(30)30True
LAST_MOD_DATE_TIMEdatetime8False
LAST_MODIFIERint4False
DEFAULT_AMOUNTdecimal(9,2)5True
TRANS_SEQ_NUMsmallint2False
ACTIVITY_NAMEvarchar(100)100True
REQUEST_TRANSACTION_TYPEvarchar(60)60True
DUP_AMOUNTdecimal(9,2)5True
Indexes
KeyNameColumnsUniqueFill Factor
CHECK_REQUEST_-DEFAULT_ADDRESS_PKCHECK_REQUEST_DEFAULT_ADDRESS_IDTrue
CHECK_REQUEST_-DEFAULT_ADDRESS_UC1REQUEST_TRANSACTION_TYPE, REQUEST_TYPE, ACTIVITY_NAME, STATE_PROVINCE_ID, COUNTYTrue90
idx_addressADDRESS_ID90
Foreign Keys
NameColumns
ADDRESS_CHECK_REQUEST_DEFAULT_ADDRESS_-FK1ADDRESS_ID->[dbo].[ADDRESS].[ADDRESS_ID]
STATE_PROVINCE_CHECK_REQUEST_DEFAULT_-ADDRESS_FK1STATE_PROVINCE_ID->[dbo].[STATE_PROVINCE].[STATE_-PROVINCE_ID]
SQL Script
CREATE TABLE [dbo].[CHECK_REQUEST_DEFAULT_ADDRESS]
(
[CHECK_REQUEST_DEFAULT_ADDRESS_ID] [int] NOT NULL IDENTITY(1, 1),
[STATE_PROVINCE_ID] [int] NOT NULL,
[ADDRESS_ID] [int] NOT NULL,
[COUNTY] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[REQUEST_TYPE] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[LAST_MOD_DATE_TIME] [datetime] NOT NULL,
[LAST_MODIFIER] [int] NOT NULL,
[DEFAULT_AMOUNT] [decimal] (9, 2) NULL,
[TRANS_SEQ_NUM] [smallint] NOT NULL,
[ACTIVITY_NAME] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[REQUEST_TRANSACTION_TYPE] [varchar] (60) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[DUP_AMOUNT] [decimal] (9, 2) NULL
) ON [PRIMARY]
GO
ALTER TABLE [dbo].[CHECK_REQUEST_DEFAULT_ADDRESS] ADD CONSTRAINT [CHECK_REQUEST_DEFAULT_-ADDRESS_PK] PRIMARY KEY CLUSTERED ([CHECK_REQUEST_DEFAULT_ADDRESS_ID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[CHECK_REQUEST_DEFAULT_ADDRESS] ADD CONSTRAINT [CHECK_REQUEST_DEFAULT_-ADDRESS_UC1] UNIQUE NONCLUSTERED ([REQUEST_TRANSACTION_TYPE], [REQUEST_TYPE], [ACTIVITY_NAME], [STATE_PROVINCE_ID], [COUNTY]) ON [PRIMARY]
GO
CREATE NONCLUSTERED INDEX [idx_address] ON [dbo].[CHECK_REQUEST_DEFAULT_ADDRESS] ([ADDRESS_ID]) ON [PRIMARY]
GO
ALTER TABLE [dbo].[CHECK_REQUEST_DEFAULT_ADDRESS] ADD CONSTRAINT [ADDRESS_CHECK_REQUEST_-DEFAULT_ADDRESS_FK1] FOREIGN KEY ([ADDRESS_ID]) REFERENCES [dbo].[ADDRESS] ([ADDRESS_ID])
GO
ALTER TABLE [dbo].[CHECK_REQUEST_DEFAULT_ADDRESS] ADD CONSTRAINT [STATE_PROVINCE_CHECK_-REQUEST_DEFAULT_ADDRESS_FK1] FOREIGN KEY ([STATE_PROVINCE_ID]) REFERENCES [dbo].[STATE_-PROVINCE] ([STATE_PROVINCE_ID])
GO
Uses
[dbo].[ADDRESS]
[dbo].[STATE_PROVINCE]
[dbo].[DIRECT_LENDING_SERVICE]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
File GroupCM_Data
Row Count (~)767898
Created7:59:05 PM Friday, October 30, 2009
Last Modified11:15:43 PM Thursday, September 17, 2015
Columns
KeyNameData TypeMax Length (Bytes)Allow NullsIdentityDefault
LAST_MOD_DATE_TIMEdatetime8False
LAST_MODIFIERint4False
TRANS_SEQ_NUMsmallint2False
DIRECT_LENDING_SERVICE_IDint4False1 - 1
(2)SERVICE_REQUEST_IDint4False
PREV_LIENHOLDER_MAIL_TO_ADDRESS_-IDint4True
PACKET_IDint4True
SLA_START_DATEdatetime8True
SLA_END_DATEdatetime8True
IS_ADD_DELETE_REQUIREDbit1False
IS_DUPLICATE_REQUIREDbit1False
DUP_EXTERNAL_CHECK_NUMvarchar(20)20True
LP_EXTERNAL_CHECK_NUMvarchar(20)20True
PREV_SLA_START_DATEdatetime8True
DMV_MAIL_DATEdatetime8True
EXTENDED_SERVICE_START_DATEdatetime8True
SLA_WORK_DAYSint4True
DMV_REJECT_COUNTint4True
THIRD_PARTY_REQUEST_COUNTint4False
NAME_CHANGE_NAMESvarchar(300)300True
CURRENT_EXCEPTION_TYPEvarchar(30)30True
EEE_RESUME_DATEdatetime8True
PREV_SLA_END_DATEdatetime8True
IS_IN_FORCED_PLACEMENTbit1False((0))
EXCEPTION_INITIATED_DATEdatetime8True
CLIENT_IDint4False
PAI_DATEdatetime8True
COUNTYvarchar(30)30True
Indexes
KeyNameColumnsUniqueFill FactorFile Group
DIRECT_LENDING_SERVICE_PKDIRECT_LENDING_SERVICE_IDTrue90CM_-Data
TITLING_SERVICE_UC1SERVICE_REQUEST_IDTrue90CM_-Index
idx_PREV_LIENHOLDER_MAIL_TO_-ADDRESSPREV_LIENHOLDER_MAIL_TO_-ADDRESS_ID90CM_-Index
index_DIRECT_LENDING_SERVICE_-CLIENT_IDCLIENT_ID90CM_-Index
index_Direct_Lending_Service_Packet_ID_-Service_Request_idSERVICE_REQUEST_ID, PACKET_-ID90CM_-Index
Foreign Keys
NameColumns
DIRECT_LENDING_-SERVICE_organization_FK1CLIENT_ID->[dbo].[ORGANIZATION].[ORGANIZATION_ID]
PACKET_TITLING_SERVICE_FK1PACKET_ID->[dbo].[PACKET].[PACKET_ID]
ADDRESS_TITLING_SERVICE_FK1PREV_LIENHOLDER_MAIL_TO_ADDRESS_ID->[dbo].[ADDRESS].[ADDRESS_ID]
SQL Script
CREATE TABLE [dbo].[DIRECT_LENDING_SERVICE]
(
[LAST_MOD_DATE_TIME] [datetime] NOT NULL,
[LAST_MODIFIER] [int] NOT NULL,
[TRANS_SEQ_NUM] [smallint] NOT NULL,
[DIRECT_LENDING_SERVICE_ID] [int] NOT NULL IDENTITY(1, 1),
[SERVICE_REQUEST_ID] [int] NOT NULL,
[PREV_LIENHOLDER_MAIL_TO_ADDRESS_ID] [int] NULL,
[PACKET_ID] [int] NULL,
[SLA_START_DATE] [datetime] NULL,
[SLA_END_DATE] [datetime] NULL,
[IS_ADD_DELETE_REQUIRED] [bit] NOT NULL,
[IS_DUPLICATE_REQUIRED] [bit] NOT NULL,
[DUP_EXTERNAL_CHECK_NUM] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[LP_EXTERNAL_CHECK_NUM] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[PREV_SLA_START_DATE] [datetime] NULL,
[DMV_MAIL_DATE] [datetime] NULL,
[EXTENDED_SERVICE_START_DATE] [datetime] NULL,
[SLA_WORK_DAYS] [int] NULL,
[DMV_REJECT_COUNT] [int] NULL,
[THIRD_PARTY_REQUEST_COUNT] [int] NOT NULL,
[NAME_CHANGE_NAMES] [varchar] (300) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[CURRENT_EXCEPTION_TYPE] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[EEE_RESUME_DATE] [datetime] NULL,
[PREV_SLA_END_DATE] [datetime] NULL,
[IS_IN_FORCED_PLACEMENT] [bit] NOT NULL CONSTRAINT [DF__DIRECT_LE__IS_IN__7DD962F1] DEFAULT ((0)),
[EXCEPTION_INITIATED_DATE] [datetime] NULL,
[CLIENT_ID] [int] NOT NULL,
[PAI_DATE] [datetime] NULL,
[COUNTY] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [CM_Data]
GO
ALTER TABLE [dbo].[DIRECT_LENDING_SERVICE] ADD CONSTRAINT [DIRECT_LENDING_SERVICE_PK] PRIMARY KEY CLUSTERED ([DIRECT_LENDING_SERVICE_ID]) ON [CM_Data]
GO
ALTER TABLE [dbo].[DIRECT_LENDING_SERVICE] ADD CONSTRAINT [TITLING_SERVICE_UC1] UNIQUE NONCLUSTERED ([SERVICE_REQUEST_ID]) ON [CM_Index]
GO
CREATE NONCLUSTERED INDEX [index_DIRECT_LENDING_SERVICE_CLIENT_ID] ON [dbo].[DIRECT_-LENDING_SERVICE] ([CLIENT_ID]) ON [CM_Index]
GO
CREATE NONCLUSTERED INDEX [index_Direct_Lending_Service_Packet_ID_Service_Request_id] ON [dbo].[DIRECT_LENDING_SERVICE] ([PACKET_ID]) INCLUDE ([SERVICE_REQUEST_ID]) ON [CM_Index]
GO
CREATE NONCLUSTERED INDEX [idx_PREV_LIENHOLDER_MAIL_TO_ADDRESS] ON [dbo].[DIRECT_-LENDING_SERVICE] ([PREV_LIENHOLDER_MAIL_TO_ADDRESS_ID]) ON [CM_Index]
GO
ALTER TABLE [dbo].[DIRECT_LENDING_SERVICE] ADD CONSTRAINT [DIRECT_LENDING_-SERVICE_organization_FK1] FOREIGN KEY ([CLIENT_ID]) REFERENCES [dbo].[ORGANIZATION] ([ORGANIZATION_ID])
GO
ALTER TABLE [dbo].[DIRECT_LENDING_SERVICE] ADD CONSTRAINT [PACKET_TITLING_SERVICE_FK1] FOREIGN KEY ([PACKET_ID]) REFERENCES [dbo].[PACKET] ([PACKET_ID])
GO
ALTER TABLE [dbo].[DIRECT_LENDING_SERVICE] ADD CONSTRAINT [ADDRESS_TITLING_SERVICE_FK1] FOREIGN KEY ([PREV_LIENHOLDER_MAIL_TO_ADDRESS_ID]) REFERENCES [dbo].[ADDRESS] ([ADDRESS_-ID])
GO
Uses
[dbo].[ADDRESS]
[dbo].[ORGANIZATION]
[dbo].[PACKET]
[dbo].[EARLY_PAYOFF_INFO]
Properties
PropertyValue
File GroupCM_Data
Row Count (~)762790
Created8:21:18 PM Monday, March 19, 2012
Last Modified6:00:51 PM Thursday, September 19, 2013
Columns
KeyNameData TypeMax Length (Bytes)Allow NullsIdentity
EARLY_PAYOFF_INFO_IDint4False1 - 1
COLLATERAL_GROUP_REQUESTSERVICE_-REQUEST_IDint4False
ADDRESS_IDint4True
ADDRESS_ID1int4True
ADDRESS_ID2int4True
LAST_MODIFIERint4False
LAST_MOD_DATE_TIMEdatetime8False
TRANS_SEQ_NUMsmallint2False
CONTRACT_DATEdatetime8True
COVERAGE_TERMint4True
A_H_AMOUNTdecimal(10,2)9True
GAP_AMOUNTdecimal(10,2)9True
CREDIT_LIFE_AMOUNTdecimal(10,2)9True
REFUND_AMOUNTdecimal(10,2)9True
ACTIVEbit1False
Indexes
KeyNameColumnsUniqueFill FactorFile Group
EARLY_PAYOFF_INFO_PKEARLY_PAYOFF_INFO_IDTrue90CM_-Data
EarlyPayoffInfo_Collateral-GroupRequestIdCOLLATERAL_GROUP_REQUESTSERVICE_-REQUEST_ID90CM_-Index
Foreign Keys
NameColumns
ADDRESS_EARLY_PAYOFF_-INFO_FK1ADDRESS_ID->[dbo].[ADDRESS].[ADDRESS_ID]
ADDRESS_EARLY_PAYOFF_-INFO_FK2ADDRESS_ID1->[dbo].[ADDRESS].[ADDRESS_ID]
ADDRESS_EARLY_PAYOFF_-INFO_FK3ADDRESS_ID2->[dbo].[ADDRESS].[ADDRESS_ID]
SERVICE_REQUEST_EARLY_-PAYOFF_INFO_FK1COLLATERAL_GROUP_REQUESTSERVICE_REQUEST_ID->[dbo].[SERVICE_-REQUEST].[SERVICE_REQUEST_ID]
SQL Script
CREATE TABLE [dbo].[EARLY_PAYOFF_INFO]
(
[EARLY_PAYOFF_INFO_ID] [int] NOT NULL IDENTITY(1, 1),
[COLLATERAL_GROUP_REQUESTSERVICE_REQUEST_ID] [int] NOT NULL,
[ADDRESS_ID] [int] NULL,
[ADDRESS_ID1] [int] NULL,
[ADDRESS_ID2] [int] NULL,
[LAST_MODIFIER] [int] NOT NULL,
[LAST_MOD_DATE_TIME] [datetime] NOT NULL,
[TRANS_SEQ_NUM] [smallint] NOT NULL,
[CONTRACT_DATE] [datetime] NULL,
[COVERAGE_TERM] [int] NULL,
[A_H_AMOUNT] [decimal] (10, 2) NULL,
[GAP_AMOUNT] [decimal] (10, 2) NULL,
[CREDIT_LIFE_AMOUNT] [decimal] (10, 2) NULL,
[REFUND_AMOUNT] [decimal] (10, 2) NULL,
[ACTIVE] [bit] NOT NULL
) ON [CM_Data]
GO
ALTER TABLE [dbo].[EARLY_PAYOFF_INFO] ADD CONSTRAINT [EARLY_PAYOFF_INFO_PK] PRIMARY KEY CLUSTERED ([EARLY_PAYOFF_INFO_ID]) ON [CM_Data]
GO
CREATE NONCLUSTERED INDEX [EarlyPayoffInfo_CollateralGroupRequestId] ON [dbo].[EARLY_-PAYOFF_INFO] ([COLLATERAL_GROUP_REQUESTSERVICE_REQUEST_ID]) ON [CM_Index]
GO
ALTER TABLE [dbo].[EARLY_PAYOFF_INFO] ADD CONSTRAINT [ADDRESS_EARLY_PAYOFF_INFO_FK1] FOREIGN KEY ([ADDRESS_ID]) REFERENCES [dbo].[ADDRESS] ([ADDRESS_ID])
GO
ALTER TABLE [dbo].[EARLY_PAYOFF_INFO] ADD CONSTRAINT [ADDRESS_EARLY_PAYOFF_INFO_FK2] FOREIGN KEY ([ADDRESS_ID1]) REFERENCES [dbo].[ADDRESS] ([ADDRESS_ID])
GO
ALTER TABLE [dbo].[EARLY_PAYOFF_INFO] ADD CONSTRAINT [ADDRESS_EARLY_PAYOFF_INFO_FK3] FOREIGN KEY ([ADDRESS_ID2]) REFERENCES [dbo].[ADDRESS] ([ADDRESS_ID])
GO
ALTER TABLE [dbo].[EARLY_PAYOFF_INFO] ADD CONSTRAINT [SERVICE_REQUEST_EARLY_PAYOFF_INFO_-FK1] FOREIGN KEY ([COLLATERAL_GROUP_REQUESTSERVICE_REQUEST_ID]) REFERENCES [dbo].[SERVICE_REQUEST] ([SERVICE_REQUEST_ID])
GO
Uses
[dbo].[ADDRESS]
[dbo].[SERVICE_REQUEST]
[dbo].[LEGAL_ENTITY]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
File GroupCM_Data
Row Count (~)498676481
Created6:28:07 AM Sunday, October 14, 2012
Last Modified7:08:09 AM Sunday, July 13, 2014
Columns
KeyNameData TypePersistedComputedMax Length (Bytes)Allow NullsIdentity
LEGAL_ENTITY_IDint4False1 - 1
LAST_MODIFIERint4False
LAST_MOD_DATE_TIMEdatetime8False
TRANS_SEQ_NUMsmallint2False
TITLING_AGENCY_IDint4True
CONCRETE_TYPEvarchar(150)150False
ACCOUNT_IDint4True
MIDDLE_NAMEvarchar(30)30True
RECORDED_LEGAL_ENTITY_TYPEvarchar(8)8True
FIRST_NAMEvarchar(30)30True
LAST_NAMEvarchar(30)30True
ADDRESS_IDint4True
PRECEDENCEsmallint2True
HOME_TELEPHONEvarchar(15)15True
OWNERSHIP_DOC_IDint4True
BUSINESS_TELEPHONEvarchar(15)15True
ACCOUNT_DATA_IDint4True
SERVICE_CENTER_CODEchar(3)3True
(2)FULL_NAMEvarchar(100)100False
CONJUNCTIONvarchar(3)3True
IS_LESSEEbit1True
SUFFIXvarchar(10)10True
CONTACT_TELEPHONEvarchar(15)15True
BUSINESS_FAXvarchar(15)15True
CREATED_DATE_TIMEdatetime8False
NOTEvarchar(max)maxTrue
(3) CLIENTORGANIZATION_IDint4True
(2)ENTITY_CODEvarchar(10)10True
ENTITY_TYPEvarchar(25)25True
CONTACT_NAMEvarchar(100)100True
EMAIL_ADDRESSvarchar(100)100True
DEALERSHIP_TYPEvarchar(100)100True
ENTITY_STATUSvarchar(25)25True
SALUTATIONvarchar(10)10True
(2) COLLATERAL_GROUP_-REQUESTSERVICE_REQUEST_IDint4True
XML_SERIALIZED_INSTANCE_IDint4True
NORMALIZED_ENTITY_CODEvarchar(10)TrueTrue10True
FOLLOW_UP_LAST_CALL_DATEdatetime8True
FOLLOW_UP_LAST_LETTER_DATEdatetime8True
Computed columns
NameColumn definition
NORMALIZED_ENTITY_CODE(right('0000000000'+ltrim(rtrim([ENTITY_CODE])),(10)))
Indexes
KeyNameColumnsUniqueFill FactorFile Group
LEGAL_ENTITY_PK_2LEGAL_ENTITY_IDTrue100CM_-Data
index_LEGAL_ENTITY_ID_-REQUEST_IDFULL_NAME, ENTITY_CODE, LEGAL_ENTITY_ID, COLLATERAL_GROUP_REQUESTSERVICE_-REQUEST_ID90CM_-Index
index_LEGAL_ENTITY_-TITLING_AGENCY_IDTITLING_AGENCY_ID90CM_-Index
index_LEGAL_ENTITY_-XML_SERIALIZED_-INSTANCE_IDXML_SERIALIZED_INSTANCE_ID90CM_-Index
index_LegalEntity_Account-DataIdACCOUNT_DATA_ID90CM_-Index
index_LegalEntity_AccountIdACCOUNT_ID90CM_-Index
index_LegalEntity_Address-IdADDRESS_ID90CM_-Index
index_LegalEntity_ClientId_-NormalizedEntityCodeCLIENTORGANIZATION_ID, NORMALIZED_ENTITY_-CODE90CM_-Index
index_LegalEntity_Client-OrganizationIdCLIENTORGANIZATION_ID90CM_-Index
index_LegalEntity_-CollateralGroupRequest-ServiceRequestIdCOLLATERAL_GROUP_REQUESTSERVICE_-REQUEST_ID90CM_-Index
index_LegalEntity_Concrete-Type_ClientIdCONCRETE_TYPE, CLIENTORGANIZATION_ID90CM_-Data
index_LegalEntity_Entity-CodeENTITY_CODE90CM_-Index
index_LegalEntity_Entity-TypeENTITY_TYPE90CM_-Index
index_LegalEntity_FullNameFULL_NAME90CM_-Data
index_LegalEntity_-OwnershipDocIdOWNERSHIP_DOC_ID90CM_-Index
Check Constraints
NameOn ColumnConstraint
LEGAL_ENTITYENTITY_-STATUS_ChkENTITY_-STATUS([ENTITY_STATUS]='INACTIVE' OR [ENTITY_STATUS]='ACTIVE')
LEGAL_ENTITYENTITY_-TYPE_ChkENTITY_-TYPE([ENTITY_TYPE]='OTHER' OR [ENTITY_TYPE]='PREVIOUS_-LIENHOLDER' OR [ENTITY_TYPE]='DEALER')
Foreign Keys
NameNo CheckColumns
ACCOUNT_DATA_LEGAL_-ENTITY_FK1ACCOUNT_DATA_ID->[dbo].[ACCOUNT_DATA].[ACCOUNT_DATA_ID]
ACCOUNT_LEGAL_ENTITY_FK1ACCOUNT_ID->[dbo].[ACCOUNT].[ACCOUNT_ID]
ADDRESS_LEGAL_ENTITY_FK1ADDRESS_ID->[dbo].[ADDRESS].[ADDRESS_ID]
ORGANIZATION_LEGAL_-ENTITY_FK1CLIENTORGANIZATION_ID->[dbo].[ORGANIZATION].[ORGANIZATION_ID]
SERVICE_REQUEST_LEGAL_-ENTITY_FK1COLLATERAL_GROUP_REQUESTSERVICE_REQUEST_ID->[dbo].[SERVICE_REQUEST].[SERVICE_REQUEST_ID]
OWNERSHIP_DOC_LEGAL_-ENTITY_FK1OWNERSHIP_DOC_ID->[dbo].[OWNERSHIP_DOC].[OWNERSHIP_DOC_ID]
TITLING_AGENCY_LEGAL_-ENTITY_FK1TrueTITLING_AGENCY_ID->[dbo].[TITLING_AGENCY].[TITLING_AGENCY_ID]
XML_SERIALIZED_INSTANCE_-LEGAL_ENTITY_FK1XML_SERIALIZED_INSTANCE_ID->[dbo].[XML_SERIALIZED_-INSTANCE].[XML_SERIALIZED_INSTANCE_ID]
SQL Script
CREATE TABLE [dbo].[LEGAL_ENTITY]
(
[LEGAL_ENTITY_ID] [int] NOT NULL IDENTITY(1, 1),
[LAST_MODIFIER] [int] NOT NULL,
[LAST_MOD_DATE_TIME] [datetime] NOT NULL,
[TRANS_SEQ_NUM] [smallint] NOT NULL,
[TITLING_AGENCY_ID] [int] NULL,
[CONCRETE_TYPE] [varchar] (150) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[ACCOUNT_ID] [int] NULL,
[MIDDLE_NAME] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[RECORDED_LEGAL_ENTITY_TYPE] [varchar] (8) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[FIRST_NAME] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[LAST_NAME] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ADDRESS_ID] [int] NULL,
[PRECEDENCE] [smallint] NULL,
[HOME_TELEPHONE] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[OWNERSHIP_DOC_ID] [int] NULL,
[BUSINESS_TELEPHONE] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ACCOUNT_DATA_ID] [int] NULL,
[SERVICE_CENTER_CODE] [char] (3) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[FULL_NAME] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[CONJUNCTION] [varchar] (3) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[IS_LESSEE] [bit] NULL,
[SUFFIX] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[CONTACT_TELEPHONE] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[BUSINESS_FAX] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[CREATED_DATE_TIME] [datetime] NOT NULL,
[varchar] (max) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[CLIENTORGANIZATION_ID] [int] NULL,
[ENTITY_CODE] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ENTITY_TYPE] [varchar] (25) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[CONTACT_NAME] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[EMAIL_ADDRESS] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[DEALERSHIP_TYPE] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ENTITY_STATUS] [varchar] (25) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[SALUTATION] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[COLLATERAL_GROUP_REQUESTSERVICE_REQUEST_ID] [int] NULL,
[XML_SERIALIZED_INSTANCE_ID] [int] NULL,
[NORMALIZED_ENTITY_CODE] AS (right('0000000000'+ltrim(rtrim([ENTITY_CODE])),(10))) PERSISTED,
[FOLLOW_UP_LAST_CALL_DATE] [datetime] NULL,
[FOLLOW_UP_LAST_LETTER_DATE] [datetime] NULL
) ON [CM_Data] TEXTIMAGE_ON [CM_Data]
GO
ALTER TABLE [dbo].[LEGAL_ENTITY] ADD CONSTRAINT [LEGAL_ENTITYENTITY_STATUS_Chk] CHECK (([ENTITY_STATUS]='INACTIVE' OR [ENTITY_STATUS]='ACTIVE'))
GO
ALTER TABLE [dbo].[LEGAL_ENTITY] ADD CONSTRAINT [LEGAL_ENTITYENTITY_TYPE_Chk] CHECK (([ENTITY_TYPE]='OTHER' OR [ENTITY_TYPE]='PREVIOUS_LIENHOLDER' OR [ENTITY_-TYPE]='DEALER'))
GO
ALTER TABLE [dbo].[LEGAL_ENTITY] ADD CONSTRAINT [LEGAL_ENTITY_PK_2] PRIMARY KEY CLUSTERED ([LEGAL_ENTITY_ID]) ON [CM_Data]
GO
CREATE NONCLUSTERED INDEX [index_LegalEntity_AccountDataId] ON [dbo].[LEGAL_ENTITY] ([ACCOUNT_DATA_ID]) ON [CM_Index]
GO
CREATE NONCLUSTERED INDEX [index_LegalEntity_AccountId] ON [dbo].[LEGAL_ENTITY] ([ACCOUNT_ID]) ON [CM_Index]
GO
CREATE NONCLUSTERED INDEX [index_LegalEntity_AddressId] ON [dbo].[LEGAL_ENTITY] ([ADDRESS_ID]) ON [CM_Index]
GO
CREATE NONCLUSTERED INDEX [index_LegalEntity_ClientOrganizationId] ON [dbo].[LEGAL_-ENTITY] ([CLIENTORGANIZATION_ID]) ON [CM_Index]
GO
CREATE NONCLUSTERED INDEX [index_LegalEntity_ClientId_NormalizedEntityCode] ON [dbo].[LEGAL_ENTITY] ([CLIENTORGANIZATION_ID], [NORMALIZED_ENTITY_CODE]) ON [CM_Index]
GO
CREATE NONCLUSTERED INDEX [index_LegalEntity_CollateralGroupRequestServiceRequestId] ON [dbo].[LEGAL_ENTITY] ([COLLATERAL_GROUP_REQUESTSERVICE_REQUEST_ID]) ON [CM_Index]
GO
CREATE NONCLUSTERED INDEX [index_LegalEntity_ConcreteType_ClientId] ON [dbo].[LEGAL_-ENTITY] ([CONCRETE_TYPE], [CLIENTORGANIZATION_ID]) ON [CM_Data]
GO
CREATE NONCLUSTERED INDEX [index_LegalEntity_EntityCode] ON [dbo].[LEGAL_ENTITY] ([ENTITY_CODE]) ON [CM_Index]
GO
CREATE NONCLUSTERED INDEX [index_LegalEntity_EntityType] ON [dbo].[LEGAL_ENTITY] ([ENTITY_TYPE]) ON [CM_Index]
GO
CREATE NONCLUSTERED INDEX [index_LegalEntity_FullName] ON [dbo].[LEGAL_ENTITY] ([FULL_-NAME]) ON [CM_Data]
GO
CREATE NONCLUSTERED INDEX [index_LEGAL_ENTITY_ID_REQUEST_ID] ON [dbo].[LEGAL_ENTITY] ([LEGAL_ENTITY_ID], [COLLATERAL_GROUP_REQUESTSERVICE_REQUEST_ID]) INCLUDE ([ENTITY_CODE], [FULL_NAME]) ON [CM_Index]
GO
CREATE NONCLUSTERED INDEX [index_LegalEntity_OwnershipDocId] ON [dbo].[LEGAL_ENTITY] ([OWNERSHIP_DOC_ID]) ON [CM_Index]
GO
CREATE NONCLUSTERED INDEX [index_LEGAL_ENTITY_TITLING_AGENCY_ID] ON [dbo].[LEGAL_ENTITY] ([TITLING_AGENCY_ID]) ON [CM_Index]
GO
CREATE NONCLUSTERED INDEX [index_LEGAL_ENTITY_XML_SERIALIZED_INSTANCE_ID] ON [dbo].[LEGAL_ENTITY] ([XML_SERIALIZED_INSTANCE_ID]) ON [CM_Index]
GO
ALTER TABLE [dbo].[LEGAL_ENTITY] ADD CONSTRAINT [ACCOUNT_DATA_LEGAL_ENTITY_FK1] FOREIGN KEY ([ACCOUNT_DATA_ID]) REFERENCES [dbo].[ACCOUNT_DATA] ([ACCOUNT_DATA_ID])
GO
ALTER TABLE [dbo].[LEGAL_ENTITY] ADD CONSTRAINT [ACCOUNT_LEGAL_ENTITY_FK1] FOREIGN KEY ([ACCOUNT_ID]) REFERENCES [dbo].[ACCOUNT] ([ACCOUNT_ID])
GO
ALTER TABLE [dbo].[LEGAL_ENTITY] ADD CONSTRAINT [ADDRESS_LEGAL_ENTITY_FK1] FOREIGN KEY ([ADDRESS_ID]) REFERENCES [dbo].[ADDRESS] ([ADDRESS_ID])
GO
ALTER TABLE [dbo].[LEGAL_ENTITY] ADD CONSTRAINT [ORGANIZATION_LEGAL_ENTITY_FK1] FOREIGN KEY ([CLIENTORGANIZATION_ID]) REFERENCES [dbo].[ORGANIZATION] ([ORGANIZATION_ID])
GO
ALTER TABLE [dbo].[LEGAL_ENTITY] ADD CONSTRAINT [SERVICE_REQUEST_LEGAL_ENTITY_FK1] FOREIGN KEY ([COLLATERAL_GROUP_REQUESTSERVICE_REQUEST_ID]) REFERENCES [dbo].[SERVICE_-REQUEST] ([SERVICE_REQUEST_ID])
GO
ALTER TABLE [dbo].[LEGAL_ENTITY] ADD CONSTRAINT [OWNERSHIP_DOC_LEGAL_ENTITY_FK1] FOREIGN KEY ([OWNERSHIP_DOC_ID]) REFERENCES [dbo].[OWNERSHIP_DOC] ([OWNERSHIP_DOC_ID])
GO
ALTER TABLE [dbo].[LEGAL_ENTITY] WITH NOCHECK ADD CONSTRAINT [TITLING_AGENCY_LEGAL_-ENTITY_FK1] FOREIGN KEY ([TITLING_AGENCY_ID]) REFERENCES [dbo].[TITLING_AGENCY] ([TITLING_AGENCY_ID])
GO
ALTER TABLE [dbo].[LEGAL_ENTITY] ADD CONSTRAINT [XML_SERIALIZED_INSTANCE_LEGAL_ENTITY_-FK1] FOREIGN KEY ([XML_SERIALIZED_INSTANCE_ID]) REFERENCES [dbo].[XML_SERIALIZED_-INSTANCE] ([XML_SERIALIZED_INSTANCE_ID])
GO
Uses
[dbo].[ACCOUNT]
[dbo].[ACCOUNT_DATA]
[dbo].[ADDRESS]
[dbo].[ORGANIZATION]
[dbo].[OWNERSHIP_DOC]
[dbo].[SERVICE_REQUEST]
[dbo].[TITLING_AGENCY]
[dbo].[XML_SERIALIZED_INSTANCE]
Used By
[dbo].[ACCOUNT_DATA]
[dbo].[CALL_STATUS]
[dbo].[SERVICE_REQUEST]
[dbo].[usp_ConvertDealers]
[dbo].[usp_GetChryslerCPUploadDataMonthly]
[dbo].[usp_GetDowneyUploadDataMonthly]
[dbo].[usp_GetDriveFinUploadDataMonthly]
[dbo].[usp_GetFifthThirdUploadDataMonthly]
[dbo].[usp_GetFranklinUploadDataMonthly]
[dbo].[vAccountCollateralGroup]
[dbo].[LIENHOLDER]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
File GroupCM_Data
Row Count (~)105988226
Created3:25:08 PM Friday, August 6, 2004
Last Modified6:41:57 PM Thursday, September 18, 2014
Columns
KeyNameData TypeMax Length (Bytes)Allow NullsIdentity
LIENHOLDER_IDint4False1 - 1
LAST_MODIFIERint4False
LAST_MOD_DATE_TIMEdatetime8False
TRANS_SEQ_NUMsmallint2False
ADDRESS_IDint4True
LIENHOLDER_NAMEvarchar(50)50True
LIENHOLDER_IDENTIFIERvarchar(16)16True
FEDERAL_EMPLOYER_ID_NUMBERchar(10)10True
FEDERAL_EMPLOYER_ID_NUMBER_SUFFIXvarchar(16)16True
DMV_ESCROW_ACCOUNT_NUMBERvarchar(30)30True
LOCATION_CODEvarchar(10)10True
Indexes
KeyNameColumnsUniqueFill FactorFile Group
LIENHOLDER_PKLIENHOLDER_IDTrue100CM_Data
_dta_index_LIENHOLDER_5_1413580074__K5ADDRESS_ID90CM_Data
index_Lienholder_LienholderIdentifierLIENHOLDER_IDENTIFIER90CM_Index
Foreign Keys
NameColumns
ADDRESS_LIENHOLDER_FK1ADDRESS_ID->[dbo].[ADDRESS].[ADDRESS_ID]
SQL Script
CREATE TABLE [dbo].[LIENHOLDER]
(
[LIENHOLDER_ID] [int] NOT NULL IDENTITY(1, 1),
[LAST_MODIFIER] [int] NOT NULL,
[LAST_MOD_DATE_TIME] [datetime] NOT NULL,
[TRANS_SEQ_NUM] [smallint] NOT NULL,
[ADDRESS_ID] [int] NULL,
[LIENHOLDER_NAME] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[LIENHOLDER_IDENTIFIER] [varchar] (16) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[FEDERAL_EMPLOYER_ID_NUMBER] [char] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[FEDERAL_EMPLOYER_ID_NUMBER_SUFFIX] [varchar] (16) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[DMV_ESCROW_ACCOUNT_NUMBER] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[LOCATION_CODE] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [CM_Data]
GO
ALTER TABLE [dbo].[LIENHOLDER] ADD CONSTRAINT [LIENHOLDER_PK] PRIMARY KEY CLUSTERED ([LIENHOLDER_ID]) ON [CM_Data]
GO
CREATE NONCLUSTERED INDEX [_dta_index_LIENHOLDER_5_1413580074__K5] ON [dbo].[LIENHOLDER] ([ADDRESS_ID]) ON [CM_Data]
GO
CREATE NONCLUSTERED INDEX [index_Lienholder_LienholderIdentifier] ON [dbo].[LIENHOLDER] ([LIENHOLDER_IDENTIFIER]) ON [CM_Index]
GO
ALTER TABLE [dbo].[LIENHOLDER] ADD CONSTRAINT [ADDRESS_LIENHOLDER_FK1] FOREIGN KEY ([ADDRESS_ID]) REFERENCES [dbo].[ADDRESS] ([ADDRESS_ID])
GO
Uses
[dbo].[ADDRESS]
Used By
[dbo].[RECORDED_LIEN]
[dbo].[fdi_GetBillingEntries]
[dbo].[vAccountCollateralGroup]
[dbo].[PACKET]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
File GroupCM_Data
Row Count (~)2589192
Created7:59:04 PM Friday, October 30, 2009
Last Modified11:15:45 PM Thursday, September 17, 2015
Columns
KeyNameData TypeMax Length (Bytes)Allow NullsIdentity
PACKET_IDint4False1 - 1
LAST_MOD_DATE_TIMEdatetime8False
LAST_MODIFIERint4False
TRANS_SEQ_NUMsmallint2False
COMPLETE_DATE_TIMEdatetime8True
MAILED_DATETIMEdatetime8True
PACKET_CATEGORY_IDint4False
CREATED_DATE_TIMEdatetime8False
ACCOUNT_IDint4True
CONCRETE_TYPEvarchar(150)150False
TRACKING_NUMBERvarchar(50)50True
ADDRESS_IDint4True
BUSINESS_OBJECT_STATUSvarchar(7)7True
DOCUMENT_LOCATIONvarchar(30)30True
BATCH_NUMBERvarchar(25)25True
BATCHFACILITYTRANSFER_IDint4True
MAIL_CARRIERvarchar(40)40True
Indexes
KeyNameColumnsUniqueFill FactorFile Group
PACKET_PKPACKET_IDTrue90CM_Data
idx_addressADDRESS_ID90CM_Index
index_Packet_AccountIdACCOUNT_ID90CM_Index
Foreign Keys
NameColumns
ACCOUNT_PACKET_FK1ACCOUNT_ID->[dbo].[ACCOUNT].[ACCOUNT_ID]
ADDRESS_PACKET_FK1ADDRESS_ID->[dbo].[ADDRESS].[ADDRESS_ID]
BATCHFACILITYTRANSFER_FK3BATCHFACILITYTRANSFER_ID->[dbo].[BATCHFACILITYTRANSFER].[BATCHFACILITYTRANSFER_ID]
PACKET_CATEGORY_PACKET_-FK1PACKET_CATEGORY_ID->[dbo].[PACKET_CATEGORY].[PACKET_CATEGORY_ID]
SQL Script
CREATE TABLE [dbo].[PACKET]
(
[PACKET_ID] [int] NOT NULL IDENTITY(1, 1),
[LAST_MOD_DATE_TIME] [datetime] NOT NULL,
[LAST_MODIFIER] [int] NOT NULL,
[TRANS_SEQ_NUM] [smallint] NOT NULL,
[COMPLETE_DATE_TIME] [datetime] NULL,
[MAILED_DATETIME] [datetime] NULL,
[PACKET_CATEGORY_ID] [int] NOT NULL,
[CREATED_DATE_TIME] [datetime] NOT NULL,
[ACCOUNT_ID] [int] NULL,
[CONCRETE_TYPE] [varchar] (150) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[TRACKING_NUMBER] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ADDRESS_ID] [int] NULL,
[BUSINESS_OBJECT_STATUS] [varchar] (7) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[DOCUMENT_LOCATION] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[BATCH_NUMBER] [varchar] (25) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[BATCHFACILITYTRANSFER_ID] [int] NULL,
[MAIL_CARRIER] [varchar] (40) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [CM_Data]
GO
ALTER TABLE [dbo].[PACKET] ADD CONSTRAINT [PACKET_PK] PRIMARY KEY CLUSTERED ([PACKET_-ID]) ON [CM_Data]
GO
CREATE NONCLUSTERED INDEX [index_Packet_AccountId] ON [dbo].[PACKET] ([ACCOUNT_ID]) ON [CM_Index]
GO
CREATE NONCLUSTERED INDEX [idx_address] ON [dbo].[PACKET] ([ADDRESS_ID]) ON [CM_Index]
GO
ALTER TABLE [dbo].[PACKET] ADD CONSTRAINT [ACCOUNT_PACKET_FK1] FOREIGN KEY ([ACCOUNT_ID]) REFERENCES [dbo].[ACCOUNT] ([ACCOUNT_ID])
GO
ALTER TABLE [dbo].[PACKET] ADD CONSTRAINT [ADDRESS_PACKET_FK1] FOREIGN KEY ([ADDRESS_ID]) REFERENCES [dbo].[ADDRESS] ([ADDRESS_ID])
GO
ALTER TABLE [dbo].[PACKET] ADD CONSTRAINT [BATCHFACILITYTRANSFER_FK3] FOREIGN KEY ([BATCHFACILITYTRANSFER_ID]) REFERENCES [dbo].[BATCHFACILITYTRANSFER] ([BATCHFACILITYTRANSFER_ID])
GO
ALTER TABLE [dbo].[PACKET] ADD CONSTRAINT [PACKET_CATEGORY_PACKET_FK1] FOREIGN KEY ([PACKET_CATEGORY_ID]) REFERENCES [dbo].[PACKET_CATEGORY] ([PACKET_CATEGORY_ID])
GO
Uses
[dbo].[ACCOUNT]
[dbo].[ADDRESS]
[dbo].[BATCHFACILITYTRANSFER]
[dbo].[PACKET_CATEGORY]
Used By
[dbo].[DIRECT_LENDING_SERVICE]
[dbo].[DLS_DOCUMENT_FORM_REPLACEMENT]
[dbo].[DLS_THIRD_PARTY_REQUIRED_DOCUMENTS]
[dbo].[DOCUMENT]
[dbo].[DOCUMENT_FORM_VALUE]
[dbo].[DOCUMENT_LETTER_VALUE]
[dbo].[EVENT]
[dbo].[PACKET_ADDITIONAL_CONDITION]
[dbo].[PACKET_CONDITION_USER_PROMPT]
[dbo].[SERVICE_REQUEST]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
File GroupCM_Log
Row Count (~)89047728
Created9:08:37 PM Tuesday, May 31, 2005
Last Modified10:16:09 PM Thursday, December 17, 2015
Columns
KeyNameData TypeMax Length (Bytes)Allow NullsIdentityDefault
(13)SERVICE_REQUEST_IDint4False1 - 1
(14) BUSINESS_PROCESS_STATUSvarchar(10)10False
VIRGINIA_CUSTOMER_SERVICE_CENTER_IDint4True
TITLING_AGENCY_LIENHOLDER_IDint4True
(10)CONCRETE_TYPEvarchar(150)150False
USR_IDint4False
LAST_MOD_DATE_TIMEdatetime8False
LAST_MODIFIERint4False
TRANS_SEQ_NUMsmallint2False
(2)RECORDED_REQUEST_DATEsmalldatetime4False
REQUEST_MECHANISM_TYPEvarchar(8)8True
CREATED_DATE_TIMEdatetime8False
(5)REQUEST_TRANSACTION_TYPEvarchar(60)60True
ADDRESS_IDint4True
IS_EXPEDITEDbit1True
RESEARCH_QUESTIONvarchar(173)173True
REQUEST_CATEGORYvarchar(30)30False
XML_SERIALIZED_INSTANCE_IDint4True
(9)LAST_EXPORT_TO_STATE_DATEdatetime8True
(8)LAST_STATE_RESPONSE_DATEdatetime8True
STATE_CLOSED_DATEdatetime8True
LAST_STATE_RESPONSE_CODEvarchar(120)120True
REJECTION_NOTEvarchar(200)200True
IS_REASSIGNEDbit1True
PORTFOLIO_TRANSFER_NAMEvarchar(50)50True
TRANSFER_TO_TITLING_AGENCY_-LIENHOLDER_IDint4True
(8) LIENHOLDER_PERFORMING_LIEN_FILING_-IDint4True
VEHICLE_TYPEvarchar(30)30True
DOCUMENT_NUMBERvarchar(30)30True
NUMBER_OF_MEMO_TITLESsmallint2True
OHIO_CONTROL_NUMBERvarchar(9)9True
DISPOSITION_CODEchar(1)1True
NEW_YORK_LIEN_FILING_TRANSACTION_-TYPEvarchar(30)30True
LIEN_RELEASE_SEQUENCE_NUMBERsmallint2True
MAKEvarchar(25)25True
YEARchar(4)4True
MANUFACTURER_IDvarchar(30)30True
ELECTRONIC_TITLES_TO_TRANSFER_-PER_DAYint4True
FINANCED_DATEdatetime8True
TITLE_NUMBERvarchar(30)30True
OHIO_CONTROL_NUMBER1varchar(9)9True
NUMBER_OF_OPEN_LIENSsmallint2True
PARENT_SERVICE_REQUEST_IDint4True
PREVIOUS_SERVICE_REQUEST_IDint4True
(3)SERVICE_REQUEST_STATUSvarchar(40)40True
SPECIAL_MAIL_HANDLING_INSTRUCTIONSvarchar(200)200True
MAIL_CARRIERvarchar(40)40True
(2) CLIENT_IDint4True
IS_ON_HOLD_INDEFINITELYbit1True
(7) PRINT_REQUEST_IDint4True
ACTION_DATEdatetime8True
DUPLICATE_TITLE_REQUEST_REASONvarchar(30)30True
(2) FDI_DEPARTMENT_IDint4True
JURISDICTION_IDint4True
ELT_RESPONSE_ERRORERROR_IDint4True
TRANSFERRED_OWNERSHIP_DOC_IDint4True
ACCOUNT_IMPORT_ERRORERROR_IDint4True
TRANSFERRED_ACCOUNT_IDint4True
COLLATERAL_GROUP_STATUSvarchar(50)50True
XML_DOCUMENT_DATAtextmaxTrue
IS_EXPEDITED_FROM_VAULTbit1True
IS_CONFIRM_RECEIPTbit1True
CHECK_REPORT_IDint4True
MANUFACTURER_ID1varchar(30)30True
BUYERS_NAMEvarchar(60)60True
DEALER_REPORT_NUMBERvarchar(10)10True
DATE_OF_SALEsmalldatetime4True
RECEIPT_NUMBERvarchar(30)30True
DMV_FEES_COLLECTEDdecimal(9,2)5True
IS_USEDbit1True
CALIFORNIA_TRANSMITTAL_FORMXML_-SERIALIZED_INSTANCE_IDint4True
AMOUNTdecimal(9,2)5True
AMOUNT_BILLEDdecimal(9,2)5True
CHECK_NUMBERvarchar(10)10True
PAYEE_NAMEvarchar(50)50True
IS_RELEASE_DUE_TO_INSURANCE_LOSSbit1True
IS_LETTERS_PRINTEDbit1True
LAST_SERVICE_REQUEST_STATUS_-CHANGE_DATE_TIMEdatetime8True
IS_NOTARY_REQUIREDbit1True
NOTARY_STATE_ABBRvarchar(10)10True
AMOUNT_OF_CASH_OR_CHECKdecimal(9,2)5True
IS_BILLABLEbit1True
SALES_TAXdecimal(8,2)5True
END_OF_LEASE_PURCHASE_PRICEdecimal(16,2)9True
MISCELLANEOUS_FEESdecimal(8,2)5True
ODOMETER_READINGint4True
LIEN_DATEdatetime8True
CAN_DISPATCH_BE_COMPLETEDbit1False((0))
DOES_REQUIRED_DUPLICATE_NEED_TO_-BE_ORDEREDbit1False((0))
STATUS_CHANGE_REASONvarchar(25)25True(NULL)
OPERATION_CODE_IDint4True(NULL)
PREVIOUS_SERVICE_REQUEST_STATUSvarchar(40)40True
CARRIER_TRACKING_NUMBERvarchar(50)50True
LUXURY_TAXdecimal(8,2)5True
PROPERTY_TAXdecimal(8,2)5True
ODOMETER_READING_DATEdatetime8True
OWNERSHIP_DOC_TRANSFER_METHODvarchar(20)20True
TRANSFER_FROM_TITLING_AGENCY_-LIENHOLDER_IDint4True
PORTFOLIO_TRANSFER_BRANCHvarchar(30)30True
TTA_CLIENT_REQUEST_RELEASE_CODEvarchar(10)10True
LAST_PRINTED_ON_REPORT_DATEdatetime8True
REQUEST_STATE_TO_PRINT_PAPER_TITLEbit1False((0))
CREATED_DATEdatetime8True
CURRENT_ACTIVITY_SEQUENCEsmallint2True
IS_LIEN_FILING_DUE_TO_DIRECT_LENDINGbit1True
MAILED_TO_DMV_DATEdatetime8True
OWNER_EIN_FIDvarchar(9)9True
RELATED_BUSINESS_PROCESSvarchar(30)30True
EEE_CAUSEvarchar(25)25True
EEE_DATEdatetime8True
POST_EEEvarchar(8)8True
POST_EEE_DATEdatetime8True
PREV_POST_EEEvarchar(8)8True
EEE_REASON_IDint4True
BILLING_TYPE_IDint4True
PEER_SERVICE_REQUEST_IDint4True
IS_LOGICALLY_SUSPENDEDbit1True
ADDRESS_DERIVATIONvarchar(20)20True
ERROR_CODEvarchar(25)25True
COMMENTvarchar(100)100True
SUPPRESSED_DATEdatetime8True
FLEET_REQUEST_IDuniqueidentifier16True
STATE_CLOSED_DATE_ONLYdatetime8True
FACILITY_IDsmallint2True
DUPLICATE_TITLE_SLA_START_DATEdatetime8True
IS_SUBSEQENT_RELEASE_REQUIREbit1True
IS_ACCELERATED_TITLEbit1True
IS_DMV_REJECTbit1True((0))
IS_POST_FEEbit1True
AT_PAYOFF_AMOUNTdecimal(10,2)9True
AT_EFFECTIVE_DATEdatetime8True
IS_PAIDbit1True
TITLING_JURISDICTION_LIENHOLDERID_-NEWint4True
EMAILvarchar(150)150True
IS_CLOSED_VIA_GUIbit1True
PHONE_NOvarchar(15)15True
Indexes
KeyNameColumnsUniqueFill FactorFile Group
SERVICE_-REQUEST_PKSERVICE_REQUEST_IDTrue100CM_-Log
index_SERVICE_-REQUEST_XML_-SERIALIZED_-INSTANCE_IDXML_SERIALIZED_INSTANCE_ID90CM_-Index
index_Service-Request_Account-ImportErrorErrorIdACCOUNT_IMPORT_ERRORERROR_ID90CM_-Log_-Index
index_Service-Request_ActionDateACTION_DATE90CM_-Log_-Index
index_Service-Request_AddressIdADDRESS_ID90CM_-Log_-Index
index_Service-Request_Business-ProcessStatusBUSINESS_PROCESS_STATUS90CM_-Log_-Index
index_Service-Request_California-TransmittalFormXml-SerializedInstanceIdCALIFORNIA_TRANSMITTAL_FORMXML_SERIALIZED_-INSTANCE_ID90CM_-Log_-Index
index_Service-Request_Carrier-TrackingNumberCARRIER_TRACKING_NUMBER90CM_-Log_-Index
index_Service-Request_ClientIdCLIENT_ID90CM_-Log_-Index
index_Service-Request_Concrete-TypeCONCRETE_TYPE90CM_-Log_-Index
index_Service-Request_IsExpeditedIS_EXPEDITED90CM_-Index
index_Service-Request_LastExport-ToStateDateLAST_EXPORT_TO_STATE_DATE90CM_-Log_-Index
index_Service-Request_LastState-ResponseDateLAST_STATE_RESPONSE_DATE90CM_-Log_-Index
index_Service-Request_Lienholder-PerformingLien-FilingIdLIENHOLDER_PERFORMING_LIEN_FILING_ID90CM_-Log_-Index
index_Service-Request_Parent-ServiceRequestIdPARENT_SERVICE_REQUEST_ID90CM_-Log_-Index
index_Service-Request_Peer-ServiceRequestIdPEER_SERVICE_REQUEST_ID90CM_-Log_-Index
index_Service-Request_Previous-ServiceRequestIdPREVIOUS_SERVICE_REQUEST_ID90CM_-Log_-Index
index_Service-Request_Print-RequestIdPRINT_REQUEST_ID90CM_-Log_-Index
index_Service-Request_Pull-Report_FacilityIdSERVICE_REQUEST_ID, PRINT_REQUEST_ID, BUSINESS_-PROCESS_STATUS, CONCRETE_TYPE, CLIENT_ID, IS_ON_-HOLD_INDEFINITELY, RECORDED_REQUEST_DATE, SERVICE_REQUEST_STATUS, FACILITY_ID90CM_-Log
index_Service-Request_Recorded-RequestDateRECORDED_REQUEST_DATE90CM_-Log_-Index
index_Service-Request_Request-MechanismTypeREQUEST_MECHANISM_TYPE90CM_-Log_-Index
index_Service-Request_Request-TransactionTypeREQUEST_TRANSACTION_TYPE90CM_-Log_-Index
index_Service-Request_Service-RequestIDREQUEST_CATEGORY, DOCUMENT_NUMBER, NEW_-YORK_LIEN_FILING_TRANSACTION_TYPE, MAKE, YEAR, MANUFACTURER_ID, FINANCED_DATE, LIENHOLDER_-PERFORMING_LIEN_FILING_ID, BUSINESS_PROCESS_-STATUS, CONCRETE_TYPE, LAST_EXPORT_TO_STATE_-DATE, LAST_STATE_RESPONSE_DATE, SERVICE_-REQUEST_ID90CM_-Index
index_Service-Request_Service-RequestStatusSERVICE_REQUEST_STATUS90CM_-Log_-Index
index_Service-Request_Service-RequestStatus_-BusinessProcess-StatusSERVICE_REQUEST_STATUS, BUSINESS_PROCESS_-STATUS90CM_-Log_-Index
index_Service-Request_State-ClosedDateSTATE_CLOSED_DATE90CM_-Log_-Index
index_Service-Request_Titling-AgencyLienholderIdTITLING_AGENCY_LIENHOLDER_ID90CM_-Log_-Index
index_Service-Request_Transfer-FromTitlingAgency-LienholderIdTRANSFER_FROM_TITLING_AGENCY_LIENHOLDER_ID90CM_-Log_-Index
index_Service-Request_TransferTo-TitlingAgency-LienholderIdTRANSFER_TO_TITLING_AGENCY_LIENHOLDER_ID90CM_-Log_-Index
index_Service-Request_Virginia-CustomerService-CenterIdVIRGINIA_CUSTOMER_SERVICE_CENTER_ID90CM_-Log_-Index
Statistics
NameColumns
_dta_index_SERVICE_-REQUEST_5_443864648__K13_K1_K53_K50_-K2_K5_12_14_16_114SERVICE_REQUEST_ID, BUSINESS_PROCESS_STATUS, CONCRETE_-TYPE, REQUEST_TRANSACTION_TYPE, PRINT_REQUEST_ID, FDI_-DEPARTMENT_ID
_dta_index_SERVICE_-REQUEST_5_443864648__K1_K13REQUEST_TRANSACTION_TYPE, SERVICE_REQUEST_ID
_dta_index_SERVICE_-REQUEST_5_443864648__K1_K50_K2_K13_K5REQUEST_TRANSACTION_TYPE, PRINT_REQUEST_ID, SERVICE_-REQUEST_ID, BUSINESS_PROCESS_STATUS, CONCRETE_TYPE
_dta_index_SERVICE_-REQUEST_5_443864648__K2_K50_K1PRINT_REQUEST_ID, SERVICE_REQUEST_ID, BUSINESS_PROCESS_-STATUS
_dta_index_SERVICE_-REQUEST_5_443864648__K53_K1SERVICE_REQUEST_ID, PRINT_REQUEST_ID
_dta_index_SERVICE_-REQUEST_5_443864648__K53_K1_K50_K2_-K13_K5_12_14_16_114FDI_DEPARTMENT_ID, SERVICE_REQUEST_ID, BUSINESS_-PROCESS_STATUS, CONCRETE_TYPE, REQUEST_TRANSACTION_-TYPE, PRINT_REQUEST_ID
index_ServiceRequest_ServiceRequestID_1LAST_STATE_RESPONSE_DATE, LIENHOLDER_PERFORMING_LIEN_-FILING_ID, SERVICE_REQUEST_ID
index_ServiceRequest_ServiceRequestID_2LAST_EXPORT_TO_STATE_DATE, LAST_STATE_RESPONSE_DATE, BUSINESS_PROCESS_STATUS
index_ServiceRequest_ServiceRequestID_3LAST_EXPORT_TO_STATE_DATE, LIENHOLDER_PERFORMING_-LIEN_FILING_ID, BUSINESS_PROCESS_STATUS
index_ServiceRequest_ServiceRequestID_4CONCRETE_TYPE, LAST_EXPORT_TO_STATE_DATE, SERVICE_-REQUEST_ID, BUSINESS_PROCESS_STATUS
index_ServiceRequest_ServiceRequestID_5CONCRETE_TYPE, LIENHOLDER_PERFORMING_LIEN_FILING_ID, SERVICE_REQUEST_ID, LAST_EXPORT_TO_STATE_DATE, LAST_-STATE_RESPONSE_DATE
index_ServiceRequest_ServiceRequestID_6LIENHOLDER_PERFORMING_LIEN_FILING_ID, BUSINESS_PROCESS_-STATUS, CONCRETE_TYPE, LAST_EXPORT_TO_STATE_DATE, LAST_-STATE_RESPONSE_DATE
index_ServiceRequest_ServiceRequestID_7BUSINESS_PROCESS_STATUS, LIENHOLDER_PERFORMING_LIEN_-FILING_ID, SERVICE_REQUEST_ID, LAST_EXPORT_TO_STATE_DATE, LAST_STATE_RESPONSE_DATE
index_ServiceRequest_ServiceRequestID_8SERVICE_REQUEST_ID, LIENHOLDER_PERFORMING_LIEN_FILING_ID, BUSINESS_PROCESS_STATUS, CONCRETE_TYPE, LAST_EXPORT_-TO_STATE_DATE, LAST_STATE_RESPONSE_DATE
Check Constraints
NameOn ColumnConstraint
SERVICE_REQUEST_-REQUEST_CATEGORY_ChkREQUEST_-CATEGORY([REQUEST_CATEGORY] = 'TITLE_MAINTENANCE' or [REQUEST_CATEGORY] = 'NULL')
SERVICE_-REQUESTBUSINESS_-PROCESS_STATUS_ChkBUSINESS_-PROCESS_STATUS([BUSINESS_PROCESS_STATUS]='Cancelled' OR [BUSINESS_-PROCESS_STATUS]='Closed' OR [BUSINESS_PROCESS_-STATUS]='Open' OR [BUSINESS_PROCESS_STATUS]='Not-Started')
SERVICE_-REQUESTELECTRONIC_-TITLES_TO_TRANSFER_-PER_DAY_ChkELECTRONIC_-TITLES_TO_-TRANSFER_PER_-DAY([ELECTRONIC_TITLES_TO_TRANSFER_PER_DAY]<=(5000))
SERVICE_REQUESTNEW_-YORK_LIEN_FILING_-TRANSACTION_TYPE_ChkNEW_YORK_LIEN_-FILING_-TRANSACTION_-TYPE([NEW_YORK_LIEN_FILING_TRANSACTION_TYPE] = 'Notice' or [NEW_YORK_LIEN_FILING_TRANSACTION_TYPE] = 'Cancellation' or [NEW_YORK_LIEN_FILING_TRANSACTION_-TYPE] = 'Release' or [NEW_YORK_LIEN_FILING_-TRANSACTION_TYPE] = 'CollateralLoan' or [NEW_YORK_LIEN_-FILING_TRANSACTION_TYPE] = 'Amendment' or [NEW_YORK_-LIEN_FILING_TRANSACTION_TYPE] = 'InitialFiling')
Foreign Keys
NameColumns
ERROR_SERVICE_REQUEST_FK2ACCOUNT_IMPORT_ERRORERROR_ID->[dbo].[ERROR].[ERROR_ID]
ADDRESS_SERVICE_REQUEST_FK1ADDRESS_ID->[dbo].[ADDRESS].[ADDRESS_ID]
BILLING_TYPE_SERVICE_-REQUEST_FK1BILLING_TYPE_ID->[dbo].[BILLING_TYPE].[BILLING_TYPE_ID]
XML_SERIALIZED_INSTANCE_-SERVICE_REQUEST_FK2CALIFORNIA_TRANSMITTAL_FORMXML_SERIALIZED_INSTANCE_ID->[dbo].[XML_SERIALIZED_INSTANCE].[XML_SERIALIZED_INSTANCE_ID]
CHECK_REPORT_SERVICE_-REQUEST_FK1CHECK_REPORT_ID->[dbo].[CHECK_REPORT].[CHECK_REPORT_ID]
ORGANIZATION_SERVICE_-REQUEST_FK2CLIENT_ID->[dbo].[ORGANIZATION].[ORGANIZATION_ID]
EEE_REASON_SERVICE_-REQUEST_FK1EEE_REASON_ID->[dbo].[EEE_REASON].[EEE_REASON_ID]
ERROR_SERVICE_REQUEST_FK1ELT_RESPONSE_ERRORERROR_ID->[dbo].[ERROR].[ERROR_ID]
FACILITY_SERVICE_REQUEST_FK1FACILITY_ID->[dbo].[FACILITY].[Facility_Id]
FDI_DEPARTMENT_SERVICE_-REQUEST_FK1FDI_DEPARTMENT_ID->[dbo].[FDI_DEPARTMENT].[FDI_DEPARTMENT_ID]
ORGANIZATION_SERVICE_-REQUEST_FK3JURISDICTION_ID->[dbo].[ORGANIZATION].[ORGANIZATION_ID]
TITLING_AGENCY_LIENHOLDER_-SERVICE_REQUEST_FK2LIENHOLDER_PERFORMING_LIEN_FILING_ID->[dbo].[TITLING_AGENCY_-LIENHOLDER].[TITLING_AGENCY_LIENHOLDER_ID]
OPERATION_CODE_SERVICE_-REQUEST_FK1OPERATION_CODE_ID->[dbo].[OPERATION_CODE].[OPERATION_CODE_ID]
SERVICE_REQUEST_SERVICE_-REQUEST_FK1PARENT_SERVICE_REQUEST_ID->[dbo].[SERVICE_REQUEST].[SERVICE_-REQUEST_ID]
SERVICE_REQUEST_SERVICE_-REQUEST_FK3PEER_SERVICE_REQUEST_ID->[dbo].[SERVICE_REQUEST].[SERVICE_-REQUEST_ID]
SERVICE_REQUEST_SERVICE_-REQUEST_FK2PREVIOUS_SERVICE_REQUEST_ID->[dbo].[SERVICE_REQUEST].[SERVICE_-REQUEST_ID]
PRINT_REQUEST_SERVICE_-REQUEST_FK1PRINT_REQUEST_ID->[dbo].[PRINT_REQUEST].[PRINT_REQUEST_ID]
TITLING_AGENCY_LIENHOLDER_-SERVICE_REQUEST_FK1TITLING_AGENCY_LIENHOLDER_ID->[dbo].[TITLING_AGENCY_-LIENHOLDER].[TITLING_AGENCY_LIENHOLDER_ID]
FROM_TITLING_AGENCY_-LIENHOLDER_SERVICE_-REQUEST_FKTRANSFER_FROM_TITLING_AGENCY_LIENHOLDER_ID->[dbo].[TITLING_-AGENCY_LIENHOLDER].[TITLING_AGENCY_LIENHOLDER_ID]
TITLING_AGENCY_LIENHOLDER_-SERVICE_REQUEST_FK3TRANSFER_TO_TITLING_AGENCY_LIENHOLDER_ID->[dbo].[TITLING_-AGENCY_LIENHOLDER].[TITLING_AGENCY_LIENHOLDER_ID]
ACCOUNT_SERVICE_REQUEST_-FK1TRANSFERRED_ACCOUNT_ID->[dbo].[ACCOUNT].[ACCOUNT_ID]
OWNERSHIP_DOC_SERVICE_-REQUEST_FK1TRANSFERRED_OWNERSHIP_DOC_ID->[dbo].[OWNERSHIP_-DOC].[OWNERSHIP_DOC_ID]
USR_SERVICE_REQUEST_FK1USR_ID->[dbo].[USR].[USR_ID]
LEGAL_ENTITY_SERVICE_-REQUEST_FK1VIRGINIA_CUSTOMER_SERVICE_CENTER_ID->[dbo].[LEGAL_ENTITY].[LEGAL_-ENTITY_ID]
XML_SERIALIZED_INSTANCE_-SERVICE_REQUEST_FK1XML_SERIALIZED_INSTANCE_ID->[dbo].[XML_SERIALIZED_INSTANCE].[XML_-SERIALIZED_INSTANCE_ID]
SQL Script
CREATE TABLE [dbo].[SERVICE_REQUEST]
(
[SERVICE_REQUEST_ID] [int] NOT NULL IDENTITY(1, 1),
[BUSINESS_PROCESS_STATUS] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[VIRGINIA_CUSTOMER_SERVICE_CENTER_ID] [int] NULL,
[TITLING_AGENCY_LIENHOLDER_ID] [int] NULL,
[CONCRETE_TYPE] [varchar] (150) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[USR_ID] [int] NOT NULL,
[LAST_MOD_DATE_TIME] [datetime] NOT NULL,
[LAST_MODIFIER] [int] NOT NULL,
[TRANS_SEQ_NUM] [smallint] NOT NULL,
[RECORDED_REQUEST_DATE] [smalldatetime] NOT NULL,
[REQUEST_MECHANISM_TYPE] [varchar] (8) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[CREATED_DATE_TIME] [datetime] NOT NULL,
[REQUEST_TRANSACTION_TYPE] [varchar] (60) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ADDRESS_ID] [int] NULL,
[IS_EXPEDITED] [bit] NULL,
[RESEARCH_QUESTION] [varchar] (173) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[REQUEST_CATEGORY] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[XML_SERIALIZED_INSTANCE_ID] [int] NULL,
[LAST_EXPORT_TO_STATE_DATE] [datetime] NULL,
[LAST_STATE_RESPONSE_DATE] [datetime] NULL,
[STATE_CLOSED_DATE] [datetime] NULL,
[LAST_STATE_RESPONSE_CODE] [varchar] (120) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[REJECTION_NOTE] [varchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[IS_REASSIGNED] [bit] NULL,
[PORTFOLIO_TRANSFER_NAME] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[TRANSFER_TO_TITLING_AGENCY_LIENHOLDER_ID] [int] NULL,
[LIENHOLDER_PERFORMING_LIEN_FILING_ID] [int] NULL,
[VEHICLE_TYPE] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[DOCUMENT_NUMBER] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[NUMBER_OF_MEMO_TITLES] [smallint] NULL,
[OHIO_CONTROL_NUMBER] [varchar] (9) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[DISPOSITION_CODE] [char] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[NEW_YORK_LIEN_FILING_TRANSACTION_TYPE] [varchar] (30) COLLATE SQL_Latin1_General_CP1_-CI_AS NULL,
[LIEN_RELEASE_SEQUENCE_NUMBER] [smallint] NULL,
[MAKE] [varchar] (25) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[YEAR] [char] (4) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[MANUFACTURER_ID] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ELECTRONIC_TITLES_TO_TRANSFER_PER_DAY] [int] NULL,
[FINANCED_DATE] [datetime] NULL,
[TITLE_NUMBER] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[OHIO_CONTROL_NUMBER1] [varchar] (9) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[NUMBER_OF_OPEN_LIENS] [smallint] NULL,
[PARENT_SERVICE_REQUEST_ID] [int] NULL,
[PREVIOUS_SERVICE_REQUEST_ID] [int] NULL,
[SERVICE_REQUEST_STATUS] [varchar] (40) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[SPECIAL_MAIL_HANDLING_INSTRUCTIONS] [varchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[MAIL_CARRIER] [varchar] (40) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[CLIENT_ID] [int] NULL,
[IS_ON_HOLD_INDEFINITELY] [bit] NULL,
[PRINT_REQUEST_ID] [int] NULL,
[ACTION_DATE] [datetime] NULL,
[DUPLICATE_TITLE_REQUEST_REASON] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[FDI_DEPARTMENT_ID] [int] NULL,
[JURISDICTION_ID] [int] NULL,
[ELT_RESPONSE_ERRORERROR_ID] [int] NULL,
[TRANSFERRED_OWNERSHIP_DOC_ID] [int] NULL,
[ACCOUNT_IMPORT_ERRORERROR_ID] [int] NULL,
[TRANSFERRED_ACCOUNT_ID] [int] NULL,
[COLLATERAL_GROUP_STATUS] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[XML_DOCUMENT_DATA] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[IS_EXPEDITED_FROM_VAULT] [bit] NULL,
[IS_CONFIRM_RECEIPT] [bit] NULL,
[CHECK_REPORT_ID] [int] NULL,
[MANUFACTURER_ID1] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[BUYERS_NAME] [varchar] (60) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[DEALER_REPORT_NUMBER] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[DATE_OF_SALE] [smalldatetime] NULL,
[RECEIPT_NUMBER] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[DMV_FEES_COLLECTED] [decimal] (9, 2) NULL,
[IS_USED] [bit] NULL,
[CALIFORNIA_TRANSMITTAL_FORMXML_SERIALIZED_INSTANCE_ID] [int] NULL,
[AMOUNT] [decimal] (9, 2) NULL,
[AMOUNT_BILLED] [decimal] (9, 2) NULL,
[CHECK_NUMBER] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[PAYEE_NAME] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[IS_RELEASE_DUE_TO_INSURANCE_LOSS] [bit] NULL,
[IS_LETTERS_PRINTED] [bit] NULL,
[LAST_SERVICE_REQUEST_STATUS_CHANGE_DATE_TIME] [datetime] NULL,
[IS_NOTARY_REQUIRED] [bit] NULL,
[NOTARY_STATE_ABBR] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[AMOUNT_OF_CASH_OR_CHECK] [decimal] (9, 2) NULL,
[IS_BILLABLE] [bit] NULL,
[SALES_TAX] [decimal] (8, 2) NULL,
[END_OF_LEASE_PURCHASE_PRICE] [decimal] (16, 2) NULL,
[MISCELLANEOUS_FEES] [decimal] (8, 2) NULL,
[ODOMETER_READING] [int] NULL,
[LIEN_DATE] [datetime] NULL,
[CAN_DISPATCH_BE_COMPLETED] [bit] NOT NULL CONSTRAINT [DF__SERVICE_R__CAN_D__74450BBF] DEFAULT ((0)),
[DOES_REQUIRED_DUPLICATE_NEED_TO_BE_ORDERED] [bit] NOT NULL CONSTRAINT [DF__SERVICE_R__-DOES___75392FF8] DEFAULT ((0)),
[STATUS_CHANGE_REASON] [varchar] (25) COLLATE SQL_Latin1_General_CP1_CI_AS NULL CONSTRAINT [DF__SERVICE_R__COMPL__7DCE75F9] DEFAULT (NULL),
[OPERATION_CODE_ID] [int] NULL CONSTRAINT [DF__SERVICE_R__OPERA__7EC29A32] DEFAULT (NULL),
[PREVIOUS_SERVICE_REQUEST_STATUS] [varchar] (40) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[CARRIER_TRACKING_NUMBER] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[LUXURY_TAX] [decimal] (8, 2) NULL,
[PROPERTY_TAX] [decimal] (8, 2) NULL,
[ODOMETER_READING_DATE] [datetime] NULL,
[OWNERSHIP_DOC_TRANSFER_METHOD] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[TRANSFER_FROM_TITLING_AGENCY_LIENHOLDER_ID] [int] NULL,
[PORTFOLIO_TRANSFER_BRANCH] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[TTA_CLIENT_REQUEST_RELEASE_CODE] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[LAST_PRINTED_ON_REPORT_DATE] [datetime] NULL,
[REQUEST_STATE_TO_PRINT_PAPER_TITLE] [bit] NOT NULL CONSTRAINT [DF_SERVICE_REQUEST_-REQUEST_STATE_TO_PRINT_PAPER_TITLE] DEFAULT ((0)),
[CREATED_DATE] [datetime] NULL,
[CURRENT_ACTIVITY_SEQUENCE] [smallint] NULL,
[IS_LIEN_FILING_DUE_TO_DIRECT_LENDING] [bit] NULL,
[MAILED_TO_DMV_DATE] [datetime] NULL,
[OWNER_EIN_FID] [varchar] (9) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[RELATED_BUSINESS_PROCESS] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[EEE_CAUSE] [varchar] (25) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[EEE_DATE] [datetime] NULL,
[POST_EEE] [varchar] (8) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[POST_EEE_DATE] [datetime] NULL,
[PREV_POST_EEE] [varchar] (8) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[EEE_REASON_ID] [int] NULL,
[BILLING_TYPE_ID] [int] NULL,
[PEER_SERVICE_REQUEST_ID] [int] NULL,
[IS_LOGICALLY_SUSPENDED] [bit] NULL,
[ADDRESS_DERIVATION] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ERROR_CODE] [varchar] (25) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[COMMENT] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[SUPPRESSED_DATE] [datetime] NULL,
[FLEET_REQUEST_ID] [uniqueidentifier] NULL,
[STATE_CLOSED_DATE_ONLY] [datetime] NULL,
[FACILITY_ID] [smallint] NULL,
[DUPLICATE_TITLE_SLA_START_DATE] [datetime] NULL,
[IS_SUBSEQENT_RELEASE_REQUIRE] [bit] NULL,
[IS_ACCELERATED_TITLE] [bit] NULL,
[IS_DMV_REJECT] [bit] NULL CONSTRAINT [DF__SERVICE_R__IS_DM__0CFD8E35] DEFAULT ((0)),
[IS_POST_FEE] [bit] NULL,
[AT_PAYOFF_AMOUNT] [decimal] (10, 2) NULL,
[AT_EFFECTIVE_DATE] [datetime] NULL,
[IS_PAID] [bit] NULL,
[TITLING_JURISDICTION_LIENHOLDERID_NEW] [int] NULL,
[varchar] (150) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[IS_CLOSED_VIA_GUI] [bit] NULL,
[PHONE_NO] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [CM_Log] TEXTIMAGE_ON [PRIMARY]
GO
ALTER TABLE [dbo].[SERVICE_REQUEST] ADD CONSTRAINT [SERVICE_REQUEST_REQUEST_CATEGORY_Chk] CHECK (([REQUEST_CATEGORY] = 'TITLE_MAINTENANCE' or [REQUEST_CATEGORY] = 'NULL'))
GO
ALTER TABLE [dbo].[SERVICE_REQUEST] ADD CONSTRAINT [SERVICE_REQUESTBUSINESS_PROCESS_-STATUS_Chk] CHECK (([BUSINESS_PROCESS_STATUS]='Cancelled' OR [BUSINESS_PROCESS_-STATUS]='Closed' OR [BUSINESS_PROCESS_STATUS]='Open' OR [BUSINESS_PROCESS_STATUS]='Not-Started'))
GO
ALTER TABLE [dbo].[SERVICE_REQUEST] ADD CONSTRAINT [SERVICE_REQUESTELECTRONIC_TITLES_TO_-TRANSFER_PER_DAY_Chk] CHECK (([ELECTRONIC_TITLES_TO_TRANSFER_PER_DAY]<=(5000)))
GO
ALTER TABLE [dbo].[SERVICE_REQUEST] ADD CONSTRAINT [SERVICE_REQUESTNEW_YORK_LIEN_FILING_-TRANSACTION_TYPE_Chk] CHECK (([NEW_YORK_LIEN_FILING_TRANSACTION_TYPE] = 'Notice' or [NEW_YORK_LIEN_FILING_TRANSACTION_TYPE] = 'Cancellation' or [NEW_YORK_LIEN_FILING_-TRANSACTION_TYPE] = 'Release' or [NEW_YORK_LIEN_FILING_TRANSACTION_TYPE] = 'Collateral-Loan' or [NEW_YORK_LIEN_FILING_TRANSACTION_TYPE] = 'Amendment' or [NEW_YORK_LIEN_FILING_-TRANSACTION_TYPE] = 'InitialFiling'))
GO
ALTER TABLE [dbo].[SERVICE_REQUEST] ADD CONSTRAINT [SERVICE_REQUEST_PK] PRIMARY KEY CLUSTERED ([SERVICE_REQUEST_ID]) ON [CM_Log]
GO
CREATE NONCLUSTERED INDEX [index_ServiceRequest_AccountImportErrorErrorId] ON [dbo].[SERVICE_REQUEST] ([ACCOUNT_IMPORT_ERRORERROR_ID]) ON [CM_Log_Index]
GO
CREATE NONCLUSTERED INDEX [index_ServiceRequest_ActionDate] ON [dbo].[SERVICE_REQUEST] ([ACTION_DATE]) ON [CM_Log_Index]
GO
CREATE NONCLUSTERED INDEX [index_ServiceRequest_AddressId] ON [dbo].[SERVICE_REQUEST] ([ADDRESS_ID]) ON [CM_Log_Index]
GO
CREATE NONCLUSTERED INDEX [index_ServiceRequest_BusinessProcessStatus] ON [dbo].[SERVICE_REQUEST] ([BUSINESS_PROCESS_STATUS]) ON [CM_Log_Index]
GO
CREATE NONCLUSTERED INDEX [index_ServiceRequest_PullReport_FacilityId] ON [dbo].[SERVICE_REQUEST] ([BUSINESS_PROCESS_STATUS], [CONCRETE_TYPE], [CLIENT_ID], [IS_-ON_HOLD_INDEFINITELY], [RECORDED_REQUEST_DATE], [SERVICE_REQUEST_STATUS], [FACILITY_ID]) INCLUDE ([PRINT_REQUEST_ID], [SERVICE_REQUEST_ID]) ON [CM_Log]
GO
CREATE NONCLUSTERED INDEX [index_ServiceRequest_CaliforniaTransmittalFormXmlSerialized-InstanceId] ON [dbo].[SERVICE_REQUEST] ([CALIFORNIA_TRANSMITTAL_FORMXML_SERIALIZED_-INSTANCE_ID]) ON [CM_Log_Index]
GO
CREATE NONCLUSTERED INDEX [index_ServiceRequest_CarrierTrackingNumber] ON [dbo].[SERVICE_REQUEST] ([CARRIER_TRACKING_NUMBER]) ON [CM_Log_Index]
GO
CREATE NONCLUSTERED INDEX [index_ServiceRequest_ClientId] ON [dbo].[SERVICE_REQUEST] ([CLIENT_ID]) ON [CM_Log_Index]
GO
CREATE NONCLUSTERED INDEX [index_ServiceRequest_ConcreteType] ON [dbo].[SERVICE_REQUEST] ([CONCRETE_TYPE]) ON [CM_Log_Index]
GO
CREATE NONCLUSTERED INDEX [index_ServiceRequest_IsExpedited] ON [dbo].[SERVICE_REQUEST] ([IS_EXPEDITED]) ON [CM_Index]
GO
CREATE NONCLUSTERED INDEX [index_ServiceRequest_LastExportToStateDate] ON [dbo].[SERVICE_REQUEST] ([LAST_EXPORT_TO_STATE_DATE]) ON [CM_Log_Index]
GO
CREATE NONCLUSTERED INDEX [index_ServiceRequest_LastStateResponseDate] ON [dbo].[SERVICE_REQUEST] ([LAST_STATE_RESPONSE_DATE]) ON [CM_Log_Index]
GO
CREATE NONCLUSTERED INDEX [index_ServiceRequest_LienholderPerformingLienFilingId] ON [dbo].[SERVICE_REQUEST] ([LIENHOLDER_PERFORMING_LIEN_FILING_ID]) ON [CM_Log_Index]
GO
CREATE NONCLUSTERED INDEX [index_ServiceRequest_ServiceRequestID] ON [dbo].[SERVICE_-REQUEST] ([LIENHOLDER_PERFORMING_LIEN_FILING_ID], [BUSINESS_PROCESS_STATUS], [CONCRETE_-TYPE], [LAST_EXPORT_TO_STATE_DATE], [LAST_STATE_RESPONSE_DATE], [SERVICE_REQUEST_ID]) INCLUDE ([DOCUMENT_NUMBER], [FINANCED_DATE], [MAKE], [MANUFACTURER_ID], [NEW_YORK_LIEN_-FILING_TRANSACTION_TYPE], [REQUEST_CATEGORY], [YEAR]) ON [CM_Index]
GO
CREATE NONCLUSTERED INDEX [index_ServiceRequest_ParentServiceRequestId] ON [dbo].[SERVICE_REQUEST] ([PARENT_SERVICE_REQUEST_ID]) ON [CM_Log_Index]
GO
CREATE NONCLUSTERED INDEX [index_ServiceRequest_PeerServiceRequestId] ON [dbo].[SERVICE_-REQUEST] ([PEER_SERVICE_REQUEST_ID]) ON [CM_Log_Index]
GO
CREATE NONCLUSTERED INDEX [index_ServiceRequest_PreviousServiceRequestId] ON [dbo].[SERVICE_REQUEST] ([PREVIOUS_SERVICE_REQUEST_ID]) ON [CM_Log_Index]
GO
CREATE NONCLUSTERED INDEX [index_ServiceRequest_PrintRequestId] ON [dbo].[SERVICE_-REQUEST] ([PRINT_REQUEST_ID]) ON [CM_Log_Index]
GO
CREATE NONCLUSTERED INDEX [index_ServiceRequest_RecordedRequestDate] ON [dbo].[SERVICE_-REQUEST] ([RECORDED_REQUEST_DATE]) ON [CM_Log_Index]
GO
CREATE NONCLUSTERED INDEX [index_ServiceRequest_RequestMechanismType] ON [dbo].[SERVICE_-REQUEST] ([REQUEST_MECHANISM_TYPE]) ON [CM_Log_Index]
GO
CREATE NONCLUSTERED INDEX [index_ServiceRequest_RequestTransactionType] ON [dbo].[SERVICE_REQUEST] ([REQUEST_TRANSACTION_TYPE]) ON [CM_Log_Index]
GO
CREATE NONCLUSTERED INDEX [index_ServiceRequest_ServiceRequestStatus] ON [dbo].[SERVICE_-REQUEST] ([SERVICE_REQUEST_STATUS]) ON [CM_Log_Index]
GO
CREATE NONCLUSTERED INDEX [index_ServiceRequest_ServiceRequestStatus_BusinessProcess-Status] ON [dbo].[SERVICE_REQUEST] ([SERVICE_REQUEST_STATUS], [BUSINESS_PROCESS_STATUS]) ON [CM_Log_Index]
GO
CREATE NONCLUSTERED INDEX [index_ServiceRequest_StateClosedDate] ON [dbo].[SERVICE_-REQUEST] ([STATE_CLOSED_DATE]) ON [CM_Log_Index]
GO
CREATE NONCLUSTERED INDEX [index_ServiceRequest_TitlingAgencyLienholderId] ON [dbo].[SERVICE_REQUEST] ([TITLING_AGENCY_LIENHOLDER_ID]) ON [CM_Log_Index]
GO
CREATE NONCLUSTERED INDEX [index_ServiceRequest_TransferFromTitlingAgencyLienholderId] ON [dbo].[SERVICE_REQUEST] ([TRANSFER_FROM_TITLING_AGENCY_LIENHOLDER_ID]) ON [CM_Log_Index]
GO
CREATE NONCLUSTERED INDEX [index_ServiceRequest_TransferToTitlingAgencyLienholderId] ON [dbo].[SERVICE_REQUEST] ([TRANSFER_TO_TITLING_AGENCY_LIENHOLDER_ID]) ON [CM_Log_Index]
GO
CREATE NONCLUSTERED INDEX [index_ServiceRequest_VirginiaCustomerServiceCenterId] ON [dbo].[SERVICE_REQUEST] ([VIRGINIA_CUSTOMER_SERVICE_CENTER_ID]) ON [CM_Log_Index]
GO
CREATE NONCLUSTERED INDEX [index_SERVICE_REQUEST_XML_SERIALIZED_INSTANCE_ID] ON [dbo].[SERVICE_REQUEST] ([XML_SERIALIZED_INSTANCE_ID]) ON [CM_Index]
GO
CREATE STATISTICS [index_ServiceRequest_ServiceRequestID_7] ON [dbo].[SERVICE_REQUEST] ([BUSINESS_PROCESS_STATUS], [LIENHOLDER_PERFORMING_LIEN_FILING_ID], [SERVICE_REQUEST_ID], [LAST_EXPORT_TO_STATE_DATE], [LAST_STATE_RESPONSE_DATE])
GO
CREATE STATISTICS [index_ServiceRequest_ServiceRequestID_4] ON [dbo].[SERVICE_REQUEST] ([CONCRETE_TYPE], [LAST_EXPORT_TO_STATE_DATE], [SERVICE_REQUEST_ID], [BUSINESS_PROCESS_-STATUS])
GO
CREATE STATISTICS [index_ServiceRequest_ServiceRequestID_5] ON [dbo].[SERVICE_REQUEST] ([CONCRETE_TYPE], [LIENHOLDER_PERFORMING_LIEN_FILING_ID], [SERVICE_REQUEST_ID], [LAST_-EXPORT_TO_STATE_DATE], [LAST_STATE_RESPONSE_DATE])
GO
CREATE STATISTICS [_dta_index_SERVICE_REQUEST_5_443864648__K53_K1_K50_K2_K13_-K5_12_14_16_114] ON [dbo].[SERVICE_REQUEST] ([FDI_DEPARTMENT_ID], [SERVICE_REQUEST_ID], [BUSINESS_PROCESS_STATUS], [CONCRETE_TYPE], [REQUEST_TRANSACTION_TYPE], [PRINT_REQUEST_-ID])
GO
CREATE STATISTICS [index_ServiceRequest_ServiceRequestID_2] ON [dbo].[SERVICE_REQUEST] ([LAST_EXPORT_TO_STATE_DATE], [LAST_STATE_RESPONSE_DATE], [BUSINESS_PROCESS_STATUS])
GO
CREATE STATISTICS [index_ServiceRequest_ServiceRequestID_3] ON [dbo].[SERVICE_REQUEST] ([LAST_EXPORT_TO_STATE_DATE], [LIENHOLDER_PERFORMING_LIEN_FILING_ID], [BUSINESS_PROCESS_-STATUS])
GO
CREATE STATISTICS [index_ServiceRequest_ServiceRequestID_1] ON [dbo].[SERVICE_REQUEST] ([LAST_STATE_RESPONSE_DATE], [LIENHOLDER_PERFORMING_LIEN_FILING_ID], [SERVICE_REQUEST_-ID])
GO
CREATE STATISTICS [index_ServiceRequest_ServiceRequestID_6] ON [dbo].[SERVICE_REQUEST] ([LIENHOLDER_PERFORMING_LIEN_FILING_ID], [BUSINESS_PROCESS_STATUS], [CONCRETE_TYPE], [LAST_EXPORT_TO_STATE_DATE], [LAST_STATE_RESPONSE_DATE])
GO
CREATE STATISTICS [_dta_index_SERVICE_REQUEST_5_443864648__K2_K50_K1] ON [dbo].[SERVICE_-REQUEST] ([PRINT_REQUEST_ID], [SERVICE_REQUEST_ID], [BUSINESS_PROCESS_STATUS])
GO
CREATE STATISTICS [_dta_index_SERVICE_REQUEST_5_443864648__K1_K50_K2_K13_K5] ON [dbo].[SERVICE_REQUEST] ([REQUEST_TRANSACTION_TYPE], [PRINT_REQUEST_ID], [SERVICE_-REQUEST_ID], [BUSINESS_PROCESS_STATUS], [CONCRETE_TYPE])
GO
CREATE STATISTICS [_dta_index_SERVICE_REQUEST_5_443864648__K1_K13] ON [dbo].[SERVICE_-REQUEST] ([REQUEST_TRANSACTION_TYPE], [SERVICE_REQUEST_ID])
GO
CREATE STATISTICS [_dta_index_SERVICE_REQUEST_5_443864648__K13_K1_K53_K50_K2_-K5_12_14_16_114] ON [dbo].[SERVICE_REQUEST] ([SERVICE_REQUEST_ID], [BUSINESS_PROCESS_-STATUS], [CONCRETE_TYPE], [REQUEST_TRANSACTION_TYPE], [PRINT_REQUEST_ID], [FDI_-DEPARTMENT_ID])
GO
CREATE STATISTICS [index_ServiceRequest_ServiceRequestID_8] ON [dbo].[SERVICE_REQUEST] ([SERVICE_REQUEST_ID], [LIENHOLDER_PERFORMING_LIEN_FILING_ID], [BUSINESS_PROCESS_STATUS], [CONCRETE_TYPE], [LAST_EXPORT_TO_STATE_DATE], [LAST_STATE_RESPONSE_DATE])
GO
CREATE STATISTICS [_dta_index_SERVICE_REQUEST_5_443864648__K53_K1] ON [dbo].[SERVICE_-REQUEST] ([SERVICE_REQUEST_ID], [PRINT_REQUEST_ID])
GO
ALTER TABLE [dbo].[SERVICE_REQUEST] ADD CONSTRAINT [ERROR_SERVICE_REQUEST_FK2] FOREIGN KEY ([ACCOUNT_IMPORT_ERRORERROR_ID]) REFERENCES [dbo].[ERROR] ([ERROR_ID])
GO
ALTER TABLE [dbo].[SERVICE_REQUEST] ADD CONSTRAINT [ADDRESS_SERVICE_REQUEST_FK1] FOREIGN KEY ([ADDRESS_ID]) REFERENCES [dbo].[ADDRESS] ([ADDRESS_ID])
GO
ALTER TABLE [dbo].[SERVICE_REQUEST] ADD CONSTRAINT [BILLING_TYPE_SERVICE_REQUEST_FK1] FOREIGN KEY ([BILLING_TYPE_ID]) REFERENCES [dbo].[BILLING_TYPE] ([BILLING_TYPE_ID])
GO
ALTER TABLE [dbo].[SERVICE_REQUEST] ADD CONSTRAINT [XML_SERIALIZED_INSTANCE_SERVICE_-REQUEST_FK2] FOREIGN KEY ([CALIFORNIA_TRANSMITTAL_FORMXML_SERIALIZED_INSTANCE_ID]) REFERENCES [dbo].[XML_SERIALIZED_INSTANCE] ([XML_SERIALIZED_INSTANCE_ID])
GO
ALTER TABLE [dbo].[SERVICE_REQUEST] ADD CONSTRAINT [CHECK_REPORT_SERVICE_REQUEST_FK1] FOREIGN KEY ([CHECK_REPORT_ID]) REFERENCES [dbo].[CHECK_REPORT] ([CHECK_REPORT_ID])
GO
ALTER TABLE [dbo].[SERVICE_REQUEST] ADD CONSTRAINT [ORGANIZATION_SERVICE_REQUEST_FK2] FOREIGN KEY ([CLIENT_ID]) REFERENCES [dbo].[ORGANIZATION] ([ORGANIZATION_ID])
GO
ALTER TABLE [dbo].[SERVICE_REQUEST] ADD CONSTRAINT [EEE_REASON_SERVICE_REQUEST_FK1] FOREIGN KEY ([EEE_REASON_ID]) REFERENCES [dbo].[EEE_REASON] ([EEE_REASON_ID])
GO
ALTER TABLE [dbo].[SERVICE_REQUEST] ADD CONSTRAINT [ERROR_SERVICE_REQUEST_FK1] FOREIGN KEY ([ELT_RESPONSE_ERRORERROR_ID]) REFERENCES [dbo].[ERROR] ([ERROR_ID])
GO
ALTER TABLE [dbo].[SERVICE_REQUEST] ADD CONSTRAINT [FACILITY_SERVICE_REQUEST_FK1] FOREIGN KEY ([FACILITY_ID]) REFERENCES [dbo].[FACILITY] ([Facility_Id])
GO
ALTER TABLE [dbo].[SERVICE_REQUEST] ADD CONSTRAINT [FDI_DEPARTMENT_SERVICE_REQUEST_FK1] FOREIGN KEY ([FDI_DEPARTMENT_ID]) REFERENCES [dbo].[FDI_DEPARTMENT] ([FDI_DEPARTMENT_ID])
GO
ALTER TABLE [dbo].[SERVICE_REQUEST] ADD CONSTRAINT [ORGANIZATION_SERVICE_REQUEST_FK3] FOREIGN KEY ([JURISDICTION_ID]) REFERENCES [dbo].[ORGANIZATION] ([ORGANIZATION_ID])
GO
ALTER TABLE [dbo].[SERVICE_REQUEST] ADD CONSTRAINT [TITLING_AGENCY_LIENHOLDER_SERVICE_-REQUEST_FK2] FOREIGN KEY ([LIENHOLDER_PERFORMING_LIEN_FILING_ID]) REFERENCES [dbo].[TITLING_AGENCY_LIENHOLDER] ([TITLING_AGENCY_LIENHOLDER_ID])
GO
ALTER TABLE [dbo].[SERVICE_REQUEST] ADD CONSTRAINT [OPERATION_CODE_SERVICE_REQUEST_FK1] FOREIGN KEY ([OPERATION_CODE_ID]) REFERENCES [dbo].[OPERATION_CODE] ([OPERATION_CODE_ID])
GO
ALTER TABLE [dbo].[SERVICE_REQUEST] ADD CONSTRAINT [SERVICE_REQUEST_SERVICE_REQUEST_FK1] FOREIGN KEY ([PARENT_SERVICE_REQUEST_ID]) REFERENCES [dbo].[SERVICE_REQUEST] ([SERVICE_-REQUEST_ID])
GO
ALTER TABLE [dbo].[SERVICE_REQUEST] ADD CONSTRAINT [SERVICE_REQUEST_SERVICE_REQUEST_FK3] FOREIGN KEY ([PEER_SERVICE_REQUEST_ID]) REFERENCES [dbo].[SERVICE_REQUEST] ([SERVICE_-REQUEST_ID])
GO
ALTER TABLE [dbo].[SERVICE_REQUEST] ADD CONSTRAINT [SERVICE_REQUEST_SERVICE_REQUEST_FK2] FOREIGN KEY ([PREVIOUS_SERVICE_REQUEST_ID]) REFERENCES [dbo].[SERVICE_REQUEST] ([SERVICE_REQUEST_ID])
GO
ALTER TABLE [dbo].[SERVICE_REQUEST] ADD CONSTRAINT [PRINT_REQUEST_SERVICE_REQUEST_FK1] FOREIGN KEY ([PRINT_REQUEST_ID]) REFERENCES [dbo].[PRINT_REQUEST] ([PRINT_REQUEST_ID])
GO
ALTER TABLE [dbo].[SERVICE_REQUEST] ADD CONSTRAINT [TITLING_AGENCY_LIENHOLDER_SERVICE_-REQUEST_FK1] FOREIGN KEY ([TITLING_AGENCY_LIENHOLDER_ID]) REFERENCES [dbo].[TITLING_-AGENCY_LIENHOLDER] ([TITLING_AGENCY_LIENHOLDER_ID])
GO
ALTER TABLE [dbo].[SERVICE_REQUEST] ADD CONSTRAINT [FROM_TITLING_AGENCY_LIENHOLDER_-SERVICE_REQUEST_FK] FOREIGN KEY ([TRANSFER_FROM_TITLING_AGENCY_LIENHOLDER_ID]) REFERENCES [dbo].[TITLING_AGENCY_LIENHOLDER] ([TITLING_AGENCY_LIENHOLDER_ID])
GO
ALTER TABLE [dbo].[SERVICE_REQUEST] ADD CONSTRAINT [TITLING_AGENCY_LIENHOLDER_SERVICE_-REQUEST_FK3] FOREIGN KEY ([TRANSFER_TO_TITLING_AGENCY_LIENHOLDER_ID]) REFERENCES [dbo].[TITLING_AGENCY_LIENHOLDER] ([TITLING_AGENCY_LIENHOLDER_ID])
GO
ALTER TABLE [dbo].[SERVICE_REQUEST] ADD CONSTRAINT [ACCOUNT_SERVICE_REQUEST_FK1] FOREIGN KEY ([TRANSFERRED_ACCOUNT_ID]) REFERENCES [dbo].[ACCOUNT] ([ACCOUNT_ID])
GO
ALTER TABLE [dbo].[SERVICE_REQUEST] ADD CONSTRAINT [OWNERSHIP_DOC_SERVICE_REQUEST_FK1] FOREIGN KEY ([TRANSFERRED_OWNERSHIP_DOC_ID]) REFERENCES [dbo].[OWNERSHIP_DOC] ([OWNERSHIP_DOC_ID])
GO
ALTER TABLE [dbo].[SERVICE_REQUEST] ADD CONSTRAINT [USR_SERVICE_REQUEST_FK1] FOREIGN KEY ([USR_ID]) REFERENCES [dbo].[USR] ([USR_ID])
GO
ALTER TABLE [dbo].[SERVICE_REQUEST] ADD CONSTRAINT [LEGAL_ENTITY_SERVICE_REQUEST_FK1] FOREIGN KEY ([VIRGINIA_CUSTOMER_SERVICE_CENTER_ID]) REFERENCES [dbo].[LEGAL_ENTITY] ([LEGAL_ENTITY_ID])
GO
ALTER TABLE [dbo].[SERVICE_REQUEST] ADD CONSTRAINT [XML_SERIALIZED_INSTANCE_SERVICE_-REQUEST_FK1] FOREIGN KEY ([XML_SERIALIZED_INSTANCE_ID]) REFERENCES [dbo].[XML_-SERIALIZED_INSTANCE] ([XML_SERIALIZED_INSTANCE_ID])
GO
Uses
[dbo].[ACCOUNT]
[dbo].[ADDRESS]
[dbo].[BILLING_TYPE]
[dbo].[CHECK_REPORT]
[dbo].[EEE_REASON]
[dbo].[ERROR]
[dbo].[FACILITY]
[dbo].[FDI_DEPARTMENT]
[dbo].[LEGAL_ENTITY]
[dbo].[OPERATION_CODE]
[dbo].[ORGANIZATION]
[dbo].[OWNERSHIP_DOC]
[dbo].[PRINT_REQUEST]
[dbo].[TITLING_AGENCY_LIENHOLDER]
[dbo].[USR]
[dbo].[XML_SERIALIZED_INSTANCE]
Used By
[dbo].[EARLY_PAYOFF_INFO]
[dbo].[EVENT]
[dbo].[FOLLOW_UP_ACTIVITY]
[dbo].[INQUIRY_REQUESTED_ITEMS]
[dbo].[INQUIRY_SERVICE_REQUEST_FORM]
[dbo].[LEGAL_ENTITY]
[dbo].[PRINT_RUN_DOCUMENT]
[dbo].[SERVICED_COLLATERAL_GROUP_ITEM]
[dbo].[STATE_MESSAGE_EXCHANGE]
[dbo].[USER_HISTORY]
[dbo].[WORK_QUEUE_ITEM]
[dbo].[OPEN_BPO_ACCOUNT_SERVICE_REQUESTS]
[dbo].[OPEN_BPO_OWNERSHIP_DOC_SERVICE_REQUESTS]
[dbo].[usp_GetChryslerCPUploadDataMonthly]
[dbo].[usp_GetDowneyUploadDataMonthly]
[dbo].[usp_GetDriveFinUploadDataMonthly]
[dbo].[usp_GetFifthThirdUploadDataMonthly]
[dbo].[usp_GetFranklinUploadDataMonthly]
[dbo].[WORK_QUEUE_ITEM]
Properties
PropertyValue
CollationSQL_Latin1_General_CP1_CI_AS
File GroupCM_Data
Row Count (~)88047982
Created3:25:09 PM Friday, August 6, 2004
Last Modified10:20:09 PM Sunday, November 22, 2015
Columns
KeyNameData TypeMax Length (Bytes)Allow NullsIdentity
WORK_QUEUE_ITEM_IDint4False1 - 1
LAST_MODIFIERint4False
LAST_MOD_DATE_TIMEdatetime8False
TRANS_SEQ_NUMsmallint2False
(3)CONCRETE_TYPEvarchar(150)150False
CREATED_DATE_TIMEdatetime8False
(2)COMPLETED_DATE_TIMEdatetime8True
REMIND_DATEsmalldatetime4True
DESCRIPTIONvarchar(300)300True
CREATING_USER_IDint4True
OWNERSHIP_DOC_IDint4True
(2) ACCOUNT_IDint4True
USR_IDint4True
USER_MESSAGEvarchar(256)256True
ERROR_IDint4True
PDF_FORM_IDint4True
(2) BUSINESS_PROCESS_STATUSvarchar(10)10False
NAMEvarchar(50)50False
PREVIOUS_MANUFACTURER_IDvarchar(30)30True
(2) ACCOUNT_OWNERSHIP_DOC_MATCH_IDint4True
IS_FDI_RESPONSIBLEbit1True
PREVIOUS_WORK_ITEM_IDint4True
SERVICE_REQUEST_IDint4True
(9) SECURED_ORGANIZATIONORGANIZATION_IDint4False
DISCREPANT_VALUEvarchar(150)150True
FORM_NAMEvarchar(50)50True
REQUEST_DATEsmalldatetime4True
XML_SERIALIZED_INSTANCE_IDint4True
IS_CLIENT_ALERTbit1True
IS_FDI_ALERTbit1True
(2)CREATED_DATEdatetime8True
IS_BILLABLEbit1True
IS_DOCUMENTS_FOUNDbit1True
ACTIVITY_SEQUENCEsmallint2True
LETTER_STATUSvarchar(50)50True
DIRECT_LENDING_SERVICES_AUTOMATED_LETTER_-CONFIG_IDint4True
DIRECT_LENDING_SERVICES_AUTOMATED_LETTER_-CONFIGORGANIZATION_IDint4True
PRINTED_DATEdatetime8True
SCHEDULED_LETTER_CONFIG_IDint4True
ASSIGNED_USER_IDint4True
LIEN_SAT_LETTER_TYPEvarchar(12)12True
REMINDER_WORKGROUP_IDint4True
LIENHOLDER_IDENTIFIERvarchar(16)16True
NUMBER_OF_LETTER_PAGESsmallint2True
IS_SIGNATURE_REQUIREDbit1True
SUPPRESSION_DATEdatetime8True
ADDRESS_IDint4True
FACILITY_IDsmallint2True
SUSPEND_DATEdatetime8True
DEMAND_DATEdatetime8True
RESPONSE_STATUSvarchar(25)25True
Indexes
KeyNameColumnsUniqueFill FactorFile Group
WORK_QUEUE_-ITEM_PKWORK_QUEUE_ITEM_IDTrue100CM_-Data
idx_addressADDRESS_ID90CM_-Index
index_WorkQueue-Item_AccountIdACCOUNT_ID90CM_-Index
index_WorkQueue-Item_Account-OwnershipDoc-MatchIdACCOUNT_OWNERSHIP_DOC_MATCH_ID90CM_-Index
index_WorkQueue-Item_ConcreteType_-CompletedDateTimeCONCRETE_TYPE, COMPLETED_DATE_TIME90CM_-Index
index_WorkQueue-Item_Discrepancies-WorkQueueCREATED_DATE, CONCRETE_TYPE, SECURED_-ORGANIZATIONORGANIZATION_ID, BUSINESS_PROCESS_-STATUS, ACCOUNT_ID, ACCOUNT_OWNERSHIP_DOC_-MATCH_ID, WORK_QUEUE_ITEM_ID90CM_-Index
index_WorkQueue-Item_Organization-Id_BusinessProcess-StatusSECURED_ORGANIZATIONORGANIZATION_ID, BUSINESS_-PROCESS_STATUS90CM_-Index
index_WorkQueue-Item_Organization-Id_CompletedDate-TimeSECURED_ORGANIZATIONORGANIZATION_ID, COMPLETED_DATE_TIME90CM_-Index
index_WorkQueue-Item_Organization-Id_ConcreteTypeSECURED_ORGANIZATIONORGANIZATION_ID, CONCRETE_TYPE90CM_-Index
index_WorkQueue-Item_Organization-Id_CreatedDateSECURED_ORGANIZATIONORGANIZATION_ID, CREATED_-DATE90CM_-Index
index_WorkQueue-Item_Organization-Id_CreatedDateTimeSECURED_ORGANIZATIONORGANIZATION_ID, CREATED_-DATE_TIME90CM_-Index
index_WorkQueue-Item_Organization-Id_ErrorIdERROR_ID90CM_-Index
index_WorkQueue-Item_Organization-Id_NameSECURED_ORGANIZATIONORGANIZATION_ID, NAME90CM_-Index
index_WorkQueue-Item_Organization-Id_Reminder-WorkgroupIdSECURED_ORGANIZATIONORGANIZATION_ID, REMINDER_-WORKGROUP_ID90CM_-Index
index_WorkQueue-Item_OwnershipDoc-IdOWNERSHIP_DOC_ID90CM_-Index
index_WorkQueue-Item_PreviousWork-ItemIdPREVIOUS_WORK_ITEM_ID95CM_-Index
index_WorkQueue-Item_ReminderDateREMIND_DATE90CM_-Index
index_WorkQueue-Item_Scheduled-LetterConfigIDSCHEDULED_LETTER_CONFIG_ID90CM_-Index
index_WorkQueue-Item_Secured-Organization-OrganizationIdSECURED_ORGANIZATIONORGANIZATION_ID90CM_-Index
index_WorkQueue-Item_ServiceRequest-IdSERVICE_REQUEST_ID90CM_-Index
index_WorkQueue-Item_XmlSerialized-InstanceIdXML_SERIALIZED_INSTANCE_ID90CM_-Index
Check Constraints
NameOn ColumnConstraint
WORK_QUEUE_-ITEMBUSINESS_PROCESS_-STATUS_ChkBUSINESS_-PROCESS_-STATUS([BUSINESS_PROCESS_STATUS]='CANCELLED' OR [BUSINESS_PROCESS_STATUS]='CLOSED' OR [BUSINESS_-PROCESS_STATUS]='OPEN')
Foreign Keys
NameColumns
ACCOUNT_WORK_QUEUE_ITEM_FK1ACCOUNT_ID->[dbo].[ACCOUNT].[ACCOUNT_ID]
ACCOUNT_PROPERTY_-OWNERSHIP_DOC_MATCH_WORK_-QUEUE_ITEM_FK1ACCOUNT_OWNERSHIP_DOC_MATCH_ID->[dbo].[ACCOUNT_OWNERSHIP_-DOC_MATCH].[ACCOUNT_OWNERSHIP_DOC_MATCH_ID]
ADDRESS_WORK_QUEUE_ITEM_FK1ADDRESS_ID->[dbo].[ADDRESS].[ADDRESS_ID]
USR_WORK_QUEUE_ITEM_FK3ASSIGNED_USER_ID->[dbo].[USR].[USR_ID]
USR_WORK_QUEUE_ITEM_FK1CREATING_USER_ID->[dbo].[USR].[USR_ID]
DIRECT_LENDING_SERVICES_-AUTOMATED_LETTER_CONFIG_-WORK_QUEUE_ITEM_FK1DIRECT_LENDING_SERVICES_AUTOMATED_LETTER_CONFIG_ID->[dbo].[DIRECT_LENDING_SERVICES_AUTOMATED_LETTER_CONFIG].[ID]
DIRECT_LENDING_SERVICES_AUTOMATED_LETTER_-CONFIGORGANIZATION_ID->[dbo].[DIRECT_LENDING_SERVICES_-AUTOMATED_LETTER_CONFIG].[CLIENT_ID]
ERROR_WORK_QUEUE_ITEM_FK1ERROR_ID->[dbo].[ERROR].[ERROR_ID]
FACILITY_WORK_QUEUE_ITEM_FK1FACILITY_ID->[dbo].[FACILITY].[Facility_Id]
OWNERSHIP_DOC_WORK_QUEUE_-ITEM_FK1OWNERSHIP_DOC_ID->[dbo].[OWNERSHIP_DOC].[OWNERSHIP_DOC_ID]
PDF_FORM_WORK_QUEUE_ITEM_-FK1PDF_FORM_ID->[dbo].[PDF_FORM].[PDF_FORM_ID]
WORK_QUEUE_ITEM_WORK_-QUEUE_ITEM_FK1PREVIOUS_WORK_ITEM_ID->[dbo].[WORK_QUEUE_ITEM].[WORK_QUEUE_-ITEM_ID]
WORKGROUP_WORK_QUEUE_-ITEM_FK1REMINDER_WORKGROUP_ID->[dbo].[WORKGROUP].[WORKGROUP_ID]
WORK_QUEUE_ITEM_SCHEDULED_-LETTER_CONFIG_FK1SCHEDULED_LETTER_CONFIG_ID->[dbo].[SCHEDULED_LETTER_-CONFIG].[SCHEDULED_LETTER_CONFIG_ID]
ORGANIZATION_WORK_QUEUE_-ITEM_FK1SECURED_ORGANIZATIONORGANIZATION_ID->[dbo].[ORGANIZATION].[ORGANIZATION_ID]
SERVICE_REQUEST_WORK_QUEUE_-ITEM_FK1SERVICE_REQUEST_ID->[dbo].[SERVICE_REQUEST].[SERVICE_REQUEST_ID]
USR_WORK_QUEUE_ITEM_FK2USR_ID->[dbo].[USR].[USR_ID]
XML_SERIALIZED_INSTANCE_WORK_-QUEUE_ITEM_FK1XML_SERIALIZED_INSTANCE_ID->[dbo].[XML_SERIALIZED_INSTANCE].[XML_-SERIALIZED_INSTANCE_ID]
SQL Script
CREATE TABLE [dbo].[WORK_QUEUE_ITEM]
(
[WORK_QUEUE_ITEM_ID] [int] NOT NULL IDENTITY(1, 1),
[LAST_MODIFIER] [int] NOT NULL,
[LAST_MOD_DATE_TIME] [datetime] NOT NULL,
[TRANS_SEQ_NUM] [smallint] NOT NULL,
[CONCRETE_TYPE] [varchar] (150) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[CREATED_DATE_TIME] [datetime] NOT NULL,
[COMPLETED_DATE_TIME] [datetime] NULL,
[REMIND_DATE] [smalldatetime] NULL,
[DESCRIPTION] [varchar] (300) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[CREATING_USER_ID] [int] NULL,
[OWNERSHIP_DOC_ID] [int] NULL,
[ACCOUNT_ID] [int] NULL,
[USR_ID] [int] NULL,
[USER_MESSAGE] [varchar] (256) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ERROR_ID] [int] NULL,
[PDF_FORM_ID] [int] NULL,
[BUSINESS_PROCESS_STATUS] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[NAME] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[PREVIOUS_MANUFACTURER_ID] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ACCOUNT_OWNERSHIP_DOC_MATCH_ID] [int] NULL,
[IS_FDI_RESPONSIBLE] [bit] NULL,
[PREVIOUS_WORK_ITEM_ID] [int] NULL,
[SERVICE_REQUEST_ID] [int] NULL,
[SECURED_ORGANIZATIONORGANIZATION_ID] [int] NOT NULL,
[DISCREPANT_VALUE] [varchar] (150) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[FORM_NAME] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[REQUEST_DATE] [smalldatetime] NULL,
[XML_SERIALIZED_INSTANCE_ID] [int] NULL,
[IS_CLIENT_ALERT] [bit] NULL,
[IS_FDI_ALERT] [bit] NULL,
[CREATED_DATE] [datetime] NULL,
[IS_BILLABLE] [bit] NULL,
[IS_DOCUMENTS_FOUND] [bit] NULL,
[ACTIVITY_SEQUENCE] [smallint] NULL,
[LETTER_STATUS] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[DIRECT_LENDING_SERVICES_AUTOMATED_LETTER_CONFIG_ID] [int] NULL,
[DIRECT_LENDING_SERVICES_AUTOMATED_LETTER_CONFIGORGANIZATION_ID] [int] NULL,
[PRINTED_DATE] [datetime] NULL,
[SCHEDULED_LETTER_CONFIG_ID] [int] NULL,
[ASSIGNED_USER_ID] [int] NULL,
[LIEN_SAT_LETTER_TYPE] [varchar] (12) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[REMINDER_WORKGROUP_ID] [int] NULL,
[LIENHOLDER_IDENTIFIER] [varchar] (16) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[NUMBER_OF_LETTER_PAGES] [smallint] NULL,
[IS_SIGNATURE_REQUIRED] [bit] NULL,
[SUPPRESSION_DATE] [datetime] NULL,
[ADDRESS_ID] [int] NULL,
[FACILITY_ID] [smallint] NULL,
[SUSPEND_DATE] [datetime] NULL,
[DEMAND_DATE] [datetime] NULL,
[RESPONSE_STATUS] [varchar] (25) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
) ON [CM_Data]
GO
ALTER TABLE [dbo].[WORK_QUEUE_ITEM] ADD CONSTRAINT [WORK_QUEUE_ITEMBUSINESS_PROCESS_-STATUS_Chk] CHECK (([BUSINESS_PROCESS_STATUS]='CANCELLED' OR [BUSINESS_PROCESS_-STATUS]='CLOSED' OR [BUSINESS_PROCESS_STATUS]='OPEN'))
GO
ALTER TABLE [dbo].[WORK_QUEUE_ITEM] ADD CONSTRAINT [WORK_QUEUE_ITEM_PK] PRIMARY KEY CLUSTERED ([WORK_QUEUE_ITEM_ID]) ON [CM_Data]
GO
CREATE NONCLUSTERED INDEX [index_WorkQueueItem_AccountId] ON [dbo].[WORK_QUEUE_ITEM] ([ACCOUNT_ID]) ON [CM_Index]
GO
CREATE NONCLUSTERED INDEX [index_WorkQueueItem_AccountOwnershipDocMatchId] ON [dbo].[WORK_QUEUE_ITEM] ([ACCOUNT_OWNERSHIP_DOC_MATCH_ID]) ON [CM_Index]
GO
CREATE NONCLUSTERED INDEX [idx_address] ON [dbo].[WORK_QUEUE_ITEM] ([ADDRESS_ID]) ON [CM_Index]
GO
CREATE NONCLUSTERED INDEX [index_WorkQueueItem_ConcreteType_CompletedDateTime] ON [dbo].[WORK_QUEUE_ITEM] ([CONCRETE_TYPE], [COMPLETED_DATE_TIME]) ON [CM_Index]
GO
CREATE NONCLUSTERED INDEX [index_WorkQueueItem_DiscrepanciesWorkQueue] ON [dbo].[WORK_-QUEUE_ITEM] ([CONCRETE_TYPE], [SECURED_ORGANIZATIONORGANIZATION_ID], [BUSINESS_PROCESS_-STATUS], [ACCOUNT_ID], [ACCOUNT_OWNERSHIP_DOC_MATCH_ID], [WORK_QUEUE_ITEM_ID]) INCLUDE ([CREATED_DATE]) ON [CM_Index]
GO
CREATE NONCLUSTERED INDEX [index_WorkQueueItem_OrganizationId_ErrorId] ON [dbo].[WORK_-QUEUE_ITEM] ([ERROR_ID]) ON [CM_Index]
GO
CREATE NONCLUSTERED INDEX [index_WorkQueueItem_OwnershipDocId] ON [dbo].[WORK_QUEUE_ITEM] ([OWNERSHIP_DOC_ID]) ON [CM_Index]
GO
CREATE NONCLUSTERED INDEX [index_WorkQueueItem_PreviousWorkItemId] ON [dbo].[WORK_QUEUE_-ITEM] ([PREVIOUS_WORK_ITEM_ID]) ON [CM_Index]
GO
CREATE NONCLUSTERED INDEX [index_WorkQueueItem_ReminderDate] ON [dbo].[WORK_QUEUE_ITEM] ([REMIND_DATE]) ON [CM_Index]
GO
CREATE NONCLUSTERED INDEX [index_WorkQueueItem_ScheduledLetterConfigID] ON [dbo].[WORK_-QUEUE_ITEM] ([SCHEDULED_LETTER_CONFIG_ID]) ON [CM_Index]
GO
CREATE NONCLUSTERED INDEX [index_WorkQueueItem_SecuredOrganizationOrganizationId] ON [dbo].[WORK_QUEUE_ITEM] ([SECURED_ORGANIZATIONORGANIZATION_ID]) ON [CM_Index]
GO
CREATE NONCLUSTERED INDEX [index_WorkQueueItem_OrganizationId_BusinessProcessStatus] ON [dbo].[WORK_QUEUE_ITEM] ([SECURED_ORGANIZATIONORGANIZATION_ID], [BUSINESS_PROCESS_-STATUS]) ON [CM_Index]
GO
CREATE NONCLUSTERED INDEX [index_WorkQueueItem_OrganizationId_CompletedDateTime] ON [dbo].[WORK_QUEUE_ITEM] ([SECURED_ORGANIZATIONORGANIZATION_ID], [COMPLETED_DATE_TIME]) ON [CM_Index]
GO
CREATE NONCLUSTERED INDEX [index_WorkQueueItem_OrganizationId_ConcreteType] ON [dbo].[WORK_QUEUE_ITEM] ([SECURED_ORGANIZATIONORGANIZATION_ID], [CONCRETE_TYPE]) ON [CM_-Index]
GO
CREATE NONCLUSTERED INDEX [index_WorkQueueItem_OrganizationId_CreatedDate] ON [dbo].[WORK_QUEUE_ITEM] ([SECURED_ORGANIZATIONORGANIZATION_ID], [CREATED_DATE]) ON [CM_-Index]
GO
CREATE NONCLUSTERED INDEX [index_WorkQueueItem_OrganizationId_CreatedDateTime] ON [dbo].[WORK_QUEUE_ITEM] ([SECURED_ORGANIZATIONORGANIZATION_ID], [CREATED_DATE_TIME]) ON [CM_Index]
GO
CREATE NONCLUSTERED INDEX [index_WorkQueueItem_OrganizationId_Name] ON [dbo].[WORK_-QUEUE_ITEM] ([SECURED_ORGANIZATIONORGANIZATION_ID], [NAME]) ON [CM_Index]
GO
CREATE NONCLUSTERED INDEX [index_WorkQueueItem_OrganizationId_ReminderWorkgroupId] ON [dbo].[WORK_QUEUE_ITEM] ([SECURED_ORGANIZATIONORGANIZATION_ID], [REMINDER_WORKGROUP_ID]) ON [CM_Index]
GO
CREATE NONCLUSTERED INDEX [index_WorkQueueItem_ServiceRequestId] ON [dbo].[WORK_QUEUE_-ITEM] ([SERVICE_REQUEST_ID]) ON [CM_Index]
GO
CREATE NONCLUSTERED INDEX [index_WorkQueueItem_XmlSerializedInstanceId] ON [dbo].[WORK_-QUEUE_ITEM] ([XML_SERIALIZED_INSTANCE_ID]) ON [CM_Index]
GO
ALTER TABLE [dbo].[WORK_QUEUE_ITEM] ADD CONSTRAINT [ACCOUNT_WORK_QUEUE_ITEM_FK1] FOREIGN KEY ([ACCOUNT_ID]) REFERENCES [dbo].[ACCOUNT] ([ACCOUNT_ID])
GO
ALTER TABLE [dbo].[WORK_QUEUE_ITEM] ADD CONSTRAINT [ACCOUNT_PROPERTY_OWNERSHIP_DOC_-MATCH_WORK_QUEUE_ITEM_FK1] FOREIGN KEY ([ACCOUNT_OWNERSHIP_DOC_MATCH_ID]) REFERENCES [dbo].[ACCOUNT_OWNERSHIP_DOC_MATCH] ([ACCOUNT_OWNERSHIP_DOC_MATCH_ID])
GO
ALTER TABLE [dbo].[WORK_QUEUE_ITEM] ADD CONSTRAINT [ADDRESS_WORK_QUEUE_ITEM_FK1] FOREIGN KEY ([ADDRESS_ID]) REFERENCES [dbo].[ADDRESS] ([ADDRESS_ID])
GO
ALTER TABLE [dbo].[WORK_QUEUE_ITEM] ADD CONSTRAINT [USR_WORK_QUEUE_ITEM_FK3] FOREIGN KEY ([ASSIGNED_USER_ID]) REFERENCES [dbo].[USR] ([USR_ID])
GO
ALTER TABLE [dbo].[WORK_QUEUE_ITEM] ADD CONSTRAINT [USR_WORK_QUEUE_ITEM_FK1] FOREIGN KEY ([CREATING_USER_ID]) REFERENCES [dbo].[USR] ([USR_ID])
GO
ALTER TABLE [dbo].[WORK_QUEUE_ITEM] ADD CONSTRAINT [DIRECT_LENDING_SERVICES_AUTOMATED_-LETTER_CONFIG_WORK_QUEUE_ITEM_FK1] FOREIGN KEY ([DIRECT_LENDING_SERVICES_AUTOMATED_-LETTER_CONFIG_ID], [DIRECT_LENDING_SERVICES_AUTOMATED_LETTER_CONFIGORGANIZATION_ID]) REFERENCES [dbo].[DIRECT_LENDING_SERVICES_AUTOMATED_LETTER_CONFIG] ([ID], [CLIENT_ID])
GO
ALTER TABLE [dbo].[WORK_QUEUE_ITEM] ADD CONSTRAINT [ERROR_WORK_QUEUE_ITEM_FK1] FOREIGN KEY ([ERROR_ID]) REFERENCES [dbo].[ERROR] ([ERROR_ID])
GO
ALTER TABLE [dbo].[WORK_QUEUE_ITEM] ADD CONSTRAINT [FACILITY_WORK_QUEUE_ITEM_FK1] FOREIGN KEY ([FACILITY_ID]) REFERENCES [dbo].[FACILITY] ([Facility_Id])
GO
ALTER TABLE [dbo].[WORK_QUEUE_ITEM] ADD CONSTRAINT [OWNERSHIP_DOC_WORK_QUEUE_ITEM_FK1] FOREIGN KEY ([OWNERSHIP_DOC_ID]) REFERENCES [dbo].[OWNERSHIP_DOC] ([OWNERSHIP_DOC_ID])
GO
ALTER TABLE [dbo].[WORK_QUEUE_ITEM] ADD CONSTRAINT [PDF_FORM_WORK_QUEUE_ITEM_FK1] FOREIGN KEY ([PDF_FORM_ID]) REFERENCES [dbo].[PDF_FORM] ([PDF_FORM_ID])
GO
ALTER TABLE [dbo].[WORK_QUEUE_ITEM] ADD CONSTRAINT [WORK_QUEUE_ITEM_WORK_QUEUE_ITEM_FK1] FOREIGN KEY ([PREVIOUS_WORK_ITEM_ID]) REFERENCES [dbo].[WORK_QUEUE_ITEM] ([WORK_QUEUE_-ITEM_ID])
GO
ALTER TABLE [dbo].[WORK_QUEUE_ITEM] ADD CONSTRAINT [WORKGROUP_WORK_QUEUE_ITEM_FK1] FOREIGN KEY ([REMINDER_WORKGROUP_ID]) REFERENCES [dbo].[WORKGROUP] ([WORKGROUP_ID])
GO
ALTER TABLE [dbo].[WORK_QUEUE_ITEM] ADD CONSTRAINT [WORK_QUEUE_ITEM_SCHEDULED_LETTER_-CONFIG_FK1] FOREIGN KEY ([SCHEDULED_LETTER_CONFIG_ID]) REFERENCES [dbo].[SCHEDULED_-LETTER_CONFIG] ([SCHEDULED_LETTER_CONFIG_ID])
GO
ALTER TABLE [dbo].[WORK_QUEUE_ITEM] ADD CONSTRAINT [ORGANIZATION_WORK_QUEUE_ITEM_FK1] FOREIGN KEY ([SECURED_ORGANIZATIONORGANIZATION_ID]) REFERENCES [dbo].[ORGANIZATION] ([ORGANIZATION_ID])
GO
ALTER TABLE [dbo].[WORK_QUEUE_ITEM] ADD CONSTRAINT [SERVICE_REQUEST_WORK_QUEUE_ITEM_FK1] FOREIGN KEY ([SERVICE_REQUEST_ID]) REFERENCES [dbo].[SERVICE_REQUEST] ([SERVICE_REQUEST_-ID])
GO
ALTER TABLE [dbo].[WORK_QUEUE_ITEM] ADD CONSTRAINT [USR_WORK_QUEUE_ITEM_FK2] FOREIGN KEY ([USR_ID]) REFERENCES [dbo].[USR] ([USR_ID])
GO
ALTER TABLE [dbo].[WORK_QUEUE_ITEM] ADD CONSTRAINT [XML_SERIALIZED_INSTANCE_WORK_QUEUE_-ITEM_FK1] FOREIGN KEY ([XML_SERIALIZED_INSTANCE_ID]) REFERENCES [dbo].[XML_SERIALIZED_-INSTANCE] ([XML_SERIALIZED_INSTANCE_ID])
GO
Uses
[dbo].[ACCOUNT]
[dbo].[ACCOUNT_OWNERSHIP_DOC_MATCH]
[dbo].[ADDRESS]
[dbo].[DIRECT_LENDING_SERVICES_AUTOMATED_LETTER_CONFIG]
[dbo].[ERROR]
[dbo].[FACILITY]
[dbo].[ORGANIZATION]
[dbo].[OWNERSHIP_DOC]
[dbo].[PDF_FORM]
[dbo].[SCHEDULED_LETTER_CONFIG]
[dbo].[SERVICE_REQUEST]
[dbo].[USR]
[dbo].[WORKGROUP]
[dbo].[XML_SERIALIZED_INSTANCE]
Used By
[dbo].[DLS_THIRD_PARTY_REQUIRED_DOCUMENTS]
[dbo].[DMV_REJECT]
[dbo].[EVENT]
[dbo].[FOLLOW_UP_ACTIVITY]
[dbo].[GENERATED_FORM_PAGE]
[dbo].[RESPONSIBILITY_ASSIGNMENT]
[dbo].[STATE_HOLD_ON_OWNERSHIP_DOC]
[dbo].[THIRD_PARTY_REQUEST_ACTIVITY_REASON]
[dbo].[usp_CreateTransferError]
February 13, 2016 at 3:57 pm
Thanks, but that was a mess...
For those who want to actually compile the schema:
CREATE TABLE [dbo].[ADDRESS]
(
[ADDRESS_ID] [int] NOT NULL IDENTITY(1, 1),
[LAST_MODIFIER] [int] NOT NULL,
[LAST_MOD_DATE_TIME] [datetime] NOT NULL,
[TRANS_SEQ_NUM] [smallint] NOT NULL,
[ADDRESS_LINE_1] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ADDRESS_LINE_2] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[CITY] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[STATE] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[POSTAL_CODE] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[COUNTY] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[COUNTRY] [varchar] (24) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ADDRESS_LINE_3] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ADDRESS_LINE_4] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[MAILING_NAME_2] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[MAILING_NAME_1] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[IS_FDI] [bit] NOT NULL CONSTRAINT [DF__ADDRESS__IS_FDI__22FFFAA8] DEFAULT ((0))
)
GO
ALTER TABLE [dbo].[ADDRESS] ADD CONSTRAINT [ADDRESS_PK] PRIMARY KEY CLUSTERED ([ADDRESS_ID])
GO
CREATE NONCLUSTERED INDEX [_dta_index_ADDRESS_16_1570104634__K8_K1] ON [dbo].[ADDRESS] ([STATE], [ADDRESS_ID])
GO
CREATE TABLE [dbo].[CHECK_REQUEST_DEFAULT_ADDRESS]
(
[CHECK_REQUEST_DEFAULT_ADDRESS_ID] [int] NOT NULL IDENTITY(1, 1),
[STATE_PROVINCE_ID] [int] NOT NULL,
[ADDRESS_ID] [int] NOT NULL,
[COUNTY] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[REQUEST_TYPE] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[LAST_MOD_DATE_TIME] [datetime] NOT NULL,
[LAST_MODIFIER] [int] NOT NULL,
[DEFAULT_AMOUNT] [decimal] (9, 2) NULL,
[TRANS_SEQ_NUM] [smallint] NOT NULL,
[ACTIVITY_NAME] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[REQUEST_TRANSACTION_TYPE] [varchar] (60) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[DUP_AMOUNT] [decimal] (9, 2) NULL
)
GO
ALTER TABLE [dbo].[CHECK_REQUEST_DEFAULT_ADDRESS] ADD CONSTRAINT [CHECK_REQUEST_DEFAULT_ADDRESS_PK] PRIMARY KEY CLUSTERED ([CHECK_REQUEST_DEFAULT_ADDRESS_ID])
GO
ALTER TABLE [dbo].[CHECK_REQUEST_DEFAULT_ADDRESS] ADD CONSTRAINT [CHECK_REQUEST_DEFAULT_ADDRESS_UC1] UNIQUE NONCLUSTERED ([REQUEST_TRANSACTION_TYPE], [REQUEST_TYPE], [ACTIVITY_NAME], [STATE_PROVINCE_ID], [COUNTY])
GO
CREATE NONCLUSTERED INDEX [idx_address] ON [dbo].[CHECK_REQUEST_DEFAULT_ADDRESS] ([ADDRESS_ID])
GO
ALTER TABLE [dbo].[CHECK_REQUEST_DEFAULT_ADDRESS] ADD CONSTRAINT [ADDRESS_CHECK_REQUEST_DEFAULT_ADDRESS_FK1] FOREIGN KEY ([ADDRESS_ID]) REFERENCES [dbo].[ADDRESS] ([ADDRESS_ID])
GO
--ALTER TABLE [dbo].[CHECK_REQUEST_DEFAULT_ADDRESS] ADD CONSTRAINT [STATE_PROVINCE_CHECK_REQUEST_DEFAULT_ADDRESS_FK1] FOREIGN KEY ([STATE_PROVINCE_ID]) REFERENCES [dbo].[STATE_PROVINCE] ([STATE_PROVINCE_ID])
CREATE TABLE [dbo].[DIRECT_LENDING_SERVICE]
(
[LAST_MOD_DATE_TIME] [datetime] NOT NULL,
[LAST_MODIFIER] [int] NOT NULL,
[TRANS_SEQ_NUM] [smallint] NOT NULL,
[DIRECT_LENDING_SERVICE_ID] [int] NOT NULL IDENTITY(1, 1),
[SERVICE_REQUEST_ID] [int] NOT NULL,
[PREV_LIENHOLDER_MAIL_TO_ADDRESS_ID] [int] NULL,
[PACKET_ID] [int] NULL,
[SLA_START_DATE] [datetime] NULL,
[SLA_END_DATE] [datetime] NULL,
[IS_ADD_DELETE_REQUIRED] [bit] NOT NULL,
[IS_DUPLICATE_REQUIRED] [bit] NOT NULL,
[DUP_EXTERNAL_CHECK_NUM] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[LP_EXTERNAL_CHECK_NUM] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[PREV_SLA_START_DATE] [datetime] NULL,
[DMV_MAIL_DATE] [datetime] NULL,
[EXTENDED_SERVICE_START_DATE] [datetime] NULL,
[SLA_WORK_DAYS] [int] NULL,
[DMV_REJECT_COUNT] [int] NULL,
[THIRD_PARTY_REQUEST_COUNT] [int] NOT NULL,
[NAME_CHANGE_NAMES] [varchar] (300) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[CURRENT_EXCEPTION_TYPE] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[EEE_RESUME_DATE] [datetime] NULL,
[PREV_SLA_END_DATE] [datetime] NULL,
[IS_IN_FORCED_PLACEMENT] [bit] NOT NULL CONSTRAINT [DF__DIRECT_LE__IS_IN__7DD962F1] DEFAULT ((0)),
[EXCEPTION_INITIATED_DATE] [datetime] NULL,
[CLIENT_ID] [int] NOT NULL,
[PAI_DATE] [datetime] NULL,
[COUNTY] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
)
GO
ALTER TABLE [dbo].[DIRECT_LENDING_SERVICE] ADD CONSTRAINT [DIRECT_LENDING_SERVICE_PK] PRIMARY KEY CLUSTERED ([DIRECT_LENDING_SERVICE_ID])
GO
ALTER TABLE [dbo].[DIRECT_LENDING_SERVICE] ADD CONSTRAINT [TITLING_SERVICE_UC1] UNIQUE NONCLUSTERED ([SERVICE_REQUEST_ID])
GO
CREATE NONCLUSTERED INDEX [index_DIRECT_LENDING_SERVICE_CLIENT_ID] ON [dbo].[DIRECT_LENDING_SERVICE] ([CLIENT_ID])
GO
CREATE NONCLUSTERED INDEX [index_Direct_Lending_Service_Packet_ID_Service_Request_id] ON [dbo].[DIRECT_LENDING_SERVICE] ([PACKET_ID]) INCLUDE ([SERVICE_REQUEST_ID])
GO
CREATE NONCLUSTERED INDEX [idx_PREV_LIENHOLDER_MAIL_TO_ADDRESS] ON [dbo].[DIRECT_LENDING_SERVICE] ([PREV_LIENHOLDER_MAIL_TO_ADDRESS_ID])
GO
CREATE TABLE [dbo].[EARLY_PAYOFF_INFO]
(
[EARLY_PAYOFF_INFO_ID] [int] NOT NULL IDENTITY(1, 1),
[COLLATERAL_GROUP_REQUESTSERVICE_REQUEST_ID] [int] NOT NULL,
[ADDRESS_ID] [int] NULL,
[ADDRESS_ID1] [int] NULL,
[ADDRESS_ID2] [int] NULL,
[LAST_MODIFIER] [int] NOT NULL,
[LAST_MOD_DATE_TIME] [datetime] NOT NULL,
[TRANS_SEQ_NUM] [smallint] NOT NULL,
[CONTRACT_DATE] [datetime] NULL,
[COVERAGE_TERM] [int] NULL,
[A_H_AMOUNT] [decimal] (10, 2) NULL,
[GAP_AMOUNT] [decimal] (10, 2) NULL,
[CREDIT_LIFE_AMOUNT] [decimal] (10, 2) NULL,
[REFUND_AMOUNT] [decimal] (10, 2) NULL,
[ACTIVE] [bit] NOT NULL
)
GO
ALTER TABLE [dbo].[EARLY_PAYOFF_INFO] ADD CONSTRAINT [EARLY_PAYOFF_INFO_PK] PRIMARY KEY CLUSTERED ([EARLY_PAYOFF_INFO_ID])
GO
CREATE NONCLUSTERED INDEX [EarlyPayoffInfo_CollateralGroupRequestId] ON [dbo].[EARLY_PAYOFF_INFO] ([COLLATERAL_GROUP_REQUESTSERVICE_REQUEST_ID])
GO
CREATE TABLE [dbo].[LEGAL_ENTITY]
(
[LEGAL_ENTITY_ID] [int] NOT NULL IDENTITY(1, 1),
[LAST_MODIFIER] [int] NOT NULL,
[LAST_MOD_DATE_TIME] [datetime] NOT NULL,
[TRANS_SEQ_NUM] [smallint] NOT NULL,
[TITLING_AGENCY_ID] [int] NULL,
[CONCRETE_TYPE] [varchar] (150) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[ACCOUNT_ID] [int] NULL,
[MIDDLE_NAME] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[RECORDED_LEGAL_ENTITY_TYPE] [varchar] (8) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[FIRST_NAME] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[LAST_NAME] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ADDRESS_ID] [int] NULL,
[PRECEDENCE] [smallint] NULL,
[HOME_TELEPHONE] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[OWNERSHIP_DOC_ID] [int] NULL,
[BUSINESS_TELEPHONE] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ACCOUNT_DATA_ID] [int] NULL,
[SERVICE_CENTER_CODE] [char] (3) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[FULL_NAME] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[CONJUNCTION] [varchar] (3) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[IS_LESSEE] [bit] NULL,
[SUFFIX] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[CONTACT_TELEPHONE] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[BUSINESS_FAX] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[CREATED_DATE_TIME] [datetime] NOT NULL,
[varchar] (max) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[CLIENTORGANIZATION_ID] [int] NULL,
[ENTITY_CODE] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ENTITY_TYPE] [varchar] (25) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[CONTACT_NAME] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[EMAIL_ADDRESS] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[DEALERSHIP_TYPE] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ENTITY_STATUS] [varchar] (25) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[SALUTATION] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[COLLATERAL_GROUP_REQUESTSERVICE_REQUEST_ID] [int] NULL,
[XML_SERIALIZED_INSTANCE_ID] [int] NULL,
[NORMALIZED_ENTITY_CODE] AS (right('0000000000'+ltrim(rtrim([ENTITY_CODE])),(10))) PERSISTED,
[FOLLOW_UP_LAST_CALL_DATE] [datetime] NULL,
[FOLLOW_UP_LAST_LETTER_DATE] [datetime] NULL
)
GO
ALTER TABLE [dbo].[LEGAL_ENTITY] ADD CONSTRAINT [LEGAL_ENTITYENTITY_STATUS_Chk] CHECK (([ENTITY_STATUS]='INACTIVE' OR [ENTITY_STATUS]='ACTIVE'))
GO
ALTER TABLE [dbo].[LEGAL_ENTITY] ADD CONSTRAINT [LEGAL_ENTITYENTITY_TYPE_Chk] CHECK (([ENTITY_TYPE]='OTHER' OR [ENTITY_TYPE]='PREVIOUS_LIENHOLDER' OR [ENTITY_TYPE]='DEALER'))
GO
ALTER TABLE [dbo].[LEGAL_ENTITY] ADD CONSTRAINT [LEGAL_ENTITY_PK_2] PRIMARY KEY CLUSTERED ([LEGAL_ENTITY_ID])
GO
CREATE NONCLUSTERED INDEX [index_LegalEntity_AccountDataId] ON [dbo].[LEGAL_ENTITY] ([ACCOUNT_DATA_ID])
GO
CREATE NONCLUSTERED INDEX [index_LegalEntity_AccountId] ON [dbo].[LEGAL_ENTITY] ([ACCOUNT_ID])
GO
CREATE NONCLUSTERED INDEX [index_LegalEntity_AddressId] ON [dbo].[LEGAL_ENTITY] ([ADDRESS_ID])
GO
CREATE NONCLUSTERED INDEX [index_LegalEntity_ClientOrganizationId] ON [dbo].[LEGAL_ENTITY] ([CLIENTORGANIZATION_ID])
GO
CREATE NONCLUSTERED INDEX [index_LegalEntity_ClientId_NormalizedEntityCode] ON [dbo].[LEGAL_ENTITY] ([CLIENTORGANIZATION_ID], [NORMALIZED_ENTITY_CODE])
GO
CREATE NONCLUSTERED INDEX [index_LegalEntity_CollateralGroupRequestServiceRequestId] ON [dbo].[LEGAL_ENTITY] ([COLLATERAL_GROUP_REQUESTSERVICE_REQUEST_ID])
GO
CREATE NONCLUSTERED INDEX [index_LegalEntity_ConcreteType_ClientId] ON [dbo].[LEGAL_ENTITY] ([CONCRETE_TYPE], [CLIENTORGANIZATION_ID])
GO
CREATE NONCLUSTERED INDEX [index_LegalEntity_EntityCode] ON [dbo].[LEGAL_ENTITY] ([ENTITY_CODE])
GO
CREATE NONCLUSTERED INDEX [index_LegalEntity_EntityType] ON [dbo].[LEGAL_ENTITY] ([ENTITY_TYPE])
GO
CREATE NONCLUSTERED INDEX [index_LegalEntity_FullName] ON [dbo].[LEGAL_ENTITY] ([FULL_NAME])
GO
CREATE NONCLUSTERED INDEX [index_LEGAL_ENTITY_ID_REQUEST_ID] ON [dbo].[LEGAL_ENTITY] ([LEGAL_ENTITY_ID], [COLLATERAL_GROUP_REQUESTSERVICE_REQUEST_ID]) INCLUDE ([ENTITY_CODE], [FULL_NAME])
GO
CREATE NONCLUSTERED INDEX [index_LegalEntity_OwnershipDocId] ON [dbo].[LEGAL_ENTITY] ([OWNERSHIP_DOC_ID])
GO
CREATE NONCLUSTERED INDEX [index_LEGAL_ENTITY_TITLING_AGENCY_ID] ON [dbo].[LEGAL_ENTITY] ([TITLING_AGENCY_ID])
GO
CREATE NONCLUSTERED INDEX [index_LEGAL_ENTITY_XML_SERIALIZED_INSTANCE_ID] ON [dbo].[LEGAL_ENTITY] ([XML_SERIALIZED_INSTANCE_ID])
GO
CREATE TABLE [dbo].[LIENHOLDER]
(
[LIENHOLDER_ID] [int] NOT NULL IDENTITY(1, 1),
[LAST_MODIFIER] [int] NOT NULL,
[LAST_MOD_DATE_TIME] [datetime] NOT NULL,
[TRANS_SEQ_NUM] [smallint] NOT NULL,
[ADDRESS_ID] [int] NULL,
[LIENHOLDER_NAME] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[LIENHOLDER_IDENTIFIER] [varchar] (16) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[FEDERAL_EMPLOYER_ID_NUMBER] [char] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[FEDERAL_EMPLOYER_ID_NUMBER_SUFFIX] [varchar] (16) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[DMV_ESCROW_ACCOUNT_NUMBER] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[LOCATION_CODE] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
)
GO
ALTER TABLE [dbo].[LIENHOLDER] ADD CONSTRAINT [LIENHOLDER_PK] PRIMARY KEY CLUSTERED ([LIENHOLDER_ID])
GO
CREATE NONCLUSTERED INDEX [_dta_index_LIENHOLDER_5_1413580074__K5] ON [dbo].[LIENHOLDER] ([ADDRESS_ID])
GO
CREATE NONCLUSTERED INDEX [index_Lienholder_LienholderIdentifier] ON [dbo].[LIENHOLDER] ([LIENHOLDER_IDENTIFIER])
GO
ALTER TABLE [dbo].[LIENHOLDER] ADD CONSTRAINT [ADDRESS_LIENHOLDER_FK1] FOREIGN KEY ([ADDRESS_ID]) REFERENCES [dbo].[ADDRESS] ([ADDRESS_ID])
GO
CREATE TABLE [dbo].[PACKET]
(
[PACKET_ID] [int] NOT NULL IDENTITY(1, 1),
[LAST_MOD_DATE_TIME] [datetime] NOT NULL,
[LAST_MODIFIER] [int] NOT NULL,
[TRANS_SEQ_NUM] [smallint] NOT NULL,
[COMPLETE_DATE_TIME] [datetime] NULL,
[MAILED_DATETIME] [datetime] NULL,
[PACKET_CATEGORY_ID] [int] NOT NULL,
[CREATED_DATE_TIME] [datetime] NOT NULL,
[ACCOUNT_ID] [int] NULL,
[CONCRETE_TYPE] [varchar] (150) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[TRACKING_NUMBER] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ADDRESS_ID] [int] NULL,
[BUSINESS_OBJECT_STATUS] [varchar] (7) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[DOCUMENT_LOCATION] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[BATCH_NUMBER] [varchar] (25) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[BATCHFACILITYTRANSFER_ID] [int] NULL,
[MAIL_CARRIER] [varchar] (40) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
)
GO
ALTER TABLE [dbo].[PACKET] ADD CONSTRAINT [PACKET_PK] PRIMARY KEY CLUSTERED ([PACKET_ID])
GO
CREATE NONCLUSTERED INDEX [index_Packet_AccountId] ON [dbo].[PACKET] ([ACCOUNT_ID])
GO
CREATE NONCLUSTERED INDEX [idx_address] ON [dbo].[PACKET] ([ADDRESS_ID])
GO
CREATE TABLE [dbo].[SERVICE_REQUEST]
(
[SERVICE_REQUEST_ID] [int] NOT NULL IDENTITY(1, 1),
[BUSINESS_PROCESS_STATUS] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[VIRGINIA_CUSTOMER_SERVICE_CENTER_ID] [int] NULL,
[TITLING_AGENCY_LIENHOLDER_ID] [int] NULL,
[CONCRETE_TYPE] [varchar] (150) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[USR_ID] [int] NOT NULL,
[LAST_MOD_DATE_TIME] [datetime] NOT NULL,
[LAST_MODIFIER] [int] NOT NULL,
[TRANS_SEQ_NUM] [smallint] NOT NULL,
[RECORDED_REQUEST_DATE] [smalldatetime] NOT NULL,
[REQUEST_MECHANISM_TYPE] [varchar] (8) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[CREATED_DATE_TIME] [datetime] NOT NULL,
[REQUEST_TRANSACTION_TYPE] [varchar] (60) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ADDRESS_ID] [int] NULL,
[IS_EXPEDITED] [bit] NULL,
[RESEARCH_QUESTION] [varchar] (173) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[REQUEST_CATEGORY] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[XML_SERIALIZED_INSTANCE_ID] [int] NULL,
[LAST_EXPORT_TO_STATE_DATE] [datetime] NULL,
[LAST_STATE_RESPONSE_DATE] [datetime] NULL,
[STATE_CLOSED_DATE] [datetime] NULL,
[LAST_STATE_RESPONSE_CODE] [varchar] (120) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[REJECTION_NOTE] [varchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[IS_REASSIGNED] [bit] NULL,
[PORTFOLIO_TRANSFER_NAME] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[TRANSFER_TO_TITLING_AGENCY_LIENHOLDER_ID] [int] NULL,
[LIENHOLDER_PERFORMING_LIEN_FILING_ID] [int] NULL,
[VEHICLE_TYPE] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[DOCUMENT_NUMBER] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[NUMBER_OF_MEMO_TITLES] [smallint] NULL,
[OHIO_CONTROL_NUMBER] [varchar] (9) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[DISPOSITION_CODE] [char] (1) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[NEW_YORK_LIEN_FILING_TRANSACTION_TYPE] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[LIEN_RELEASE_SEQUENCE_NUMBER] [smallint] NULL,
[MAKE] [varchar] (25) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[YEAR] [char] (4) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[MANUFACTURER_ID] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ELECTRONIC_TITLES_TO_TRANSFER_PER_DAY] [int] NULL,
[FINANCED_DATE] [datetime] NULL,
[TITLE_NUMBER] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[OHIO_CONTROL_NUMBER1] [varchar] (9) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[NUMBER_OF_OPEN_LIENS] [smallint] NULL,
[PARENT_SERVICE_REQUEST_ID] [int] NULL,
[PREVIOUS_SERVICE_REQUEST_ID] [int] NULL,
[SERVICE_REQUEST_STATUS] [varchar] (40) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[SPECIAL_MAIL_HANDLING_INSTRUCTIONS] [varchar] (200) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[MAIL_CARRIER] [varchar] (40) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[CLIENT_ID] [int] NULL,
[IS_ON_HOLD_INDEFINITELY] [bit] NULL,
[PRINT_REQUEST_ID] [int] NULL,
[ACTION_DATE] [datetime] NULL,
[DUPLICATE_TITLE_REQUEST_REASON] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[FDI_DEPARTMENT_ID] [int] NULL,
[JURISDICTION_ID] [int] NULL,
[ELT_RESPONSE_ERRORERROR_ID] [int] NULL,
[TRANSFERRED_OWNERSHIP_DOC_ID] [int] NULL,
[ACCOUNT_IMPORT_ERRORERROR_ID] [int] NULL,
[TRANSFERRED_ACCOUNT_ID] [int] NULL,
[COLLATERAL_GROUP_STATUS] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[XML_DOCUMENT_DATA] [text] COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[IS_EXPEDITED_FROM_VAULT] [bit] NULL,
[IS_CONFIRM_RECEIPT] [bit] NULL,
[CHECK_REPORT_ID] [int] NULL,
[MANUFACTURER_ID1] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[BUYERS_NAME] [varchar] (60) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[DEALER_REPORT_NUMBER] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[DATE_OF_SALE] [smalldatetime] NULL,
[RECEIPT_NUMBER] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[DMV_FEES_COLLECTED] [decimal] (9, 2) NULL,
[IS_USED] [bit] NULL,
[CALIFORNIA_TRANSMITTAL_FORMXML_SERIALIZED_INSTANCE_ID] [int] NULL,
[AMOUNT] [decimal] (9, 2) NULL,
[AMOUNT_BILLED] [decimal] (9, 2) NULL,
[CHECK_NUMBER] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[PAYEE_NAME] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[IS_RELEASE_DUE_TO_INSURANCE_LOSS] [bit] NULL,
[IS_LETTERS_PRINTED] [bit] NULL,
[LAST_SERVICE_REQUEST_STATUS_CHANGE_DATE_TIME] [datetime] NULL,
[IS_NOTARY_REQUIRED] [bit] NULL,
[NOTARY_STATE_ABBR] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[AMOUNT_OF_CASH_OR_CHECK] [decimal] (9, 2) NULL,
[IS_BILLABLE] [bit] NULL,
[SALES_TAX] [decimal] (8, 2) NULL,
[END_OF_LEASE_PURCHASE_PRICE] [decimal] (16, 2) NULL,
[MISCELLANEOUS_FEES] [decimal] (8, 2) NULL,
[ODOMETER_READING] [int] NULL,
[LIEN_DATE] [datetime] NULL,
[CAN_DISPATCH_BE_COMPLETED] [bit] NOT NULL CONSTRAINT [DF__SERVICE_R__CAN_D__74450BBF] DEFAULT ((0)),
[DOES_REQUIRED_DUPLICATE_NEED_TO_BE_ORDERED] [bit] NOT NULL CONSTRAINT [DF__SERVICE_R__DOES___75392FF8] DEFAULT ((0)),
[STATUS_CHANGE_REASON] [varchar] (25) COLLATE SQL_Latin1_General_CP1_CI_AS NULL CONSTRAINT [DF__SERVICE_R__COMPL__7DCE75F9] DEFAULT (NULL),
[OPERATION_CODE_ID] [int] NULL CONSTRAINT [DF__SERVICE_R__OPERA__7EC29A32] DEFAULT (NULL),
[PREVIOUS_SERVICE_REQUEST_STATUS] [varchar] (40) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[CARRIER_TRACKING_NUMBER] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[LUXURY_TAX] [decimal] (8, 2) NULL,
[PROPERTY_TAX] [decimal] (8, 2) NULL,
[ODOMETER_READING_DATE] [datetime] NULL,
[OWNERSHIP_DOC_TRANSFER_METHOD] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[TRANSFER_FROM_TITLING_AGENCY_LIENHOLDER_ID] [int] NULL,
[PORTFOLIO_TRANSFER_BRANCH] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[TTA_CLIENT_REQUEST_RELEASE_CODE] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[LAST_PRINTED_ON_REPORT_DATE] [datetime] NULL,
[REQUEST_STATE_TO_PRINT_PAPER_TITLE] [bit] NOT NULL CONSTRAINT [DF_SERVICE_REQUEST_REQUEST_STATE_TO_PRINT_PAPER_TITLE] DEFAULT ((0)),
[CREATED_DATE] [datetime] NULL,
[CURRENT_ACTIVITY_SEQUENCE] [smallint] NULL,
[IS_LIEN_FILING_DUE_TO_DIRECT_LENDING] [bit] NULL,
[MAILED_TO_DMV_DATE] [datetime] NULL,
[OWNER_EIN_FID] [varchar] (9) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[RELATED_BUSINESS_PROCESS] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[EEE_CAUSE] [varchar] (25) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[EEE_DATE] [datetime] NULL,
[POST_EEE] [varchar] (8) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[POST_EEE_DATE] [datetime] NULL,
[PREV_POST_EEE] [varchar] (8) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[EEE_REASON_ID] [int] NULL,
[BILLING_TYPE_ID] [int] NULL,
[PEER_SERVICE_REQUEST_ID] [int] NULL,
[IS_LOGICALLY_SUSPENDED] [bit] NULL,
[ADDRESS_DERIVATION] [varchar] (20) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ERROR_CODE] [varchar] (25) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[COMMENT] [varchar] (100) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[SUPPRESSED_DATE] [datetime] NULL,
[FLEET_REQUEST_ID] [uniqueidentifier] NULL,
[STATE_CLOSED_DATE_ONLY] [datetime] NULL,
[FACILITY_ID] [smallint] NULL,
[DUPLICATE_TITLE_SLA_START_DATE] [datetime] NULL,
[IS_SUBSEQENT_RELEASE_REQUIRE] [bit] NULL,
[IS_ACCELERATED_TITLE] [bit] NULL,
[IS_DMV_REJECT] [bit] NULL CONSTRAINT [DF__SERVICE_R__IS_DM__0CFD8E35] DEFAULT ((0)),
[IS_POST_FEE] [bit] NULL,
[AT_PAYOFF_AMOUNT] [decimal] (10, 2) NULL,
[AT_EFFECTIVE_DATE] [datetime] NULL,
[IS_PAID] [bit] NULL,
[TITLING_JURISDICTION_LIENHOLDERID_NEW] [int] NULL,
[varchar] (150) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[IS_CLOSED_VIA_GUI] [bit] NULL,
[PHONE_NO] [varchar] (15) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
)
GO
ALTER TABLE [dbo].[SERVICE_REQUEST] ADD CONSTRAINT [SERVICE_REQUEST_REQUEST_CATEGORY_Chk] CHECK (([REQUEST_CATEGORY] = 'TITLE_MAINTENANCE' or [REQUEST_CATEGORY] = 'NULL'))
GO
ALTER TABLE [dbo].[SERVICE_REQUEST] ADD CONSTRAINT [SERVICE_REQUESTBUSINESS_PROCESS_STATUS_Chk] CHECK (([BUSINESS_PROCESS_STATUS]='Cancelled' OR [BUSINESS_PROCESS_STATUS]='Closed' OR [BUSINESS_PROCESS_STATUS]='Open' OR [BUSINESS_PROCESS_STATUS]='Not-Started'))
GO
ALTER TABLE [dbo].[SERVICE_REQUEST] ADD CONSTRAINT [SERVICE_REQUESTELECTRONIC_TITLES_TO_TRANSFER_PER_DAY_Chk] CHECK (([ELECTRONIC_TITLES_TO_TRANSFER_PER_DAY]<=(5000)))
GO
ALTER TABLE [dbo].[SERVICE_REQUEST] ADD CONSTRAINT [SERVICE_REQUESTNEW_YORK_LIEN_FILING_TRANSACTION_TYPE_Chk] CHECK (([NEW_YORK_LIEN_FILING_TRANSACTION_TYPE] = 'Notice' or [NEW_YORK_LIEN_FILING_TRANSACTION_TYPE] = 'Cancellation' or [NEW_YORK_LIEN_FILING_TRANSACTION_TYPE] = 'Release' or [NEW_YORK_LIEN_FILING_TRANSACTION_TYPE] = 'Collateral-Loan' or [NEW_YORK_LIEN_FILING_TRANSACTION_TYPE] = 'Amendment' or [NEW_YORK_LIEN_FILING_TRANSACTION_TYPE] = 'InitialFiling'))
GO
ALTER TABLE [dbo].[SERVICE_REQUEST] ADD CONSTRAINT [SERVICE_REQUEST_PK] PRIMARY KEY CLUSTERED ([SERVICE_REQUEST_ID])
GO
CREATE NONCLUSTERED INDEX [index_ServiceRequest_AccountImportErrorErrorId] ON [dbo].[SERVICE_REQUEST] ([ACCOUNT_IMPORT_ERRORERROR_ID])
GO
CREATE NONCLUSTERED INDEX [index_ServiceRequest_ActionDate] ON [dbo].[SERVICE_REQUEST] ([ACTION_DATE])
GO
CREATE NONCLUSTERED INDEX [index_ServiceRequest_AddressId] ON [dbo].[SERVICE_REQUEST] ([ADDRESS_ID])
GO
CREATE NONCLUSTERED INDEX [index_ServiceRequest_BusinessProcessStatus] ON [dbo].[SERVICE_REQUEST] ([BUSINESS_PROCESS_STATUS])
GO
CREATE NONCLUSTERED INDEX [index_ServiceRequest_PullReport_FacilityId] ON [dbo].[SERVICE_REQUEST] ([BUSINESS_PROCESS_STATUS], [CONCRETE_TYPE], [CLIENT_ID], [IS_ON_HOLD_INDEFINITELY], [RECORDED_REQUEST_DATE], [SERVICE_REQUEST_STATUS], [FACILITY_ID]) INCLUDE ([PRINT_REQUEST_ID], [SERVICE_REQUEST_ID])
GO
CREATE NONCLUSTERED INDEX [index_ServiceRequest_CaliforniaTransmittalFormXmlSerialized-InstanceId] ON [dbo].[SERVICE_REQUEST] ([CALIFORNIA_TRANSMITTAL_FORMXML_SERIALIZED_INSTANCE_ID])
GO
CREATE NONCLUSTERED INDEX [index_ServiceRequest_CarrierTrackingNumber] ON [dbo].[SERVICE_REQUEST] ([CARRIER_TRACKING_NUMBER])
GO
CREATE NONCLUSTERED INDEX [index_ServiceRequest_ClientId] ON [dbo].[SERVICE_REQUEST] ([CLIENT_ID])
GO
CREATE NONCLUSTERED INDEX [index_ServiceRequest_ConcreteType] ON [dbo].[SERVICE_REQUEST] ([CONCRETE_TYPE])
GO
CREATE NONCLUSTERED INDEX [index_ServiceRequest_IsExpedited] ON [dbo].[SERVICE_REQUEST] ([IS_EXPEDITED])
GO
CREATE NONCLUSTERED INDEX [index_ServiceRequest_LastExportToStateDate] ON [dbo].[SERVICE_REQUEST] ([LAST_EXPORT_TO_STATE_DATE])
GO
CREATE NONCLUSTERED INDEX [index_ServiceRequest_LastStateResponseDate] ON [dbo].[SERVICE_REQUEST] ([LAST_STATE_RESPONSE_DATE])
GO
CREATE NONCLUSTERED INDEX [index_ServiceRequest_LienholderPerformingLienFilingId] ON [dbo].[SERVICE_REQUEST] ([LIENHOLDER_PERFORMING_LIEN_FILING_ID])
GO
CREATE NONCLUSTERED INDEX [index_ServiceRequest_ServiceRequestID] ON [dbo].[SERVICE_REQUEST] ([LIENHOLDER_PERFORMING_LIEN_FILING_ID], [BUSINESS_PROCESS_STATUS], [CONCRETE_TYPE], [LAST_EXPORT_TO_STATE_DATE], [LAST_STATE_RESPONSE_DATE], [SERVICE_REQUEST_ID]) INCLUDE ([DOCUMENT_NUMBER], [FINANCED_DATE], [MAKE], [MANUFACTURER_ID], [NEW_YORK_LIEN_FILING_TRANSACTION_TYPE], [REQUEST_CATEGORY], [YEAR])
GO
CREATE NONCLUSTERED INDEX [index_ServiceRequest_ParentServiceRequestId] ON [dbo].[SERVICE_REQUEST] ([PARENT_SERVICE_REQUEST_ID])
GO
CREATE NONCLUSTERED INDEX [index_ServiceRequest_PeerServiceRequestId] ON [dbo].[SERVICE_REQUEST] ([PEER_SERVICE_REQUEST_ID])
GO
CREATE NONCLUSTERED INDEX [index_ServiceRequest_PreviousServiceRequestId] ON [dbo].[SERVICE_REQUEST] ([PREVIOUS_SERVICE_REQUEST_ID])
GO
CREATE NONCLUSTERED INDEX [index_ServiceRequest_PrintRequestId] ON [dbo].[SERVICE_REQUEST] ([PRINT_REQUEST_ID])
GO
CREATE NONCLUSTERED INDEX [index_ServiceRequest_RecordedRequestDate] ON [dbo].[SERVICE_REQUEST] ([RECORDED_REQUEST_DATE])
GO
CREATE NONCLUSTERED INDEX [index_ServiceRequest_RequestMechanismType] ON [dbo].[SERVICE_REQUEST] ([REQUEST_MECHANISM_TYPE])
GO
CREATE NONCLUSTERED INDEX [index_ServiceRequest_RequestTransactionType] ON [dbo].[SERVICE_REQUEST] ([REQUEST_TRANSACTION_TYPE])
GO
CREATE NONCLUSTERED INDEX [index_ServiceRequest_ServiceRequestStatus] ON [dbo].[SERVICE_REQUEST] ([SERVICE_REQUEST_STATUS])
GO
CREATE NONCLUSTERED INDEX [index_ServiceRequest_ServiceRequestStatus_BusinessProcess-Status] ON [dbo].[SERVICE_REQUEST] ([SERVICE_REQUEST_STATUS], [BUSINESS_PROCESS_STATUS])
GO
CREATE NONCLUSTERED INDEX [index_ServiceRequest_StateClosedDate] ON [dbo].[SERVICE_REQUEST] ([STATE_CLOSED_DATE])
GO
CREATE NONCLUSTERED INDEX [index_ServiceRequest_TitlingAgencyLienholderId] ON [dbo].[SERVICE_REQUEST] ([TITLING_AGENCY_LIENHOLDER_ID])
GO
CREATE NONCLUSTERED INDEX [index_ServiceRequest_TransferFromTitlingAgencyLienholderId] ON [dbo].[SERVICE_REQUEST] ([TRANSFER_FROM_TITLING_AGENCY_LIENHOLDER_ID])
GO
CREATE NONCLUSTERED INDEX [index_ServiceRequest_TransferToTitlingAgencyLienholderId] ON [dbo].[SERVICE_REQUEST] ([TRANSFER_TO_TITLING_AGENCY_LIENHOLDER_ID])
GO
CREATE NONCLUSTERED INDEX [index_ServiceRequest_VirginiaCustomerServiceCenterId] ON [dbo].[SERVICE_REQUEST] ([VIRGINIA_CUSTOMER_SERVICE_CENTER_ID])
GO
CREATE NONCLUSTERED INDEX [index_SERVICE_REQUEST_XML_SERIALIZED_INSTANCE_ID] ON [dbo].[SERVICE_REQUEST] ([XML_SERIALIZED_INSTANCE_ID])
GO
CREATE STATISTICS [index_ServiceRequest_ServiceRequestID_7] ON [dbo].[SERVICE_REQUEST] ([BUSINESS_PROCESS_STATUS], [LIENHOLDER_PERFORMING_LIEN_FILING_ID], [SERVICE_REQUEST_ID], [LAST_EXPORT_TO_STATE_DATE], [LAST_STATE_RESPONSE_DATE])
GO
CREATE STATISTICS [index_ServiceRequest_ServiceRequestID_4] ON [dbo].[SERVICE_REQUEST] ([CONCRETE_TYPE], [LAST_EXPORT_TO_STATE_DATE], [SERVICE_REQUEST_ID], [BUSINESS_PROCESS_STATUS])
GO
CREATE STATISTICS [index_ServiceRequest_ServiceRequestID_5] ON [dbo].[SERVICE_REQUEST] ([CONCRETE_TYPE], [LIENHOLDER_PERFORMING_LIEN_FILING_ID], [SERVICE_REQUEST_ID], [LAST_EXPORT_TO_STATE_DATE], [LAST_STATE_RESPONSE_DATE])
GO
CREATE STATISTICS [_dta_index_SERVICE_REQUEST_5_443864648__K53_K1_K50_K2_K13_K5_12_14_16_114] ON [dbo].[SERVICE_REQUEST] ([FDI_DEPARTMENT_ID], [SERVICE_REQUEST_ID], [BUSINESS_PROCESS_STATUS], [CONCRETE_TYPE], [REQUEST_TRANSACTION_TYPE], [PRINT_REQUEST_ID])
GO
CREATE STATISTICS [index_ServiceRequest_ServiceRequestID_2] ON [dbo].[SERVICE_REQUEST] ([LAST_EXPORT_TO_STATE_DATE], [LAST_STATE_RESPONSE_DATE], [BUSINESS_PROCESS_STATUS])
GO
CREATE STATISTICS [index_ServiceRequest_ServiceRequestID_3] ON [dbo].[SERVICE_REQUEST] ([LAST_EXPORT_TO_STATE_DATE], [LIENHOLDER_PERFORMING_LIEN_FILING_ID], [BUSINESS_PROCESS_STATUS])
GO
CREATE STATISTICS [index_ServiceRequest_ServiceRequestID_1] ON [dbo].[SERVICE_REQUEST] ([LAST_STATE_RESPONSE_DATE], [LIENHOLDER_PERFORMING_LIEN_FILING_ID], [SERVICE_REQUEST_ID])
GO
CREATE STATISTICS [index_ServiceRequest_ServiceRequestID_6] ON [dbo].[SERVICE_REQUEST] ([LIENHOLDER_PERFORMING_LIEN_FILING_ID], [BUSINESS_PROCESS_STATUS], [CONCRETE_TYPE], [LAST_EXPORT_TO_STATE_DATE], [LAST_STATE_RESPONSE_DATE])
GO
CREATE STATISTICS [_dta_index_SERVICE_REQUEST_5_443864648__K2_K50_K1] ON [dbo].[SERVICE_REQUEST] ([PRINT_REQUEST_ID], [SERVICE_REQUEST_ID], [BUSINESS_PROCESS_STATUS])
GO
CREATE STATISTICS [_dta_index_SERVICE_REQUEST_5_443864648__K1_K50_K2_K13_K5] ON [dbo].[SERVICE_REQUEST] ([REQUEST_TRANSACTION_TYPE], [PRINT_REQUEST_ID], [SERVICE_REQUEST_ID], [BUSINESS_PROCESS_STATUS], [CONCRETE_TYPE])
GO
CREATE STATISTICS [_dta_index_SERVICE_REQUEST_5_443864648__K1_K13] ON [dbo].[SERVICE_REQUEST] ([REQUEST_TRANSACTION_TYPE], [SERVICE_REQUEST_ID])
GO
CREATE STATISTICS [_dta_index_SERVICE_REQUEST_5_443864648__K13_K1_K53_K50_K2_K5_12_14_16_114] ON [dbo].[SERVICE_REQUEST] ([SERVICE_REQUEST_ID], [BUSINESS_PROCESS_STATUS], [CONCRETE_TYPE], [REQUEST_TRANSACTION_TYPE], [PRINT_REQUEST_ID], [FDI_DEPARTMENT_ID])
GO
CREATE STATISTICS [index_ServiceRequest_ServiceRequestID_8] ON [dbo].[SERVICE_REQUEST] ([SERVICE_REQUEST_ID], [LIENHOLDER_PERFORMING_LIEN_FILING_ID], [BUSINESS_PROCESS_STATUS], [CONCRETE_TYPE], [LAST_EXPORT_TO_STATE_DATE], [LAST_STATE_RESPONSE_DATE])
GO
CREATE STATISTICS [_dta_index_SERVICE_REQUEST_5_443864648__K53_K1] ON [dbo].[SERVICE_REQUEST] ([SERVICE_REQUEST_ID], [PRINT_REQUEST_ID])
GO
CREATE TABLE [dbo].[WORK_QUEUE_ITEM]
(
[WORK_QUEUE_ITEM_ID] [int] NOT NULL IDENTITY(1, 1),
[LAST_MODIFIER] [int] NOT NULL,
[LAST_MOD_DATE_TIME] [datetime] NOT NULL,
[TRANS_SEQ_NUM] [smallint] NOT NULL,
[CONCRETE_TYPE] [varchar] (150) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[CREATED_DATE_TIME] [datetime] NOT NULL,
[COMPLETED_DATE_TIME] [datetime] NULL,
[REMIND_DATE] [smalldatetime] NULL,
[DESCRIPTION] [varchar] (300) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[CREATING_USER_ID] [int] NULL,
[OWNERSHIP_DOC_ID] [int] NULL,
[ACCOUNT_ID] [int] NULL,
[USR_ID] [int] NULL,
[USER_MESSAGE] [varchar] (256) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ERROR_ID] [int] NULL,
[PDF_FORM_ID] [int] NULL,
[BUSINESS_PROCESS_STATUS] [varchar] (10) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[NAME] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NOT NULL,
[PREVIOUS_MANUFACTURER_ID] [varchar] (30) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[ACCOUNT_OWNERSHIP_DOC_MATCH_ID] [int] NULL,
[IS_FDI_RESPONSIBLE] [bit] NULL,
[PREVIOUS_WORK_ITEM_ID] [int] NULL,
[SERVICE_REQUEST_ID] [int] NULL,
[SECURED_ORGANIZATIONORGANIZATION_ID] [int] NOT NULL,
[DISCREPANT_VALUE] [varchar] (150) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[FORM_NAME] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[REQUEST_DATE] [smalldatetime] NULL,
[XML_SERIALIZED_INSTANCE_ID] [int] NULL,
[IS_CLIENT_ALERT] [bit] NULL,
[IS_FDI_ALERT] [bit] NULL,
[CREATED_DATE] [datetime] NULL,
[IS_BILLABLE] [bit] NULL,
[IS_DOCUMENTS_FOUND] [bit] NULL,
[ACTIVITY_SEQUENCE] [smallint] NULL,
[LETTER_STATUS] [varchar] (50) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[DIRECT_LENDING_SERVICES_AUTOMATED_LETTER_CONFIG_ID] [int] NULL,
[DIRECT_LENDING_SERVICES_AUTOMATED_LETTER_CONFIGORGANIZATION_ID] [int] NULL,
[PRINTED_DATE] [datetime] NULL,
[SCHEDULED_LETTER_CONFIG_ID] [int] NULL,
[ASSIGNED_USER_ID] [int] NULL,
[LIEN_SAT_LETTER_TYPE] [varchar] (12) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[REMINDER_WORKGROUP_ID] [int] NULL,
[LIENHOLDER_IDENTIFIER] [varchar] (16) COLLATE SQL_Latin1_General_CP1_CI_AS NULL,
[NUMBER_OF_LETTER_PAGES] [smallint] NULL,
[IS_SIGNATURE_REQUIRED] [bit] NULL,
[SUPPRESSION_DATE] [datetime] NULL,
[ADDRESS_ID] [int] NULL,
[FACILITY_ID] [smallint] NULL,
[SUSPEND_DATE] [datetime] NULL,
[DEMAND_DATE] [datetime] NULL,
[RESPONSE_STATUS] [varchar] (25) COLLATE SQL_Latin1_General_CP1_CI_AS NULL
)
GO
ALTER TABLE [dbo].[WORK_QUEUE_ITEM] ADD CONSTRAINT [WORK_QUEUE_ITEMBUSINESS_PROCESS_STATUS_Chk] CHECK (([BUSINESS_PROCESS_STATUS]='CANCELLED' OR [BUSINESS_PROCESS_STATUS]='CLOSED' OR [BUSINESS_PROCESS_STATUS]='OPEN'))
GO
ALTER TABLE [dbo].[WORK_QUEUE_ITEM] ADD CONSTRAINT [WORK_QUEUE_ITEM_PK] PRIMARY KEY CLUSTERED ([WORK_QUEUE_ITEM_ID])
GO
CREATE NONCLUSTERED INDEX [index_WorkQueueItem_AccountId] ON [dbo].[WORK_QUEUE_ITEM] ([ACCOUNT_ID])
GO
CREATE NONCLUSTERED INDEX [index_WorkQueueItem_AccountOwnershipDocMatchId] ON [dbo].[WORK_QUEUE_ITEM] ([ACCOUNT_OWNERSHIP_DOC_MATCH_ID])
GO
CREATE NONCLUSTERED INDEX [idx_address] ON [dbo].[WORK_QUEUE_ITEM] ([ADDRESS_ID])
GO
CREATE NONCLUSTERED INDEX [index_WorkQueueItem_ConcreteType_CompletedDateTime] ON [dbo].[WORK_QUEUE_ITEM] ([CONCRETE_TYPE], [COMPLETED_DATE_TIME])
GO
CREATE NONCLUSTERED INDEX [index_WorkQueueItem_DiscrepanciesWorkQueue] ON [dbo].[WORK_QUEUE_ITEM] ([CONCRETE_TYPE], [SECURED_ORGANIZATIONORGANIZATION_ID], [BUSINESS_PROCESS_STATUS], [ACCOUNT_ID], [ACCOUNT_OWNERSHIP_DOC_MATCH_ID], [WORK_QUEUE_ITEM_ID]) INCLUDE ([CREATED_DATE])
GO
CREATE NONCLUSTERED INDEX [index_WorkQueueItem_OrganizationId_ErrorId] ON [dbo].[WORK_QUEUE_ITEM] ([ERROR_ID])
GO
CREATE NONCLUSTERED INDEX [index_WorkQueueItem_OwnershipDocId] ON [dbo].[WORK_QUEUE_ITEM] ([OWNERSHIP_DOC_ID])
GO
CREATE NONCLUSTERED INDEX [index_WorkQueueItem_PreviousWorkItemId] ON [dbo].[WORK_QUEUE_ITEM] ([PREVIOUS_WORK_ITEM_ID])
GO
CREATE NONCLUSTERED INDEX [index_WorkQueueItem_ReminderDate] ON [dbo].[WORK_QUEUE_ITEM] ([REMIND_DATE])
GO
CREATE NONCLUSTERED INDEX [index_WorkQueueItem_ScheduledLetterConfigID] ON [dbo].[WORK_QUEUE_ITEM] ([SCHEDULED_LETTER_CONFIG_ID])
GO
CREATE NONCLUSTERED INDEX [index_WorkQueueItem_SecuredOrganizationOrganizationId] ON [dbo].[WORK_QUEUE_ITEM] ([SECURED_ORGANIZATIONORGANIZATION_ID])
GO
CREATE NONCLUSTERED INDEX [index_WorkQueueItem_OrganizationId_BusinessProcessStatus] ON [dbo].[WORK_QUEUE_ITEM] ([SECURED_ORGANIZATIONORGANIZATION_ID], [BUSINESS_PROCESS_STATUS])
GO
CREATE NONCLUSTERED INDEX [index_WorkQueueItem_OrganizationId_CompletedDateTime] ON [dbo].[WORK_QUEUE_ITEM] ([SECURED_ORGANIZATIONORGANIZATION_ID], [COMPLETED_DATE_TIME])
GO
CREATE NONCLUSTERED INDEX [index_WorkQueueItem_OrganizationId_ConcreteType] ON [dbo].[WORK_QUEUE_ITEM] ([SECURED_ORGANIZATIONORGANIZATION_ID], [CONCRETE_TYPE])
GO
CREATE NONCLUSTERED INDEX [index_WorkQueueItem_OrganizationId_CreatedDate] ON [dbo].[WORK_QUEUE_ITEM] ([SECURED_ORGANIZATIONORGANIZATION_ID], [CREATED_DATE])
GO
CREATE NONCLUSTERED INDEX [index_WorkQueueItem_OrganizationId_CreatedDateTime] ON [dbo].[WORK_QUEUE_ITEM] ([SECURED_ORGANIZATIONORGANIZATION_ID], [CREATED_DATE_TIME])
GO
CREATE NONCLUSTERED INDEX [index_WorkQueueItem_OrganizationId_Name] ON [dbo].[WORK_QUEUE_ITEM] ([SECURED_ORGANIZATIONORGANIZATION_ID], [NAME])
GO
CREATE NONCLUSTERED INDEX [index_WorkQueueItem_OrganizationId_ReminderWorkgroupId] ON [dbo].[WORK_QUEUE_ITEM] ([SECURED_ORGANIZATIONORGANIZATION_ID], [REMINDER_WORKGROUP_ID])
GO
CREATE NONCLUSTERED INDEX [index_WorkQueueItem_ServiceRequestId] ON [dbo].[WORK_QUEUE_ITEM] ([SERVICE_REQUEST_ID])
GO
CREATE NONCLUSTERED INDEX [index_WorkQueueItem_XmlSerializedInstanceId] ON [dbo].[WORK_QUEUE_ITEM] ([XML_SERIALIZED_INSTANCE_ID])
GO
--ALTER TABLE [dbo].[WORK_QUEUE_ITEM] ADD CONSTRAINT [ACCOUNT_WORK_QUEUE_ITEM_FK1] FOREIGN KEY ([ACCOUNT_ID]) REFERENCES [dbo].[ACCOUNT] ([ACCOUNT_ID])
GO
--ALTER TABLE [dbo].[WORK_QUEUE_ITEM] ADD CONSTRAINT [ACCOUNT_PROPERTY_OWNERSHIP_DOC_MATCH_WORK_QUEUE_ITEM_FK1] FOREIGN KEY ([ACCOUNT_OWNERSHIP_DOC_MATCH_ID]) REFERENCES [dbo].[ACCOUNT_OWNERSHIP_DOC_MATCH] ([ACCOUNT_OWNERSHIP_DOC_MATCH_ID])
GO
ALTER TABLE [dbo].[WORK_QUEUE_ITEM] ADD CONSTRAINT [ADDRESS_WORK_QUEUE_ITEM_FK1] FOREIGN KEY ([ADDRESS_ID]) REFERENCES [dbo].[ADDRESS] ([ADDRESS_ID])
GO
--ALTER TABLE [dbo].[WORK_QUEUE_ITEM] ADD CONSTRAINT [USR_WORK_QUEUE_ITEM_FK3] FOREIGN KEY ([ASSIGNED_USER_ID]) REFERENCES [dbo].[USR] ([USR_ID])
GO
--ALTER TABLE [dbo].[WORK_QUEUE_ITEM] ADD CONSTRAINT [USR_WORK_QUEUE_ITEM_FK1] FOREIGN KEY ([CREATING_USER_ID]) REFERENCES [dbo].[USR] ([USR_ID])
GO
--ALTER TABLE [dbo].[WORK_QUEUE_ITEM] ADD CONSTRAINT [DIRECT_LENDING_SERVICES_AUTOMATED_LETTER_CONFIG_WORK_QUEUE_ITEM_FK1] FOREIGN KEY ([DIRECT_LENDING_SERVICES_AUTOMATED_LETTER_CONFIG_ID], [DIRECT_LENDING_SERVICES_AUTOMATED_LETTER_CONFIGORGANIZATION_ID]) REFERENCES [dbo].[DIRECT_LENDING_SERVICES_AUTOMATED_LETTER_CONFIG] ([ID], [CLIENT_ID])
GO
--ALTER TABLE [dbo].[WORK_QUEUE_ITEM] ADD CONSTRAINT [ERROR_WORK_QUEUE_ITEM_FK1] FOREIGN KEY ([ERROR_ID]) REFERENCES [dbo].[ERROR] ([ERROR_ID])
GO
--ALTER TABLE [dbo].[WORK_QUEUE_ITEM] ADD CONSTRAINT [FACILITY_WORK_QUEUE_ITEM_FK1] FOREIGN KEY ([FACILITY_ID]) REFERENCES [dbo].[FACILITY] ([Facility_Id])
GO
--ALTER TABLE [dbo].[WORK_QUEUE_ITEM] ADD CONSTRAINT [OWNERSHIP_DOC_WORK_QUEUE_ITEM_FK1] FOREIGN KEY ([OWNERSHIP_DOC_ID]) REFERENCES [dbo].[OWNERSHIP_DOC] ([OWNERSHIP_DOC_ID])
GO
--ALTER TABLE [dbo].[WORK_QUEUE_ITEM] ADD CONSTRAINT [PDF_FORM_WORK_QUEUE_ITEM_FK1] FOREIGN KEY ([PDF_FORM_ID]) REFERENCES [dbo].[PDF_FORM] ([PDF_FORM_ID])
GO
ALTER TABLE [dbo].[WORK_QUEUE_ITEM] ADD CONSTRAINT [WORK_QUEUE_ITEM_WORK_QUEUE_ITEM_FK1] FOREIGN KEY ([PREVIOUS_WORK_ITEM_ID]) REFERENCES [dbo].[WORK_QUEUE_ITEM] ([WORK_QUEUE_ITEM_ID])
GO
--ALTER TABLE [dbo].[WORK_QUEUE_ITEM] ADD CONSTRAINT [WORKGROUP_WORK_QUEUE_ITEM_FK1] FOREIGN KEY ([REMINDER_WORKGROUP_ID]) REFERENCES [dbo].[WORKGROUP] ([WORKGROUP_ID])
GO
--ALTER TABLE [dbo].[WORK_QUEUE_ITEM] ADD CONSTRAINT [WORK_QUEUE_ITEM_SCHEDULED_LETTER_CONFIG_FK1] FOREIGN KEY ([SCHEDULED_LETTER_CONFIG_ID]) REFERENCES [dbo].[SCHEDULED_LETTER_CONFIG] ([SCHEDULED_LETTER_CONFIG_ID])
GO
--ALTER TABLE [dbo].[WORK_QUEUE_ITEM] ADD CONSTRAINT [ORGANIZATION_WORK_QUEUE_ITEM_FK1] FOREIGN KEY ([SECURED_ORGANIZATIONORGANIZATION_ID]) REFERENCES [dbo].[ORGANIZATION] ([ORGANIZATION_ID])
GO
ALTER TABLE [dbo].[WORK_QUEUE_ITEM] ADD CONSTRAINT [SERVICE_REQUEST_WORK_QUEUE_ITEM_FK1] FOREIGN KEY ([SERVICE_REQUEST_ID]) REFERENCES [dbo].[SERVICE_REQUEST] ([SERVICE_REQUEST_ID])
GO
--ALTER TABLE [dbo].[WORK_QUEUE_ITEM] ADD CONSTRAINT [USR_WORK_QUEUE_ITEM_FK2] FOREIGN KEY ([USR_ID]) REFERENCES [dbo].[USR] ([USR_ID])
GO
--ALTER TABLE [dbo].[WORK_QUEUE_ITEM] ADD CONSTRAINT [XML_SERIALIZED_INSTANCE_WORK_QUEUE_ITEM_FK1] FOREIGN KEY ([XML_SERIALIZED_INSTANCE_ID]) REFERENCES [dbo].[XML_SERIALIZED_INSTANCE] ([XML_SERIALIZED_INSTANCE_ID])
GO
----------
--ALTER TABLE [dbo].[DIRECT_LENDING_SERVICE] ADD CONSTRAINT [DIRECT_LENDING_SERVICE_organization_FK1] FOREIGN KEY ([CLIENT_ID]) REFERENCES [dbo].[ORGANIZATION] ([ORGANIZATION_ID])
GO
ALTER TABLE [dbo].[DIRECT_LENDING_SERVICE] ADD CONSTRAINT [PACKET_TITLING_SERVICE_FK1] FOREIGN KEY ([PACKET_ID]) REFERENCES [dbo].[PACKET] ([PACKET_ID])
GO
ALTER TABLE [dbo].[DIRECT_LENDING_SERVICE] ADD CONSTRAINT [ADDRESS_TITLING_SERVICE_FK1] FOREIGN KEY ([PREV_LIENHOLDER_MAIL_TO_ADDRESS_ID]) REFERENCES [dbo].[ADDRESS] ([ADDRESS_ID])
GO
ALTER TABLE [dbo].[EARLY_PAYOFF_INFO] ADD CONSTRAINT [ADDRESS_EARLY_PAYOFF_INFO_FK1] FOREIGN KEY ([ADDRESS_ID]) REFERENCES [dbo].[ADDRESS] ([ADDRESS_ID])
GO
ALTER TABLE [dbo].[EARLY_PAYOFF_INFO] ADD CONSTRAINT [ADDRESS_EARLY_PAYOFF_INFO_FK2] FOREIGN KEY ([ADDRESS_ID1]) REFERENCES [dbo].[ADDRESS] ([ADDRESS_ID])
GO
ALTER TABLE [dbo].[EARLY_PAYOFF_INFO] ADD CONSTRAINT [ADDRESS_EARLY_PAYOFF_INFO_FK3] FOREIGN KEY ([ADDRESS_ID2]) REFERENCES [dbo].[ADDRESS] ([ADDRESS_ID])
GO
ALTER TABLE [dbo].[EARLY_PAYOFF_INFO] ADD CONSTRAINT [SERVICE_REQUEST_EARLY_PAYOFF_INFO_FK1] FOREIGN KEY ([COLLATERAL_GROUP_REQUESTSERVICE_REQUEST_ID]) REFERENCES [dbo].[SERVICE_REQUEST] ([SERVICE_REQUEST_ID])
GO
--ALTER TABLE [dbo].[LEGAL_ENTITY] ADD CONSTRAINT [ACCOUNT_DATA_LEGAL_ENTITY_FK1] FOREIGN KEY ([ACCOUNT_DATA_ID]) REFERENCES [dbo].[ACCOUNT_DATA] ([ACCOUNT_DATA_ID])
GO
--ALTER TABLE [dbo].[LEGAL_ENTITY] ADD CONSTRAINT [ACCOUNT_LEGAL_ENTITY_FK1] FOREIGN KEY ([ACCOUNT_ID]) REFERENCES [dbo].[ACCOUNT] ([ACCOUNT_ID])
GO
ALTER TABLE [dbo].[LEGAL_ENTITY] ADD CONSTRAINT [ADDRESS_LEGAL_ENTITY_FK1] FOREIGN KEY ([ADDRESS_ID]) REFERENCES [dbo].[ADDRESS] ([ADDRESS_ID])
GO
--ALTER TABLE [dbo].[LEGAL_ENTITY] ADD CONSTRAINT [ORGANIZATION_LEGAL_ENTITY_FK1] FOREIGN KEY ([CLIENTORGANIZATION_ID]) REFERENCES [dbo].[ORGANIZATION] ([ORGANIZATION_ID])
GO
ALTER TABLE [dbo].[LEGAL_ENTITY] ADD CONSTRAINT [SERVICE_REQUEST_LEGAL_ENTITY_FK1] FOREIGN KEY ([COLLATERAL_GROUP_REQUESTSERVICE_REQUEST_ID]) REFERENCES [dbo].[SERVICE_REQUEST] ([SERVICE_REQUEST_ID])
GO
--ALTER TABLE [dbo].[LEGAL_ENTITY] ADD CONSTRAINT [OWNERSHIP_DOC_LEGAL_ENTITY_FK1] FOREIGN KEY ([OWNERSHIP_DOC_ID]) REFERENCES [dbo].[OWNERSHIP_DOC] ([OWNERSHIP_DOC_ID])
GO
--ALTER TABLE [dbo].[LEGAL_ENTITY] WITH NOCHECK ADD CONSTRAINT [TITLING_AGENCY_LEGAL_ENTITY_FK1] FOREIGN KEY ([TITLING_AGENCY_ID]) REFERENCES [dbo].[TITLING_AGENCY] ([TITLING_AGENCY_ID])
GO
--ALTER TABLE [dbo].[LEGAL_ENTITY] ADD CONSTRAINT [XML_SERIALIZED_INSTANCE_LEGAL_ENTITY_FK1] FOREIGN KEY ([XML_SERIALIZED_INSTANCE_ID]) REFERENCES [dbo].[XML_SERIALIZED_INSTANCE] ([XML_SERIALIZED_INSTANCE_ID])
GO
--ALTER TABLE [dbo].[PACKET] ADD CONSTRAINT [ACCOUNT_PACKET_FK1] FOREIGN KEY ([ACCOUNT_ID]) REFERENCES [dbo].[ACCOUNT] ([ACCOUNT_ID])
GO
ALTER TABLE [dbo].[PACKET] ADD CONSTRAINT [ADDRESS_PACKET_FK1] FOREIGN KEY ([ADDRESS_ID]) REFERENCES [dbo].[ADDRESS] ([ADDRESS_ID])
GO
--ALTER TABLE [dbo].[PACKET] ADD CONSTRAINT [BATCHFACILITYTRANSFER_FK3] FOREIGN KEY ([BATCHFACILITYTRANSFER_ID]) REFERENCES [dbo].[BATCHFACILITYTRANSFER] ([BATCHFACILITYTRANSFER_ID])
GO
--ALTER TABLE [dbo].[PACKET] ADD CONSTRAINT [PACKET_CATEGORY_PACKET_FK1] FOREIGN KEY ([PACKET_CATEGORY_ID]) REFERENCES [dbo].[PACKET_CATEGORY] ([PACKET_CATEGORY_ID])
GO
--ALTER TABLE [dbo].[SERVICE_REQUEST] ADD CONSTRAINT [ERROR_SERVICE_REQUEST_FK2] FOREIGN KEY ([ACCOUNT_IMPORT_ERRORERROR_ID]) REFERENCES [dbo].[ERROR] ([ERROR_ID])
GO
ALTER TABLE [dbo].[SERVICE_REQUEST] ADD CONSTRAINT [ADDRESS_SERVICE_REQUEST_FK1] FOREIGN KEY ([ADDRESS_ID]) REFERENCES [dbo].[ADDRESS] ([ADDRESS_ID])
GO
--ALTER TABLE [dbo].[SERVICE_REQUEST] ADD CONSTRAINT [BILLING_TYPE_SERVICE_REQUEST_FK1] FOREIGN KEY ([BILLING_TYPE_ID]) REFERENCES [dbo].[BILLING_TYPE] ([BILLING_TYPE_ID])
GO
--ALTER TABLE [dbo].[SERVICE_REQUEST] ADD CONSTRAINT [XML_SERIALIZED_INSTANCE_SERVICE_REQUEST_FK2] FOREIGN KEY ([CALIFORNIA_TRANSMITTAL_FORMXML_SERIALIZED_INSTANCE_ID]) REFERENCES [dbo].[XML_SERIALIZED_INSTANCE] ([XML_SERIALIZED_INSTANCE_ID])
GO
--ALTER TABLE [dbo].[SERVICE_REQUEST] ADD CONSTRAINT [CHECK_REPORT_SERVICE_REQUEST_FK1] FOREIGN KEY ([CHECK_REPORT_ID]) REFERENCES [dbo].[CHECK_REPORT] ([CHECK_REPORT_ID])
GO
--ALTER TABLE [dbo].[SERVICE_REQUEST] ADD CONSTRAINT [ORGANIZATION_SERVICE_REQUEST_FK2] FOREIGN KEY ([CLIENT_ID]) REFERENCES [dbo].[ORGANIZATION] ([ORGANIZATION_ID])
GO
--ALTER TABLE [dbo].[SERVICE_REQUEST] ADD CONSTRAINT [EEE_REASON_SERVICE_REQUEST_FK1] FOREIGN KEY ([EEE_REASON_ID]) REFERENCES [dbo].[EEE_REASON] ([EEE_REASON_ID])
GO
--ALTER TABLE [dbo].[SERVICE_REQUEST] ADD CONSTRAINT [ERROR_SERVICE_REQUEST_FK1] FOREIGN KEY ([ELT_RESPONSE_ERRORERROR_ID]) REFERENCES [dbo].[ERROR] ([ERROR_ID])
GO
--ALTER TABLE [dbo].[SERVICE_REQUEST] ADD CONSTRAINT [FACILITY_SERVICE_REQUEST_FK1] FOREIGN KEY ([FACILITY_ID]) REFERENCES [dbo].[FACILITY] ([Facility_Id])
GO
--ALTER TABLE [dbo].[SERVICE_REQUEST] ADD CONSTRAINT [FDI_DEPARTMENT_SERVICE_REQUEST_FK1] FOREIGN KEY ([FDI_DEPARTMENT_ID]) REFERENCES [dbo].[FDI_DEPARTMENT] ([FDI_DEPARTMENT_ID])
GO
--ALTER TABLE [dbo].[SERVICE_REQUEST] ADD CONSTRAINT [ORGANIZATION_SERVICE_REQUEST_FK3] FOREIGN KEY ([JURISDICTION_ID]) REFERENCES [dbo].[ORGANIZATION] ([ORGANIZATION_ID])
GO
--ALTER TABLE [dbo].[SERVICE_REQUEST] ADD CONSTRAINT [TITLING_AGENCY_LIENHOLDER_SERVICE_REQUEST_FK2] FOREIGN KEY ([LIENHOLDER_PERFORMING_LIEN_FILING_ID]) REFERENCES [dbo].[TITLING_AGENCY_LIENHOLDER] ([TITLING_AGENCY_LIENHOLDER_ID])
GO
--ALTER TABLE [dbo].[SERVICE_REQUEST] ADD CONSTRAINT [OPERATION_CODE_SERVICE_REQUEST_FK1] FOREIGN KEY ([OPERATION_CODE_ID]) REFERENCES [dbo].[OPERATION_CODE] ([OPERATION_CODE_ID])
GO
ALTER TABLE [dbo].[SERVICE_REQUEST] ADD CONSTRAINT [SERVICE_REQUEST_SERVICE_REQUEST_FK1] FOREIGN KEY ([PARENT_SERVICE_REQUEST_ID]) REFERENCES [dbo].[SERVICE_REQUEST] ([SERVICE_REQUEST_ID])
GO
ALTER TABLE [dbo].[SERVICE_REQUEST] ADD CONSTRAINT [SERVICE_REQUEST_SERVICE_REQUEST_FK3] FOREIGN KEY ([PEER_SERVICE_REQUEST_ID]) REFERENCES [dbo].[SERVICE_REQUEST] ([SERVICE_REQUEST_ID])
GO
ALTER TABLE [dbo].[SERVICE_REQUEST] ADD CONSTRAINT [SERVICE_REQUEST_SERVICE_REQUEST_FK2] FOREIGN KEY ([PREVIOUS_SERVICE_REQUEST_ID]) REFERENCES [dbo].[SERVICE_REQUEST] ([SERVICE_REQUEST_ID])
GO
--ALTER TABLE [dbo].[SERVICE_REQUEST] ADD CONSTRAINT [PRINT_REQUEST_SERVICE_REQUEST_FK1] FOREIGN KEY ([PRINT_REQUEST_ID]) REFERENCES [dbo].[PRINT_REQUEST] ([PRINT_REQUEST_ID])
GO
--ALTER TABLE [dbo].[SERVICE_REQUEST] ADD CONSTRAINT [TITLING_AGENCY_LIENHOLDER_SERVICE_REQUEST_FK1] FOREIGN KEY ([TITLING_AGENCY_LIENHOLDER_ID]) REFERENCES [dbo].[TITLING_AGENCY_LIENHOLDER] ([TITLING_AGENCY_LIENHOLDER_ID])
GO
--ALTER TABLE [dbo].[SERVICE_REQUEST] ADD CONSTRAINT [FROM_TITLING_AGENCY_LIENHOLDER_SERVICE_REQUEST_FK] FOREIGN KEY ([TRANSFER_FROM_TITLING_AGENCY_LIENHOLDER_ID]) REFERENCES [dbo].[TITLING_AGENCY_LIENHOLDER] ([TITLING_AGENCY_LIENHOLDER_ID])
GO
--ALTER TABLE [dbo].[SERVICE_REQUEST] ADD CONSTRAINT [TITLING_AGENCY_LIENHOLDER_SERVICE_REQUEST_FK3] FOREIGN KEY ([TRANSFER_TO_TITLING_AGENCY_LIENHOLDER_ID]) REFERENCES [dbo].[TITLING_AGENCY_LIENHOLDER] ([TITLING_AGENCY_LIENHOLDER_ID])
GO
--ALTER TABLE [dbo].[SERVICE_REQUEST] ADD CONSTRAINT [ACCOUNT_SERVICE_REQUEST_FK1] FOREIGN KEY ([TRANSFERRED_ACCOUNT_ID]) REFERENCES [dbo].[ACCOUNT] ([ACCOUNT_ID])
GO
--ALTER TABLE [dbo].[SERVICE_REQUEST] ADD CONSTRAINT [OWNERSHIP_DOC_SERVICE_REQUEST_FK1] FOREIGN KEY ([TRANSFERRED_OWNERSHIP_DOC_ID]) REFERENCES [dbo].[OWNERSHIP_DOC] ([OWNERSHIP_DOC_ID])
GO
--ALTER TABLE [dbo].[SERVICE_REQUEST] ADD CONSTRAINT [USR_SERVICE_REQUEST_FK1] FOREIGN KEY ([USR_ID]) REFERENCES [dbo].[USR] ([USR_ID])
GO
ALTER TABLE [dbo].[SERVICE_REQUEST] ADD CONSTRAINT [LEGAL_ENTITY_SERVICE_REQUEST_FK1] FOREIGN KEY ([VIRGINIA_CUSTOMER_SERVICE_CENTER_ID]) REFERENCES [dbo].[LEGAL_ENTITY] ([LEGAL_ENTITY_ID])
GO
--ALTER TABLE [dbo].[SERVICE_REQUEST] ADD CONSTRAINT [XML_SERIALIZED_INSTANCE_SERVICE_REQUEST_FK1] FOREIGN KEY ([XML_SERIALIZED_INSTANCE_ID]) REFERENCES [dbo].[XML_SERIALIZED_INSTANCE] ([XML_SERIALIZED_INSTANCE_ID])
GO
There are no special teachers of virtue, because virtue is taught by the whole community.
--Plato
February 13, 2016 at 3:57 pm
storing address records to keep would be a large group. Right now only about 4.5 million qualify for deletion.
TableName rowcount
dbo.LEGAL_ENTITY498,676,531
dbo.ADDRESS497,918,643
dbo.SERVICE_REQUEST89,047,751
dbo.WORK_QUEUE_ITEM88,047,989
dbo.EARLY_PAYOFF_INFO762,790
February 13, 2016 at 4:10 pm
What made you add the ORDER BY?
I am showing three CI scans in the estimated plan on EARLY_PAYOFF_INFO_PK but I do not have your statistics so things may look drastically different on your system. Can you provide the Estimated Plan for the SELECT query you showed?
Either way, the query structure looks pretty clean to me. You are trying to find profiles with addresses but no other relevant children rows before deleting...this is pretty common and your trouble is likely the amount of data and the highly normalized model.
If there is quick progress to be made it is in getting rid of the scans on EARLY_PAYOFF_INFO.
CREATE NONCLUSTERED INDEX [EarlyPayoffInfo_ADDRESS_ID] ON [dbo].[EARLY_PAYOFF_INFO] ([ADDRESS_ID]);
CREATE NONCLUSTERED INDEX [EarlyPayoffInfo_ADDRESS_ID2] ON [dbo].[EARLY_PAYOFF_INFO] ([ADDRESS_ID1]);
CREATE NONCLUSTERED INDEX [EarlyPayoffInfo_ADDRESS_ID2] ON [dbo].[EARLY_PAYOFF_INFO] ([ADDRESS_ID2]);
There are no special teachers of virtue, because virtue is taught by the whole community.
--Plato
February 13, 2016 at 4:24 pm
Thanks. I added the order by because the actual purge script is loading records into a temp table ( address_id ) and someone suggested that deleting by that order would be better than random.
<?xml version="1.0" encoding="utf-16"?>
<ShowPlanXML xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema" Version="1.2" Build="11.0.5582.0" xmlns="http://schemas.microsoft.com/sqlserver/2004/07/showplan">
<BatchSequence>
<Batch>
<Statements>
<StmtSimple StatementCompId="1" StatementId="1" StatementText=" SET TRANSACTION ISOLATION LEVEL READ COMMITTED; " StatementType="SET TRANSACTION ISOLATION LEVEL" RetrievedFromCache="false" />
</Statements>
<Statements>
<StmtSimple StatementCompId="2" StatementId="2" StatementText=" SET NOCOUNT OFF ---ON; " StatementType="SET ON/OFF" RetrievedFromCache="false" />
</Statements>
<Statements>
<StmtSimple StatementCompId="3" StatementEstRows="20000" StatementId="3" StatementOptmLevel="FULL" StatementSubTreeCost="240.172" StatementText=" SELECT TOP ( 20000 ) ADDRESS_ID FROM DBO.ADDRESS WHERE ADDRESS.ADDRESS_ID IN ( SELECT ADDRESS.address_id FROM ADDRESS LEFT OUTER JOIN EARLY_PAYOFF_INFO EPI1 ON EPI1.ADDRESS_ID = ADDRESS.ADDRESS_ID LEFT OUTER JOIN EARLY_PAYOFF_INFO EPI2 ON EPI2.ADDRESS_ID1 = ADDRESS.ADDRESS_ID LEFT OUTER JOIN EARLY_PAYOFF_INFO EPI3 ON EPI3.ADDRESS_ID2 = ADDRESS.ADDRESS_ID LEFT OUTER JOIN CHECK_REQUEST_DEFAULT_ADDRESS ON CHECK_REQUEST_DEFAULT_ADDRESS.ADDRESS_ID = ADDRESS.ADDRESS_ID LEFT OUTER JOIN DIRECT_LENDING_SERVICE ON DIRECT_LENDING_SERVICE.PREV_LIENHOLDER_MAIL_TO_ADDRESS_ID = ADDRESS.ADDRESS_ID LEFT OUTER JOIN PACKET ON PACKET.ADDRESS_ID = ADDRESS.ADDRESS_ID LEFT OUTER JOIN WORK_QUEUE_ITEM ON WORK_QUEUE_ITEM.ADDRESS_ID = ADDRESS.ADDRESS_ID LEFT OUTER JOIN LEGAL_ENTITY ON LEGAL_ENTITY.ADDRESS_ID = ADDRESS.ADDRESS_ID LEFT OUTER JOIN SERVICE_REQUEST ON SERVICE_REQUEST.ADDRESS_ID = ADDRESS.ADDRESS_ID LEFT OUTER JOIN LIENHOLDER ON LIENHOLDER.ADDRESS_ID = ADDRESS.ADDRESS_ID WHERE EPI1.EARLY_PAYOFF_INFO_ID IS NULL AND EPI2.EARLY_PAYOFF_INFO_ID IS NULL AND EPI3.EARLY_PAYOFF_INFO_ID IS NULL AND CHECK_REQUEST_DEFAULT_ADDRESS.CHECK_REQUEST_DEFAULT_ADDRESS_ID IS NULL AND DIRECT_LENDING_SERVICE.DIRECT_LENDING_SERVICE_ID IS NULL AND WORK_QUEUE_ITEM.ADDRESS_ID IS NULL AND PACKET.PACKET_ID IS NULL AND LEGAL_ENTITY.LEGAL_ENTITY_ID IS NULL AND SERVICE_REQUEST.SERVICE_REQUEST_ID IS NULL AND LIENHOLDER.ADDRESS_ID IS NULL ) ORDER BY ADDRESS_ID OPTION ( MAXDOP 8 ); " StatementType="SELECT" QueryHash="0xB611CCC53C7FE1C4" QueryPlanHash="0xF1FE424191871166" RetrievedFromCache="false">
<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="144" CompileTime="646" CompileCPU="528" CompileMemory="3472">
<ThreadStat Branches="13" />
<MemoryGrantInfo SerialRequiredMemory="1024" SerialDesiredMemory="98960" />
<OptimizerHardwareDependentProperties EstimatedAvailableMemoryGrant="262144" EstimatedPagesCached="524288" EstimatedAvailableDegreeOfParallelism="8" />
<RelOp AvgRowSize="11" EstimateCPU="0.002" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="20000" LogicalOp="Top" NodeId="0" Parallel="false" PhysicalOp="Top" EstimatedTotalSubtreeCost="240.172">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</OutputList>
<Top RowCount="false" IsPercent="false" WithTies="false">
<TopExpression>
<ScalarOperator ScalarString="(20000)">
<Const ConstValue="(20000)" />
</ScalarOperator>
</TopExpression>
<RelOp AvgRowSize="11" EstimateCPU="0.108211" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="20000" LogicalOp="Gather Streams" NodeId="1" Parallel="true" PhysicalOp="Parallelism" EstimatedTotalSubtreeCost="240.17">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</OutputList>
<Parallelism>
<OrderBy>
<OrderByColumn Ascending="true">
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</OrderByColumn>
</OrderBy>
<RelOp AvgRowSize="11" EstimateCPU="120.868" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="20000" LogicalOp="Left Semi Join" NodeId="2" Parallel="true" PhysicalOp="Merge Join" EstimatedTotalSubtreeCost="240.062">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</OutputList>
<Merge ManyToMany="false">
<InnerSideJoinColumns>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</InnerSideJoinColumns>
<OuterSideJoinColumns>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</OuterSideJoinColumns>
<Residual>
<ScalarOperator ScalarString="[cmsperformance].[dbo].[ADDRESS].[ADDRESS_ID]=[cmsperformance].[dbo].[ADDRESS].[ADDRESS_ID]">
<Compare CompareOp="EQ">
<ScalarOperator>
<Identifier>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Identifier>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</Identifier>
</ScalarOperator>
</Compare>
</ScalarOperator>
</Residual>
<RelOp AvgRowSize="11" EstimateCPU="13.356" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="3291110" LogicalOp="Repartition Streams" NodeId="3" Parallel="true" PhysicalOp="Parallelism" EstimatedTotalSubtreeCost="48.4867">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</OutputList>
<Parallelism PartitioningType="Hash">
<PartitionColumns>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</PartitionColumns>
<OrderBy>
<OrderByColumn Ascending="true">
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</OrderByColumn>
</OrderBy>
<RelOp AvgRowSize="11" EstimateCPU="62.9001" EstimateIO="4819.74" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="3291110" LogicalOp="Clustered Index Scan" NodeId="4" Parallel="true" PhysicalOp="Clustered Index Scan" EstimatedTotalSubtreeCost="35.1307" TableCardinality="457455000">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</OutputList>
<IndexScan Ordered="true" ScanDirection="FORWARD" ForcedIndex="false" ForceSeek="false" ForceScan="false" NoExpandHint="false" Storage="RowStore">
<DefinedValues>
<DefinedValue>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</DefinedValue>
</DefinedValues>
<Object Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Index="[ADDRESS_PK]" TableReferenceId="1" IndexKind="Clustered" />
</IndexScan>
</RelOp>
</Parallelism>
</RelOp>
<RelOp AvgRowSize="11" EstimateCPU="0.11181" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="20565.7" LogicalOp="Repartition Streams" NodeId="5" Parallel="true" PhysicalOp="Parallelism" EstimatedTotalSubtreeCost="190.67">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</OutputList>
<Parallelism PartitioningType="Hash">
<PartitionColumns>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</PartitionColumns>
<OrderBy>
<OrderByColumn Ascending="true">
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</OrderByColumn>
</OrderBy>
<RelOp AvgRowSize="11" EstimateCPU="0.357676" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="20565.7" LogicalOp="Aggregate" NodeId="6" Parallel="true" PhysicalOp="Stream Aggregate" EstimatedTotalSubtreeCost="190.558">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</OutputList>
<StreamAggregate>
<DefinedValues />
<GroupBy>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</GroupBy>
<RelOp AvgRowSize="11" EstimateCPU="3.17512" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="20606.5" LogicalOp="Filter" NodeId="7" Parallel="true" PhysicalOp="Filter" EstimatedTotalSubtreeCost="190.556">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</OutputList>
<Filter StartupExpression="false">
<RelOp AvgRowSize="15" EstimateCPU="87.7147" EstimateIO="246.794" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="380717" LogicalOp="Right Outer Join" NodeId="8" Parallel="true" PhysicalOp="Merge Join" EstimatedTotalSubtreeCost="190.533">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[LIENHOLDER]" Column="ADDRESS_ID" />
</OutputList>
<Merge ManyToMany="true">
<InnerSideJoinColumns>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</InnerSideJoinColumns>
<OuterSideJoinColumns>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[LIENHOLDER]" Column="ADDRESS_ID" />
</OuterSideJoinColumns>
<Residual>
<ScalarOperator ScalarString="[cmsperformance].[dbo].[LIENHOLDER].[ADDRESS_ID]=[cmsperformance].[dbo].[ADDRESS].[ADDRESS_ID]">
<Compare CompareOp="EQ">
<ScalarOperator>
<Identifier>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[LIENHOLDER]" Column="ADDRESS_ID" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Identifier>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</Identifier>
</ScalarOperator>
</Compare>
</ScalarOperator>
</Residual>
<RelOp AvgRowSize="11" EstimateCPU="2.93025" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="716557" LogicalOp="Repartition Streams" NodeId="9" Parallel="true" PhysicalOp="Parallelism" EstimatedTotalSubtreeCost="4.28974">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[LIENHOLDER]" Column="ADDRESS_ID" />
</OutputList>
<Parallelism PartitioningType="Hash">
<PartitionColumns>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[LIENHOLDER]" Column="ADDRESS_ID" />
</PartitionColumns>
<OrderBy>
<OrderByColumn Ascending="true">
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[LIENHOLDER]" Column="ADDRESS_ID" />
</OrderByColumn>
</OrderBy>
<RelOp AvgRowSize="11" EstimateCPU="13.695" EstimateIO="174.837" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="716557" LogicalOp="Index Scan" NodeId="10" Parallel="true" PhysicalOp="Index Scan" EstimatedTotalSubtreeCost="1.35949" TableCardinality="99599500">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[LIENHOLDER]" Column="ADDRESS_ID" />
</OutputList>
<IndexScan Ordered="true" ScanDirection="FORWARD" ForcedIndex="false" ForceSeek="false" ForceScan="false" NoExpandHint="false" Storage="RowStore">
<DefinedValues>
<DefinedValue>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[LIENHOLDER]" Column="ADDRESS_ID" />
</DefinedValue>
</DefinedValues>
<Object Database="[cmsperformance]" Schema="[dbo]" Table="[LIENHOLDER]" Index="[_dta_index_LIENHOLDER_5_1413580074__K5]" IndexKind="NonClustered" />
</IndexScan>
</RelOp>
</Parallelism>
</RelOp>
<RelOp AvgRowSize="11" EstimateCPU="7.31692" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="363316" LogicalOp="Filter" NodeId="11" Parallel="true" PhysicalOp="Filter" EstimatedTotalSubtreeCost="183.179">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</OutputList>
<Filter StartupExpression="false">
<RelOp AvgRowSize="15" EstimateCPU="112.059" EstimateIO="341.213" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="877346" LogicalOp="Right Outer Join" NodeId="12" Parallel="true" PhysicalOp="Merge Join" EstimatedTotalSubtreeCost="183.126">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[SERVICE_REQUEST]" Column="SERVICE_REQUEST_ID" />
</OutputList>
<Merge ManyToMany="true">
<InnerSideJoinColumns>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</InnerSideJoinColumns>
<OuterSideJoinColumns>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[SERVICE_REQUEST]" Column="ADDRESS_ID" />
</OuterSideJoinColumns>
<Residual>
<ScalarOperator ScalarString="[cmsperformance].[dbo].[SERVICE_REQUEST].[ADDRESS_ID]=[cmsperformance].[dbo].[ADDRESS].[ADDRESS_ID]">
<Compare CompareOp="EQ">
<ScalarOperator>
<Identifier>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[SERVICE_REQUEST]" Column="ADDRESS_ID" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Identifier>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</Identifier>
</ScalarOperator>
</Compare>
</ScalarOperator>
</Residual>
<RelOp AvgRowSize="15" EstimateCPU="2.50983" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="598711" LogicalOp="Repartition Streams" NodeId="13" Parallel="true" PhysicalOp="Parallelism" EstimatedTotalSubtreeCost="4.33488">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[SERVICE_REQUEST]" Column="SERVICE_REQUEST_ID" />
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[SERVICE_REQUEST]" Column="ADDRESS_ID" />
</OutputList>
<Parallelism PartitioningType="Hash">
<PartitionColumns>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[SERVICE_REQUEST]" Column="ADDRESS_ID" />
</PartitionColumns>
<OrderBy>
<OrderByColumn Ascending="true">
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[SERVICE_REQUEST]" Column="ADDRESS_ID" />
</OrderByColumn>
</OrderBy>
<RelOp AvgRowSize="15" EstimateCPU="11.4427" EstimateIO="241.801" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="598711" LogicalOp="Index Scan" NodeId="14" Parallel="true" PhysicalOp="Index Scan" EstimatedTotalSubtreeCost="1.82505" TableCardinality="83219200">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[SERVICE_REQUEST]" Column="SERVICE_REQUEST_ID" />
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[SERVICE_REQUEST]" Column="ADDRESS_ID" />
</OutputList>
<IndexScan Ordered="true" ScanDirection="FORWARD" ForcedIndex="false" ForceSeek="false" ForceScan="false" NoExpandHint="false" Storage="RowStore">
<DefinedValues>
<DefinedValue>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[SERVICE_REQUEST]" Column="SERVICE_REQUEST_ID" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[SERVICE_REQUEST]" Column="ADDRESS_ID" />
</DefinedValue>
</DefinedValues>
<Object Database="[cmsperformance]" Schema="[dbo]" Table="[SERVICE_REQUEST]" Index="[index_ServiceRequest_AddressId]" IndexKind="NonClustered" />
</IndexScan>
</RelOp>
</Parallelism>
</RelOp>
<RelOp AvgRowSize="11" EstimateCPU="27.4643" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="876355" LogicalOp="Filter" NodeId="15" Parallel="true" PhysicalOp="Filter" EstimatedTotalSubtreeCost="174.014">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</OutputList>
<Filter StartupExpression="false">
<RelOp AvgRowSize="15" EstimateCPU="484.699" EstimateIO="1643.66" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="3293150" LogicalOp="Right Outer Join" NodeId="16" Parallel="true" PhysicalOp="Merge Join" EstimatedTotalSubtreeCost="173.817">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[LEGAL_ENTITY]" Column="LEGAL_ENTITY_ID" />
</OutputList>
<Merge ManyToMany="true">
<InnerSideJoinColumns>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</InnerSideJoinColumns>
<OuterSideJoinColumns>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[LEGAL_ENTITY]" Column="ADDRESS_ID" />
</OuterSideJoinColumns>
<Residual>
<ScalarOperator ScalarString="[cmsperformance].[dbo].[LEGAL_ENTITY].[ADDRESS_ID]=[cmsperformance].[dbo].[ADDRESS].[ADDRESS_ID]">
<Compare CompareOp="EQ">
<ScalarOperator>
<Identifier>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[LEGAL_ENTITY]" Column="ADDRESS_ID" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Identifier>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</Identifier>
</ScalarOperator>
</Compare>
</ScalarOperator>
</Residual>
<RelOp AvgRowSize="15" EstimateCPU="13.7772" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="3317410" LogicalOp="Repartition Streams" NodeId="17" Parallel="true" PhysicalOp="Parallelism" EstimatedTotalSubtreeCost="21.2346">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[LEGAL_ENTITY]" Column="LEGAL_ENTITY_ID" />
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[LEGAL_ENTITY]" Column="ADDRESS_ID" />
</OutputList>
<Parallelism PartitioningType="Hash">
<PartitionColumns>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[LEGAL_ENTITY]" Column="ADDRESS_ID" />
</PartitionColumns>
<OrderBy>
<OrderByColumn Ascending="true">
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[LEGAL_ENTITY]" Column="ADDRESS_ID" />
</OrderByColumn>
</OrderBy>
<RelOp AvgRowSize="15" EstimateCPU="63.4028" EstimateIO="972.724" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="3317410" LogicalOp="Index Scan" NodeId="18" Parallel="true" PhysicalOp="Index Scan" EstimatedTotalSubtreeCost="7.45741" TableCardinality="461111000">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[LEGAL_ENTITY]" Column="LEGAL_ENTITY_ID" />
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[LEGAL_ENTITY]" Column="ADDRESS_ID" />
</OutputList>
<IndexScan Ordered="true" ScanDirection="FORWARD" ForcedIndex="false" ForceSeek="false" ForceScan="false" NoExpandHint="false" Storage="RowStore">
<DefinedValues>
<DefinedValue>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[LEGAL_ENTITY]" Column="LEGAL_ENTITY_ID" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[LEGAL_ENTITY]" Column="ADDRESS_ID" />
</DefinedValue>
</DefinedValues>
<Object Database="[cmsperformance]" Schema="[dbo]" Table="[LEGAL_ENTITY]" Index="[index_LegalEntity_AddressId]" IndexKind="NonClustered" />
</IndexScan>
</RelOp>
</Parallelism>
</RelOp>
<RelOp AvgRowSize="11" EstimateCPU="27.4473" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="3291110" LogicalOp="Filter" NodeId="19" Parallel="true" PhysicalOp="Filter" EstimatedTotalSubtreeCost="131.583">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</OutputList>
<Filter StartupExpression="false">
<RelOp AvgRowSize="15" EstimateCPU="147.912" EstimateIO="1.19491" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="3291110" LogicalOp="Right Outer Join" NodeId="20" Parallel="true" PhysicalOp="Merge Join" EstimatedTotalSubtreeCost="131.386">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[WORK_QUEUE_ITEM]" Column="ADDRESS_ID" />
</OutputList>
<Merge ManyToMany="true">
<InnerSideJoinColumns>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</InnerSideJoinColumns>
<OuterSideJoinColumns>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[WORK_QUEUE_ITEM]" Column="ADDRESS_ID" />
</OuterSideJoinColumns>
<Residual>
<ScalarOperator ScalarString="[cmsperformance].[dbo].[WORK_QUEUE_ITEM].[ADDRESS_ID]=[cmsperformance].[dbo].[ADDRESS].[ADDRESS_ID]">
<Compare CompareOp="EQ">
<ScalarOperator>
<Identifier>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[WORK_QUEUE_ITEM]" Column="ADDRESS_ID" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Identifier>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</Identifier>
</ScalarOperator>
</Compare>
</ScalarOperator>
</Residual>
<RelOp AvgRowSize="11" EstimateCPU="2.42144" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="590911" LogicalOp="Repartition Streams" NodeId="21" Parallel="true" PhysicalOp="Parallelism" EstimatedTotalSubtreeCost="3.64254">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[WORK_QUEUE_ITEM]" Column="ADDRESS_ID" />
</OutputList>
<Parallelism PartitioningType="Hash">
<PartitionColumns>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[WORK_QUEUE_ITEM]" Column="ADDRESS_ID" />
</PartitionColumns>
<OrderBy>
<OrderByColumn Ascending="true">
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[WORK_QUEUE_ITEM]" Column="ADDRESS_ID" />
</OrderByColumn>
</OrderBy>
<RelOp AvgRowSize="11" EstimateCPU="11.2936" EstimateIO="158.002" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="590911" LogicalOp="Index Scan" NodeId="22" Parallel="true" PhysicalOp="Index Scan" EstimatedTotalSubtreeCost="1.2211" TableCardinality="82135100">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[WORK_QUEUE_ITEM]" Column="ADDRESS_ID" />
</OutputList>
<IndexScan Ordered="true" ScanDirection="FORWARD" ForcedIndex="false" ForceSeek="false" ForceScan="false" NoExpandHint="false" Storage="RowStore">
<DefinedValues>
<DefinedValue>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[WORK_QUEUE_ITEM]" Column="ADDRESS_ID" />
</DefinedValue>
</DefinedValues>
<Object Database="[cmsperformance]" Schema="[dbo]" Table="[WORK_QUEUE_ITEM]" Index="[idx_address]" IndexKind="NonClustered" />
</IndexScan>
</RelOp>
</Parallelism>
</RelOp>
<RelOp AvgRowSize="11" EstimateCPU="27.4473" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="3291110" LogicalOp="Filter" NodeId="23" Parallel="true" PhysicalOp="Filter" EstimatedTotalSubtreeCost="120.987">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</OutputList>
<Filter StartupExpression="false">
<RelOp AvgRowSize="15" EstimateCPU="126.569" EstimateIO="0.218633" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="3291110" LogicalOp="Right Outer Join" NodeId="24" Parallel="true" PhysicalOp="Merge Join" EstimatedTotalSubtreeCost="120.789">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[PACKET]" Column="PACKET_ID" />
</OutputList>
<Merge ManyToMany="true">
<InnerSideJoinColumns>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</InnerSideJoinColumns>
<OuterSideJoinColumns>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[PACKET]" Column="ADDRESS_ID" />
</OuterSideJoinColumns>
<Residual>
<ScalarOperator ScalarString="[cmsperformance].[dbo].[PACKET].[ADDRESS_ID]=[cmsperformance].[dbo].[ADDRESS].[ADDRESS_ID]">
<Compare CompareOp="EQ">
<ScalarOperator>
<Identifier>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[PACKET]" Column="ADDRESS_ID" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Identifier>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</Identifier>
</ScalarOperator>
</Compare>
</ScalarOperator>
</Residual>
<RelOp AvgRowSize="15" EstimateCPU="0.0970953" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="16544.4" LogicalOp="Repartition Streams" NodeId="25" Parallel="true" PhysicalOp="Parallelism" EstimatedTotalSubtreeCost="0.140094">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[PACKET]" Column="PACKET_ID" />
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[PACKET]" Column="ADDRESS_ID" />
</OutputList>
<Parallelism PartitioningType="Hash">
<PartitionColumns>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[PACKET]" Column="ADDRESS_ID" />
</PartitionColumns>
<OrderBy>
<OrderByColumn Ascending="true">
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[PACKET]" Column="ADDRESS_ID" />
</OrderByColumn>
</OrderBy>
<RelOp AvgRowSize="15" EstimateCPU="0.316217" EstimateIO="5.22683" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="16544.4" LogicalOp="Index Scan" NodeId="26" Parallel="true" PhysicalOp="Index Scan" EstimatedTotalSubtreeCost="0.0429986" TableCardinality="2299620">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[PACKET]" Column="PACKET_ID" />
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[PACKET]" Column="ADDRESS_ID" />
</OutputList>
<IndexScan Ordered="true" ScanDirection="FORWARD" ForcedIndex="false" ForceSeek="false" ForceScan="false" NoExpandHint="false" Storage="RowStore">
<DefinedValues>
<DefinedValue>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[PACKET]" Column="PACKET_ID" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[PACKET]" Column="ADDRESS_ID" />
</DefinedValue>
</DefinedValues>
<Object Database="[cmsperformance]" Schema="[dbo]" Table="[PACKET]" Index="[idx_address]" IndexKind="NonClustered" />
</IndexScan>
</RelOp>
</Parallelism>
</RelOp>
<RelOp AvgRowSize="11" EstimateCPU="27.4473" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="3291110" LogicalOp="Filter" NodeId="27" Parallel="true" PhysicalOp="Filter" EstimatedTotalSubtreeCost="114.054">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</OutputList>
<Filter StartupExpression="false">
<RelOp AvgRowSize="15" EstimateCPU="126.308" EstimateIO="1.38245" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="3291110" LogicalOp="Right Outer Join" NodeId="28" Parallel="true" PhysicalOp="Merge Join" EstimatedTotalSubtreeCost="113.856">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[DIRECT_LENDING_SERVICE]" Column="DIRECT_LENDING_SERVICE_ID" />
</OutputList>
<Merge ManyToMany="true">
<InnerSideJoinColumns>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</InnerSideJoinColumns>
<OuterSideJoinColumns>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[DIRECT_LENDING_SERVICE]" Column="PREV_LIENHOLDER_MAIL_TO_ADDRESS_ID" />
</OuterSideJoinColumns>
<Residual>
<ScalarOperator ScalarString="[cmsperformance].[dbo].[DIRECT_LENDING_SERVICE].[PREV_LIENHOLDER_MAIL_TO_ADDRESS_ID]=[cmsperformance].[dbo].[ADDRESS].[ADDRESS_ID]">
<Compare CompareOp="EQ">
<ScalarOperator>
<Identifier>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[DIRECT_LENDING_SERVICE]" Column="PREV_LIENHOLDER_MAIL_TO_ADDRESS_ID" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Identifier>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</Identifier>
</ScalarOperator>
</Compare>
</ScalarOperator>
</Residual>
<RelOp AvgRowSize="15" EstimateCPU="0.0490204" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="4944.41" LogicalOp="Repartition Streams" NodeId="29" Parallel="true" PhysicalOp="Parallelism" EstimatedTotalSubtreeCost="0.0624888">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[DIRECT_LENDING_SERVICE]" Column="DIRECT_LENDING_SERVICE_ID" />
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[DIRECT_LENDING_SERVICE]" Column="PREV_LIENHOLDER_MAIL_TO_ADDRESS_ID" />
</OutputList>
<Parallelism PartitioningType="Hash">
<PartitionColumns>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[DIRECT_LENDING_SERVICE]" Column="PREV_LIENHOLDER_MAIL_TO_ADDRESS_ID" />
</PartitionColumns>
<OrderBy>
<OrderByColumn Ascending="true">
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[DIRECT_LENDING_SERVICE]" Column="PREV_LIENHOLDER_MAIL_TO_ADDRESS_ID" />
</OrderByColumn>
</OrderBy>
<RelOp AvgRowSize="15" EstimateCPU="0.0945177" EstimateIO="1.34387" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="4944.41" LogicalOp="Index Scan" NodeId="30" Parallel="true" PhysicalOp="Index Scan" EstimatedTotalSubtreeCost="0.0134684" TableCardinality="687259">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[DIRECT_LENDING_SERVICE]" Column="DIRECT_LENDING_SERVICE_ID" />
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[DIRECT_LENDING_SERVICE]" Column="PREV_LIENHOLDER_MAIL_TO_ADDRESS_ID" />
</OutputList>
<IndexScan Ordered="true" ScanDirection="FORWARD" ForcedIndex="false" ForceSeek="false" ForceScan="false" NoExpandHint="false" Storage="RowStore">
<DefinedValues>
<DefinedValue>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[DIRECT_LENDING_SERVICE]" Column="DIRECT_LENDING_SERVICE_ID" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[DIRECT_LENDING_SERVICE]" Column="PREV_LIENHOLDER_MAIL_TO_ADDRESS_ID" />
</DefinedValue>
</DefinedValues>
<Object Database="[cmsperformance]" Schema="[dbo]" Table="[DIRECT_LENDING_SERVICE]" Index="[idx_PREV_LIENHOLDER_MAIL_TO_ADDRESS]" IndexKind="NonClustered" />
</IndexScan>
</RelOp>
</Parallelism>
</RelOp>
<RelOp AvgRowSize="11" EstimateCPU="27.4473" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="3291110" LogicalOp="Filter" NodeId="31" Parallel="true" PhysicalOp="Filter" EstimatedTotalSubtreeCost="107.192">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</OutputList>
<Filter StartupExpression="false">
<RelOp AvgRowSize="15" EstimateCPU="0.0285332" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="3291110" LogicalOp="Repartition Streams" NodeId="32" Parallel="true" PhysicalOp="Parallelism" EstimatedTotalSubtreeCost="106.994">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[CHECK_REQUEST_DEFAULT_ADDRESS]" Column="CHECK_REQUEST_DEFAULT_ADDRESS_ID" />
</OutputList>
<Parallelism PartitioningType="Hash">
<PartitionColumns>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</PartitionColumns>
<OrderBy>
<OrderByColumn Ascending="true">
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</OrderByColumn>
</OrderBy>
<RelOp AvgRowSize="15" EstimateCPU="125.933" EstimateIO="0.0334788" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="3291110" LogicalOp="Right Outer Join" NodeId="33" Parallel="true" PhysicalOp="Merge Join" EstimatedTotalSubtreeCost="106.966">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[CHECK_REQUEST_DEFAULT_ADDRESS]" Column="CHECK_REQUEST_DEFAULT_ADDRESS_ID" />
</OutputList>
<Merge ManyToMany="true">
<InnerSideJoinColumns>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</InnerSideJoinColumns>
<OuterSideJoinColumns>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[CHECK_REQUEST_DEFAULT_ADDRESS]" Column="ADDRESS_ID" />
</OuterSideJoinColumns>
<Residual>
<ScalarOperator ScalarString="[cmsperformance].[dbo].[CHECK_REQUEST_DEFAULT_ADDRESS].[ADDRESS_ID]=[cmsperformance].[dbo].[ADDRESS].[ADDRESS_ID]">
<Compare CompareOp="EQ">
<ScalarOperator>
<Identifier>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[CHECK_REQUEST_DEFAULT_ADDRESS]" Column="ADDRESS_ID" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Identifier>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</Identifier>
</ScalarOperator>
</Compare>
</ScalarOperator>
</Residual>
<RelOp AvgRowSize="15" EstimateCPU="0.0287329" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="49.2528" LogicalOp="Repartition Streams" NodeId="34" Parallel="true" PhysicalOp="Parallelism" EstimatedTotalSubtreeCost="0.0320096">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[CHECK_REQUEST_DEFAULT_ADDRESS]" Column="CHECK_REQUEST_DEFAULT_ADDRESS_ID" />
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[CHECK_REQUEST_DEFAULT_ADDRESS]" Column="ADDRESS_ID" />
</OutputList>
<Parallelism PartitioningType="Hash">
<PartitionColumns>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[CHECK_REQUEST_DEFAULT_ADDRESS]" Column="ADDRESS_ID" />
</PartitionColumns>
<OrderBy>
<OrderByColumn Ascending="true">
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[CHECK_REQUEST_DEFAULT_ADDRESS]" Column="ADDRESS_ID" />
</OrderByColumn>
</OrderBy>
<RelOp AvgRowSize="15" EstimateCPU="0.00096095" EstimateIO="0.0209028" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="49.2528" LogicalOp="Index Scan" NodeId="35" Parallel="true" PhysicalOp="Index Scan" EstimatedTotalSubtreeCost="0.00327672" TableCardinality="6846">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[CHECK_REQUEST_DEFAULT_ADDRESS]" Column="CHECK_REQUEST_DEFAULT_ADDRESS_ID" />
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[CHECK_REQUEST_DEFAULT_ADDRESS]" Column="ADDRESS_ID" />
</OutputList>
<IndexScan Ordered="true" ScanDirection="FORWARD" ForcedIndex="false" ForceSeek="false" ForceScan="false" NoExpandHint="false" Storage="RowStore">
<DefinedValues>
<DefinedValue>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[CHECK_REQUEST_DEFAULT_ADDRESS]" Column="CHECK_REQUEST_DEFAULT_ADDRESS_ID" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[CHECK_REQUEST_DEFAULT_ADDRESS]" Column="ADDRESS_ID" />
</DefinedValue>
</DefinedValues>
<Object Database="[cmsperformance]" Schema="[dbo]" Table="[CHECK_REQUEST_DEFAULT_ADDRESS]" Index="[idx_address]" IndexKind="NonClustered" />
</IndexScan>
</RelOp>
</Parallelism>
</RelOp>
<RelOp AvgRowSize="11" EstimateCPU="27.4473" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="3291110" LogicalOp="Filter" NodeId="36" Parallel="true" PhysicalOp="Filter" EstimatedTotalSubtreeCost="100.344">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</OutputList>
<Filter StartupExpression="false">
<RelOp AvgRowSize="15" EstimateCPU="125.992" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="3291110" LogicalOp="Left Outer Join" NodeId="37" Parallel="true" PhysicalOp="Merge Join" EstimatedTotalSubtreeCost="100.147">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI3]" Column="EARLY_PAYOFF_INFO_ID" />
</OutputList>
<Merge ManyToMany="false">
<InnerSideJoinColumns>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI3]" Column="ADDRESS_ID2" />
</InnerSideJoinColumns>
<OuterSideJoinColumns>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</OuterSideJoinColumns>
<Residual>
<ScalarOperator ScalarString="[cmsperformance].[dbo].[EARLY_PAYOFF_INFO].[ADDRESS_ID2] as [EPI3].[ADDRESS_ID2]=[cmsperformance].[dbo].[ADDRESS].[ADDRESS_ID]">
<Compare CompareOp="EQ">
<ScalarOperator>
<Identifier>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI3]" Column="ADDRESS_ID2" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Identifier>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</Identifier>
</ScalarOperator>
</Compare>
</ScalarOperator>
</Residual>
<RelOp AvgRowSize="11" EstimateCPU="27.4473" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="3291110" LogicalOp="Filter" NodeId="38" Parallel="true" PhysicalOp="Filter" EstimatedTotalSubtreeCost="93.5016">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</OutputList>
<Filter StartupExpression="false">
<RelOp AvgRowSize="15" EstimateCPU="125.992" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="3291110" LogicalOp="Left Outer Join" NodeId="39" Parallel="true" PhysicalOp="Merge Join" EstimatedTotalSubtreeCost="93.3041">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI2]" Column="EARLY_PAYOFF_INFO_ID" />
</OutputList>
<Merge ManyToMany="false">
<InnerSideJoinColumns>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI2]" Column="ADDRESS_ID1" />
</InnerSideJoinColumns>
<OuterSideJoinColumns>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</OuterSideJoinColumns>
<Residual>
<ScalarOperator ScalarString="[cmsperformance].[dbo].[EARLY_PAYOFF_INFO].[ADDRESS_ID1] as [EPI2].[ADDRESS_ID1]=[cmsperformance].[dbo].[ADDRESS].[ADDRESS_ID]">
<Compare CompareOp="EQ">
<ScalarOperator>
<Identifier>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI2]" Column="ADDRESS_ID1" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Identifier>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</Identifier>
</ScalarOperator>
</Compare>
</ScalarOperator>
</Residual>
<RelOp AvgRowSize="11" EstimateCPU="27.4473" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="3291110" LogicalOp="Filter" NodeId="40" Parallel="true" PhysicalOp="Filter" EstimatedTotalSubtreeCost="70.9941">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</OutputList>
<Filter StartupExpression="false">
<RelOp AvgRowSize="15" EstimateCPU="125.992" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="3291110" LogicalOp="Left Outer Join" NodeId="41" Parallel="true" PhysicalOp="Merge Join" EstimatedTotalSubtreeCost="70.7967">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI1]" Column="EARLY_PAYOFF_INFO_ID" />
</OutputList>
<Merge ManyToMany="false">
<InnerSideJoinColumns>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI1]" Column="ADDRESS_ID" />
</InnerSideJoinColumns>
<OuterSideJoinColumns>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</OuterSideJoinColumns>
<Residual>
<ScalarOperator ScalarString="[cmsperformance].[dbo].[EARLY_PAYOFF_INFO].[ADDRESS_ID] as [EPI1].[ADDRESS_ID]=[cmsperformance].[dbo].[ADDRESS].[ADDRESS_ID]">
<Compare CompareOp="EQ">
<ScalarOperator>
<Identifier>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI1]" Column="ADDRESS_ID" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Identifier>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</Identifier>
</ScalarOperator>
</Compare>
</ScalarOperator>
</Residual>
<RelOp AvgRowSize="11" EstimateCPU="13.356" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="3291110" LogicalOp="Repartition Streams" NodeId="42" Parallel="true" PhysicalOp="Parallelism" EstimatedTotalSubtreeCost="48.4867">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</OutputList>
<Parallelism PartitioningType="Hash">
<PartitionColumns>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</PartitionColumns>
<OrderBy>
<OrderByColumn Ascending="true">
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</OrderByColumn>
</OrderBy>
<RelOp AvgRowSize="11" EstimateCPU="62.9001" EstimateIO="4819.74" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="3291110" LogicalOp="Clustered Index Scan" NodeId="43" Parallel="true" PhysicalOp="Clustered Index Scan" EstimatedTotalSubtreeCost="35.1307" TableCardinality="457455000">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</OutputList>
<IndexScan Ordered="true" ScanDirection="FORWARD" ForcedIndex="false" ForceSeek="false" ForceScan="false" NoExpandHint="false" Storage="RowStore">
<DefinedValues>
<DefinedValue>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</DefinedValue>
</DefinedValues>
<Object Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Index="[ADDRESS_PK]" TableReferenceId="2" IndexKind="Clustered" />
</IndexScan>
</RelOp>
</Parallelism>
</RelOp>
<RelOp AvgRowSize="15" EstimateCPU="8.12372" EstimateIO="0.00140766" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="5231.39" LogicalOp="Sort" NodeId="44" Parallel="true" PhysicalOp="Sort" EstimatedTotalSubtreeCost="15.7258">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI1]" Column="EARLY_PAYOFF_INFO_ID" />
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI1]" Column="ADDRESS_ID" />
</OutputList>
<MemoryFractions Input="0.5" Output="0.5" />
<Sort Distinct="false">
<OrderBy>
<OrderByColumn Ascending="true">
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI1]" Column="ADDRESS_ID" />
</OrderByColumn>
</OrderBy>
<RelOp AvgRowSize="15" EstimateCPU="0.315292" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="727149" LogicalOp="Repartition Streams" NodeId="45" Parallel="true" PhysicalOp="Parallelism" EstimatedTotalSubtreeCost="7.60064">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI1]" Column="EARLY_PAYOFF_INFO_ID" />
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI1]" Column="ADDRESS_ID" />
</OutputList>
<Parallelism PartitioningType="Hash">
<PartitionColumns>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI1]" Column="ADDRESS_ID" />
</PartitionColumns>
<RelOp AvgRowSize="15" EstimateCPU="0.100003" EstimateIO="7.18535" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="727149" LogicalOp="Clustered Index Scan" NodeId="46" Parallel="true" PhysicalOp="Clustered Index Scan" EstimatedTotalSubtreeCost="7.28535" TableCardinality="727149">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI1]" Column="EARLY_PAYOFF_INFO_ID" />
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI1]" Column="ADDRESS_ID" />
</OutputList>
<IndexScan Ordered="false" ForcedIndex="false" ForceScan="false" NoExpandHint="false">
<DefinedValues>
<DefinedValue>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI1]" Column="EARLY_PAYOFF_INFO_ID" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI1]" Column="ADDRESS_ID" />
</DefinedValue>
</DefinedValues>
<Object Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Index="[EARLY_PAYOFF_INFO_PK]" Alias="[EPI1]" IndexKind="Clustered" />
</IndexScan>
</RelOp>
</Parallelism>
</RelOp>
</Sort>
</RelOp>
</Merge>
</RelOp>
<Predicate>
<ScalarOperator ScalarString="[cmsperformance].[dbo].[EARLY_PAYOFF_INFO].[EARLY_PAYOFF_INFO_ID] as [EPI1].[EARLY_PAYOFF_INFO_ID] IS NULL">
<Compare CompareOp="IS">
<ScalarOperator>
<Identifier>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI1]" Column="EARLY_PAYOFF_INFO_ID" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Const ConstValue="NULL" />
</ScalarOperator>
</Compare>
</ScalarOperator>
</Predicate>
</Filter>
</RelOp>
<RelOp AvgRowSize="15" EstimateCPU="8.12372" EstimateIO="0.00140766" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="5231.39" LogicalOp="Sort" NodeId="49" Parallel="true" PhysicalOp="Sort" EstimatedTotalSubtreeCost="15.7258">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI2]" Column="EARLY_PAYOFF_INFO_ID" />
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI2]" Column="ADDRESS_ID1" />
</OutputList>
<MemoryFractions Input="0.5" Output="0.5" />
<Sort Distinct="false">
<OrderBy>
<OrderByColumn Ascending="true">
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI2]" Column="ADDRESS_ID1" />
</OrderByColumn>
</OrderBy>
<RelOp AvgRowSize="15" EstimateCPU="0.315292" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="727149" LogicalOp="Repartition Streams" NodeId="50" Parallel="true" PhysicalOp="Parallelism" EstimatedTotalSubtreeCost="7.60064">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI2]" Column="EARLY_PAYOFF_INFO_ID" />
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI2]" Column="ADDRESS_ID1" />
</OutputList>
<Parallelism PartitioningType="Hash">
<PartitionColumns>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI2]" Column="ADDRESS_ID1" />
</PartitionColumns>
<RelOp AvgRowSize="15" EstimateCPU="0.100003" EstimateIO="7.18535" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="727149" LogicalOp="Clustered Index Scan" NodeId="51" Parallel="true" PhysicalOp="Clustered Index Scan" EstimatedTotalSubtreeCost="7.28535" TableCardinality="727149">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI2]" Column="EARLY_PAYOFF_INFO_ID" />
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI2]" Column="ADDRESS_ID1" />
</OutputList>
<IndexScan Ordered="false" ForcedIndex="false" ForceScan="false" NoExpandHint="false">
<DefinedValues>
<DefinedValue>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI2]" Column="EARLY_PAYOFF_INFO_ID" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI2]" Column="ADDRESS_ID1" />
</DefinedValue>
</DefinedValues>
<Object Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Index="[EARLY_PAYOFF_INFO_PK]" Alias="[EPI2]" IndexKind="Clustered" />
</IndexScan>
</RelOp>
</Parallelism>
</RelOp>
</Sort>
</RelOp>
</Merge>
</RelOp>
<Predicate>
<ScalarOperator ScalarString="[cmsperformance].[dbo].[EARLY_PAYOFF_INFO].[EARLY_PAYOFF_INFO_ID] as [EPI2].[EARLY_PAYOFF_INFO_ID] IS NULL">
<Compare CompareOp="IS">
<ScalarOperator>
<Identifier>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI2]" Column="EARLY_PAYOFF_INFO_ID" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Const ConstValue="NULL" />
</ScalarOperator>
</Compare>
</ScalarOperator>
</Predicate>
</Filter>
</RelOp>
<RelOp AvgRowSize="15" EstimateCPU="0.0502098" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="5231.39" LogicalOp="Repartition Streams" NodeId="54" Parallel="true" PhysicalOp="Parallelism" EstimatedTotalSubtreeCost="0.0607766">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI3]" Column="EARLY_PAYOFF_INFO_ID" />
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI3]" Column="ADDRESS_ID2" />
</OutputList>
<Parallelism PartitioningType="Hash">
<PartitionColumns>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI3]" Column="ADDRESS_ID2" />
</PartitionColumns>
<OrderBy>
<OrderByColumn Ascending="true">
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI3]" Column="ADDRESS_ID2" />
</OrderByColumn>
</OrderBy>
<RelOp AvgRowSize="15" EstimateCPU="0.100003" EstimateIO="0.934977" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="5231.39" LogicalOp="Index Scan" NodeId="55" Parallel="true" PhysicalOp="Index Scan" EstimatedTotalSubtreeCost="0.0105668" TableCardinality="727149">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI3]" Column="EARLY_PAYOFF_INFO_ID" />
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI3]" Column="ADDRESS_ID2" />
</OutputList>
<IndexScan Ordered="true" ScanDirection="FORWARD" ForcedIndex="false" ForceSeek="false" ForceScan="false" NoExpandHint="false" Storage="RowStore">
<DefinedValues>
<DefinedValue>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI3]" Column="EARLY_PAYOFF_INFO_ID" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI3]" Column="ADDRESS_ID2" />
</DefinedValue>
</DefinedValues>
<Object Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Index="[index_Early_Payoff_Info_Address_Id2]" Alias="[EPI3]" IndexKind="NonClustered" />
</IndexScan>
</RelOp>
</Parallelism>
</RelOp>
</Merge>
</RelOp>
<Predicate>
<ScalarOperator ScalarString="[cmsperformance].[dbo].[EARLY_PAYOFF_INFO].[EARLY_PAYOFF_INFO_ID] as [EPI3].[EARLY_PAYOFF_INFO_ID] IS NULL">
<Compare CompareOp="IS">
<ScalarOperator>
<Identifier>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI3]" Column="EARLY_PAYOFF_INFO_ID" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Const ConstValue="NULL" />
</ScalarOperator>
</Compare>
</ScalarOperator>
</Predicate>
</Filter>
</RelOp>
</Merge>
</RelOp>
</Parallelism>
</RelOp>
<Predicate>
<ScalarOperator ScalarString="[cmsperformance].[dbo].[CHECK_REQUEST_DEFAULT_ADDRESS].[CHECK_REQUEST_DEFAULT_ADDRESS_ID] IS NULL">
<Compare CompareOp="IS">
<ScalarOperator>
<Identifier>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[CHECK_REQUEST_DEFAULT_ADDRESS]" Column="CHECK_REQUEST_DEFAULT_ADDRESS_ID" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Const ConstValue="NULL" />
</ScalarOperator>
</Compare>
</ScalarOperator>
</Predicate>
</Filter>
</RelOp>
</Merge>
</RelOp>
<Predicate>
<ScalarOperator ScalarString="[cmsperformance].[dbo].[DIRECT_LENDING_SERVICE].[DIRECT_LENDING_SERVICE_ID] IS NULL">
<Compare CompareOp="IS">
<ScalarOperator>
<Identifier>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[DIRECT_LENDING_SERVICE]" Column="DIRECT_LENDING_SERVICE_ID" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Const ConstValue="NULL" />
</ScalarOperator>
</Compare>
</ScalarOperator>
</Predicate>
</Filter>
</RelOp>
</Merge>
</RelOp>
<Predicate>
<ScalarOperator ScalarString="[cmsperformance].[dbo].[PACKET].[PACKET_ID] IS NULL">
<Compare CompareOp="IS">
<ScalarOperator>
<Identifier>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[PACKET]" Column="PACKET_ID" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Const ConstValue="NULL" />
</ScalarOperator>
</Compare>
</ScalarOperator>
</Predicate>
</Filter>
</RelOp>
</Merge>
</RelOp>
<Predicate>
<ScalarOperator ScalarString="[cmsperformance].[dbo].[WORK_QUEUE_ITEM].[ADDRESS_ID] IS NULL">
<Compare CompareOp="IS">
<ScalarOperator>
<Identifier>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[WORK_QUEUE_ITEM]" Column="ADDRESS_ID" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Const ConstValue="NULL" />
</ScalarOperator>
</Compare>
</ScalarOperator>
</Predicate>
</Filter>
</RelOp>
</Merge>
</RelOp>
<Predicate>
<ScalarOperator ScalarString="[cmsperformance].[dbo].[LEGAL_ENTITY].[LEGAL_ENTITY_ID] IS NULL">
<Compare CompareOp="IS">
<ScalarOperator>
<Identifier>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[LEGAL_ENTITY]" Column="LEGAL_ENTITY_ID" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Const ConstValue="NULL" />
</ScalarOperator>
</Compare>
</ScalarOperator>
</Predicate>
</Filter>
</RelOp>
</Merge>
</RelOp>
<Predicate>
<ScalarOperator ScalarString="[cmsperformance].[dbo].[SERVICE_REQUEST].[SERVICE_REQUEST_ID] IS NULL">
<Compare CompareOp="IS">
<ScalarOperator>
<Identifier>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[SERVICE_REQUEST]" Column="SERVICE_REQUEST_ID" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Const ConstValue="NULL" />
</ScalarOperator>
</Compare>
</ScalarOperator>
</Predicate>
</Filter>
</RelOp>
</Merge>
</RelOp>
<Predicate>
<ScalarOperator ScalarString="[cmsperformance].[dbo].[LIENHOLDER].[ADDRESS_ID] IS NULL">
<Compare CompareOp="IS">
<ScalarOperator>
<Identifier>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[LIENHOLDER]" Column="ADDRESS_ID" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Const ConstValue="NULL" />
</ScalarOperator>
</Compare>
</ScalarOperator>
</Predicate>
</Filter>
</RelOp>
</StreamAggregate>
</RelOp>
</Parallelism>
</RelOp>
</Merge>
</RelOp>
</Parallelism>
</RelOp>
</Top>
</RelOp>
</QueryPlan>
</StmtSimple>
</Statements>
</Batch>
</BatchSequence>
</ShowPlanXML>
February 13, 2016 at 4:26 pm
Here's the sql 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.2" Build="11.0.5582.0" xmlns="http://schemas.microsoft.com/sqlserver/2004/07/showplan">
<BatchSequence>
<Batch>
<Statements>
<StmtSimple StatementCompId="1" StatementId="1" StatementText=" SET TRANSACTION ISOLATION LEVEL READ COMMITTED; " StatementType="SET TRANSACTION ISOLATION LEVEL" RetrievedFromCache="false" />
</Statements>
<Statements>
<StmtSimple StatementCompId="2" StatementId="2" StatementText=" SET NOCOUNT OFF ---ON; " StatementType="SET ON/OFF" RetrievedFromCache="false" />
</Statements>
<Statements>
<StmtSimple StatementCompId="3" StatementEstRows="20000" StatementId="3" StatementOptmLevel="FULL" StatementSubTreeCost="240.172" StatementText=" SELECT TOP ( 20000 ) ADDRESS_ID FROM DBO.ADDRESS WHERE ADDRESS.ADDRESS_ID IN ( SELECT ADDRESS.address_id FROM ADDRESS LEFT OUTER JOIN EARLY_PAYOFF_INFO EPI1 ON EPI1.ADDRESS_ID = ADDRESS.ADDRESS_ID LEFT OUTER JOIN EARLY_PAYOFF_INFO EPI2 ON EPI2.ADDRESS_ID1 = ADDRESS.ADDRESS_ID LEFT OUTER JOIN EARLY_PAYOFF_INFO EPI3 ON EPI3.ADDRESS_ID2 = ADDRESS.ADDRESS_ID LEFT OUTER JOIN CHECK_REQUEST_DEFAULT_ADDRESS ON CHECK_REQUEST_DEFAULT_ADDRESS.ADDRESS_ID = ADDRESS.ADDRESS_ID LEFT OUTER JOIN DIRECT_LENDING_SERVICE ON DIRECT_LENDING_SERVICE.PREV_LIENHOLDER_MAIL_TO_ADDRESS_ID = ADDRESS.ADDRESS_ID LEFT OUTER JOIN PACKET ON PACKET.ADDRESS_ID = ADDRESS.ADDRESS_ID LEFT OUTER JOIN WORK_QUEUE_ITEM ON WORK_QUEUE_ITEM.ADDRESS_ID = ADDRESS.ADDRESS_ID LEFT OUTER JOIN LEGAL_ENTITY ON LEGAL_ENTITY.ADDRESS_ID = ADDRESS.ADDRESS_ID LEFT OUTER JOIN SERVICE_REQUEST ON SERVICE_REQUEST.ADDRESS_ID = ADDRESS.ADDRESS_ID LEFT OUTER JOIN LIENHOLDER ON LIENHOLDER.ADDRESS_ID = ADDRESS.ADDRESS_ID WHERE EPI1.EARLY_PAYOFF_INFO_ID IS NULL AND EPI2.EARLY_PAYOFF_INFO_ID IS NULL AND EPI3.EARLY_PAYOFF_INFO_ID IS NULL AND CHECK_REQUEST_DEFAULT_ADDRESS.CHECK_REQUEST_DEFAULT_ADDRESS_ID IS NULL AND DIRECT_LENDING_SERVICE.DIRECT_LENDING_SERVICE_ID IS NULL AND WORK_QUEUE_ITEM.ADDRESS_ID IS NULL AND PACKET.PACKET_ID IS NULL AND LEGAL_ENTITY.LEGAL_ENTITY_ID IS NULL AND SERVICE_REQUEST.SERVICE_REQUEST_ID IS NULL AND LIENHOLDER.ADDRESS_ID IS NULL ) ORDER BY ADDRESS_ID OPTION ( MAXDOP 8 ); " StatementType="SELECT" QueryHash="0xB611CCC53C7FE1C4" QueryPlanHash="0xF1FE424191871166" RetrievedFromCache="false">
<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="144" CompileTime="646" CompileCPU="528" CompileMemory="3472">
<ThreadStat Branches="13" />
<MemoryGrantInfo SerialRequiredMemory="1024" SerialDesiredMemory="98960" />
<OptimizerHardwareDependentProperties EstimatedAvailableMemoryGrant="262144" EstimatedPagesCached="524288" EstimatedAvailableDegreeOfParallelism="8" />
<RelOp AvgRowSize="11" EstimateCPU="0.002" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="20000" LogicalOp="Top" NodeId="0" Parallel="false" PhysicalOp="Top" EstimatedTotalSubtreeCost="240.172">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</OutputList>
<Top RowCount="false" IsPercent="false" WithTies="false">
<TopExpression>
<ScalarOperator ScalarString="(20000)">
<Const ConstValue="(20000)" />
</ScalarOperator>
</TopExpression>
<RelOp AvgRowSize="11" EstimateCPU="0.108211" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="20000" LogicalOp="Gather Streams" NodeId="1" Parallel="true" PhysicalOp="Parallelism" EstimatedTotalSubtreeCost="240.17">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</OutputList>
<Parallelism>
<OrderBy>
<OrderByColumn Ascending="true">
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</OrderByColumn>
</OrderBy>
<RelOp AvgRowSize="11" EstimateCPU="120.868" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="20000" LogicalOp="Left Semi Join" NodeId="2" Parallel="true" PhysicalOp="Merge Join" EstimatedTotalSubtreeCost="240.062">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</OutputList>
<Merge ManyToMany="false">
<InnerSideJoinColumns>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</InnerSideJoinColumns>
<OuterSideJoinColumns>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</OuterSideJoinColumns>
<Residual>
<ScalarOperator ScalarString="[cmsperformance].[dbo].[ADDRESS].[ADDRESS_ID]=[cmsperformance].[dbo].[ADDRESS].[ADDRESS_ID]">
<Compare CompareOp="EQ">
<ScalarOperator>
<Identifier>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Identifier>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</Identifier>
</ScalarOperator>
</Compare>
</ScalarOperator>
</Residual>
<RelOp AvgRowSize="11" EstimateCPU="13.356" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="3291110" LogicalOp="Repartition Streams" NodeId="3" Parallel="true" PhysicalOp="Parallelism" EstimatedTotalSubtreeCost="48.4867">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</OutputList>
<Parallelism PartitioningType="Hash">
<PartitionColumns>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</PartitionColumns>
<OrderBy>
<OrderByColumn Ascending="true">
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</OrderByColumn>
</OrderBy>
<RelOp AvgRowSize="11" EstimateCPU="62.9001" EstimateIO="4819.74" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="3291110" LogicalOp="Clustered Index Scan" NodeId="4" Parallel="true" PhysicalOp="Clustered Index Scan" EstimatedTotalSubtreeCost="35.1307" TableCardinality="457455000">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</OutputList>
<IndexScan Ordered="true" ScanDirection="FORWARD" ForcedIndex="false" ForceSeek="false" ForceScan="false" NoExpandHint="false" Storage="RowStore">
<DefinedValues>
<DefinedValue>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</DefinedValue>
</DefinedValues>
<Object Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Index="[ADDRESS_PK]" TableReferenceId="1" IndexKind="Clustered" />
</IndexScan>
</RelOp>
</Parallelism>
</RelOp>
<RelOp AvgRowSize="11" EstimateCPU="0.11181" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="20565.7" LogicalOp="Repartition Streams" NodeId="5" Parallel="true" PhysicalOp="Parallelism" EstimatedTotalSubtreeCost="190.67">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</OutputList>
<Parallelism PartitioningType="Hash">
<PartitionColumns>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</PartitionColumns>
<OrderBy>
<OrderByColumn Ascending="true">
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</OrderByColumn>
</OrderBy>
<RelOp AvgRowSize="11" EstimateCPU="0.357676" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="20565.7" LogicalOp="Aggregate" NodeId="6" Parallel="true" PhysicalOp="Stream Aggregate" EstimatedTotalSubtreeCost="190.558">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</OutputList>
<StreamAggregate>
<DefinedValues />
<GroupBy>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</GroupBy>
<RelOp AvgRowSize="11" EstimateCPU="3.17512" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="20606.5" LogicalOp="Filter" NodeId="7" Parallel="true" PhysicalOp="Filter" EstimatedTotalSubtreeCost="190.556">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</OutputList>
<Filter StartupExpression="false">
<RelOp AvgRowSize="15" EstimateCPU="87.7147" EstimateIO="246.794" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="380717" LogicalOp="Right Outer Join" NodeId="8" Parallel="true" PhysicalOp="Merge Join" EstimatedTotalSubtreeCost="190.533">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[LIENHOLDER]" Column="ADDRESS_ID" />
</OutputList>
<Merge ManyToMany="true">
<InnerSideJoinColumns>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</InnerSideJoinColumns>
<OuterSideJoinColumns>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[LIENHOLDER]" Column="ADDRESS_ID" />
</OuterSideJoinColumns>
<Residual>
<ScalarOperator ScalarString="[cmsperformance].[dbo].[LIENHOLDER].[ADDRESS_ID]=[cmsperformance].[dbo].[ADDRESS].[ADDRESS_ID]">
<Compare CompareOp="EQ">
<ScalarOperator>
<Identifier>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[LIENHOLDER]" Column="ADDRESS_ID" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Identifier>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</Identifier>
</ScalarOperator>
</Compare>
</ScalarOperator>
</Residual>
<RelOp AvgRowSize="11" EstimateCPU="2.93025" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="716557" LogicalOp="Repartition Streams" NodeId="9" Parallel="true" PhysicalOp="Parallelism" EstimatedTotalSubtreeCost="4.28974">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[LIENHOLDER]" Column="ADDRESS_ID" />
</OutputList>
<Parallelism PartitioningType="Hash">
<PartitionColumns>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[LIENHOLDER]" Column="ADDRESS_ID" />
</PartitionColumns>
<OrderBy>
<OrderByColumn Ascending="true">
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[LIENHOLDER]" Column="ADDRESS_ID" />
</OrderByColumn>
</OrderBy>
<RelOp AvgRowSize="11" EstimateCPU="13.695" EstimateIO="174.837" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="716557" LogicalOp="Index Scan" NodeId="10" Parallel="true" PhysicalOp="Index Scan" EstimatedTotalSubtreeCost="1.35949" TableCardinality="99599500">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[LIENHOLDER]" Column="ADDRESS_ID" />
</OutputList>
<IndexScan Ordered="true" ScanDirection="FORWARD" ForcedIndex="false" ForceSeek="false" ForceScan="false" NoExpandHint="false" Storage="RowStore">
<DefinedValues>
<DefinedValue>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[LIENHOLDER]" Column="ADDRESS_ID" />
</DefinedValue>
</DefinedValues>
<Object Database="[cmsperformance]" Schema="[dbo]" Table="[LIENHOLDER]" Index="[_dta_index_LIENHOLDER_5_1413580074__K5]" IndexKind="NonClustered" />
</IndexScan>
</RelOp>
</Parallelism>
</RelOp>
<RelOp AvgRowSize="11" EstimateCPU="7.31692" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="363316" LogicalOp="Filter" NodeId="11" Parallel="true" PhysicalOp="Filter" EstimatedTotalSubtreeCost="183.179">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</OutputList>
<Filter StartupExpression="false">
<RelOp AvgRowSize="15" EstimateCPU="112.059" EstimateIO="341.213" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="877346" LogicalOp="Right Outer Join" NodeId="12" Parallel="true" PhysicalOp="Merge Join" EstimatedTotalSubtreeCost="183.126">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[SERVICE_REQUEST]" Column="SERVICE_REQUEST_ID" />
</OutputList>
<Merge ManyToMany="true">
<InnerSideJoinColumns>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</InnerSideJoinColumns>
<OuterSideJoinColumns>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[SERVICE_REQUEST]" Column="ADDRESS_ID" />
</OuterSideJoinColumns>
<Residual>
<ScalarOperator ScalarString="[cmsperformance].[dbo].[SERVICE_REQUEST].[ADDRESS_ID]=[cmsperformance].[dbo].[ADDRESS].[ADDRESS_ID]">
<Compare CompareOp="EQ">
<ScalarOperator>
<Identifier>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[SERVICE_REQUEST]" Column="ADDRESS_ID" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Identifier>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</Identifier>
</ScalarOperator>
</Compare>
</ScalarOperator>
</Residual>
<RelOp AvgRowSize="15" EstimateCPU="2.50983" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="598711" LogicalOp="Repartition Streams" NodeId="13" Parallel="true" PhysicalOp="Parallelism" EstimatedTotalSubtreeCost="4.33488">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[SERVICE_REQUEST]" Column="SERVICE_REQUEST_ID" />
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[SERVICE_REQUEST]" Column="ADDRESS_ID" />
</OutputList>
<Parallelism PartitioningType="Hash">
<PartitionColumns>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[SERVICE_REQUEST]" Column="ADDRESS_ID" />
</PartitionColumns>
<OrderBy>
<OrderByColumn Ascending="true">
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[SERVICE_REQUEST]" Column="ADDRESS_ID" />
</OrderByColumn>
</OrderBy>
<RelOp AvgRowSize="15" EstimateCPU="11.4427" EstimateIO="241.801" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="598711" LogicalOp="Index Scan" NodeId="14" Parallel="true" PhysicalOp="Index Scan" EstimatedTotalSubtreeCost="1.82505" TableCardinality="83219200">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[SERVICE_REQUEST]" Column="SERVICE_REQUEST_ID" />
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[SERVICE_REQUEST]" Column="ADDRESS_ID" />
</OutputList>
<IndexScan Ordered="true" ScanDirection="FORWARD" ForcedIndex="false" ForceSeek="false" ForceScan="false" NoExpandHint="false" Storage="RowStore">
<DefinedValues>
<DefinedValue>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[SERVICE_REQUEST]" Column="SERVICE_REQUEST_ID" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[SERVICE_REQUEST]" Column="ADDRESS_ID" />
</DefinedValue>
</DefinedValues>
<Object Database="[cmsperformance]" Schema="[dbo]" Table="[SERVICE_REQUEST]" Index="[index_ServiceRequest_AddressId]" IndexKind="NonClustered" />
</IndexScan>
</RelOp>
</Parallelism>
</RelOp>
<RelOp AvgRowSize="11" EstimateCPU="27.4643" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="876355" LogicalOp="Filter" NodeId="15" Parallel="true" PhysicalOp="Filter" EstimatedTotalSubtreeCost="174.014">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</OutputList>
<Filter StartupExpression="false">
<RelOp AvgRowSize="15" EstimateCPU="484.699" EstimateIO="1643.66" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="3293150" LogicalOp="Right Outer Join" NodeId="16" Parallel="true" PhysicalOp="Merge Join" EstimatedTotalSubtreeCost="173.817">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[LEGAL_ENTITY]" Column="LEGAL_ENTITY_ID" />
</OutputList>
<Merge ManyToMany="true">
<InnerSideJoinColumns>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</InnerSideJoinColumns>
<OuterSideJoinColumns>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[LEGAL_ENTITY]" Column="ADDRESS_ID" />
</OuterSideJoinColumns>
<Residual>
<ScalarOperator ScalarString="[cmsperformance].[dbo].[LEGAL_ENTITY].[ADDRESS_ID]=[cmsperformance].[dbo].[ADDRESS].[ADDRESS_ID]">
<Compare CompareOp="EQ">
<ScalarOperator>
<Identifier>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[LEGAL_ENTITY]" Column="ADDRESS_ID" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Identifier>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</Identifier>
</ScalarOperator>
</Compare>
</ScalarOperator>
</Residual>
<RelOp AvgRowSize="15" EstimateCPU="13.7772" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="3317410" LogicalOp="Repartition Streams" NodeId="17" Parallel="true" PhysicalOp="Parallelism" EstimatedTotalSubtreeCost="21.2346">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[LEGAL_ENTITY]" Column="LEGAL_ENTITY_ID" />
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[LEGAL_ENTITY]" Column="ADDRESS_ID" />
</OutputList>
<Parallelism PartitioningType="Hash">
<PartitionColumns>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[LEGAL_ENTITY]" Column="ADDRESS_ID" />
</PartitionColumns>
<OrderBy>
<OrderByColumn Ascending="true">
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[LEGAL_ENTITY]" Column="ADDRESS_ID" />
</OrderByColumn>
</OrderBy>
<RelOp AvgRowSize="15" EstimateCPU="63.4028" EstimateIO="972.724" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="3317410" LogicalOp="Index Scan" NodeId="18" Parallel="true" PhysicalOp="Index Scan" EstimatedTotalSubtreeCost="7.45741" TableCardinality="461111000">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[LEGAL_ENTITY]" Column="LEGAL_ENTITY_ID" />
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[LEGAL_ENTITY]" Column="ADDRESS_ID" />
</OutputList>
<IndexScan Ordered="true" ScanDirection="FORWARD" ForcedIndex="false" ForceSeek="false" ForceScan="false" NoExpandHint="false" Storage="RowStore">
<DefinedValues>
<DefinedValue>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[LEGAL_ENTITY]" Column="LEGAL_ENTITY_ID" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[LEGAL_ENTITY]" Column="ADDRESS_ID" />
</DefinedValue>
</DefinedValues>
<Object Database="[cmsperformance]" Schema="[dbo]" Table="[LEGAL_ENTITY]" Index="[index_LegalEntity_AddressId]" IndexKind="NonClustered" />
</IndexScan>
</RelOp>
</Parallelism>
</RelOp>
<RelOp AvgRowSize="11" EstimateCPU="27.4473" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="3291110" LogicalOp="Filter" NodeId="19" Parallel="true" PhysicalOp="Filter" EstimatedTotalSubtreeCost="131.583">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</OutputList>
<Filter StartupExpression="false">
<RelOp AvgRowSize="15" EstimateCPU="147.912" EstimateIO="1.19491" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="3291110" LogicalOp="Right Outer Join" NodeId="20" Parallel="true" PhysicalOp="Merge Join" EstimatedTotalSubtreeCost="131.386">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[WORK_QUEUE_ITEM]" Column="ADDRESS_ID" />
</OutputList>
<Merge ManyToMany="true">
<InnerSideJoinColumns>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</InnerSideJoinColumns>
<OuterSideJoinColumns>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[WORK_QUEUE_ITEM]" Column="ADDRESS_ID" />
</OuterSideJoinColumns>
<Residual>
<ScalarOperator ScalarString="[cmsperformance].[dbo].[WORK_QUEUE_ITEM].[ADDRESS_ID]=[cmsperformance].[dbo].[ADDRESS].[ADDRESS_ID]">
<Compare CompareOp="EQ">
<ScalarOperator>
<Identifier>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[WORK_QUEUE_ITEM]" Column="ADDRESS_ID" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Identifier>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</Identifier>
</ScalarOperator>
</Compare>
</ScalarOperator>
</Residual>
<RelOp AvgRowSize="11" EstimateCPU="2.42144" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="590911" LogicalOp="Repartition Streams" NodeId="21" Parallel="true" PhysicalOp="Parallelism" EstimatedTotalSubtreeCost="3.64254">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[WORK_QUEUE_ITEM]" Column="ADDRESS_ID" />
</OutputList>
<Parallelism PartitioningType="Hash">
<PartitionColumns>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[WORK_QUEUE_ITEM]" Column="ADDRESS_ID" />
</PartitionColumns>
<OrderBy>
<OrderByColumn Ascending="true">
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[WORK_QUEUE_ITEM]" Column="ADDRESS_ID" />
</OrderByColumn>
</OrderBy>
<RelOp AvgRowSize="11" EstimateCPU="11.2936" EstimateIO="158.002" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="590911" LogicalOp="Index Scan" NodeId="22" Parallel="true" PhysicalOp="Index Scan" EstimatedTotalSubtreeCost="1.2211" TableCardinality="82135100">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[WORK_QUEUE_ITEM]" Column="ADDRESS_ID" />
</OutputList>
<IndexScan Ordered="true" ScanDirection="FORWARD" ForcedIndex="false" ForceSeek="false" ForceScan="false" NoExpandHint="false" Storage="RowStore">
<DefinedValues>
<DefinedValue>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[WORK_QUEUE_ITEM]" Column="ADDRESS_ID" />
</DefinedValue>
</DefinedValues>
<Object Database="[cmsperformance]" Schema="[dbo]" Table="[WORK_QUEUE_ITEM]" Index="[idx_address]" IndexKind="NonClustered" />
</IndexScan>
</RelOp>
</Parallelism>
</RelOp>
<RelOp AvgRowSize="11" EstimateCPU="27.4473" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="3291110" LogicalOp="Filter" NodeId="23" Parallel="true" PhysicalOp="Filter" EstimatedTotalSubtreeCost="120.987">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</OutputList>
<Filter StartupExpression="false">
<RelOp AvgRowSize="15" EstimateCPU="126.569" EstimateIO="0.218633" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="3291110" LogicalOp="Right Outer Join" NodeId="24" Parallel="true" PhysicalOp="Merge Join" EstimatedTotalSubtreeCost="120.789">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[PACKET]" Column="PACKET_ID" />
</OutputList>
<Merge ManyToMany="true">
<InnerSideJoinColumns>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</InnerSideJoinColumns>
<OuterSideJoinColumns>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[PACKET]" Column="ADDRESS_ID" />
</OuterSideJoinColumns>
<Residual>
<ScalarOperator ScalarString="[cmsperformance].[dbo].[PACKET].[ADDRESS_ID]=[cmsperformance].[dbo].[ADDRESS].[ADDRESS_ID]">
<Compare CompareOp="EQ">
<ScalarOperator>
<Identifier>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[PACKET]" Column="ADDRESS_ID" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Identifier>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</Identifier>
</ScalarOperator>
</Compare>
</ScalarOperator>
</Residual>
<RelOp AvgRowSize="15" EstimateCPU="0.0970953" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="16544.4" LogicalOp="Repartition Streams" NodeId="25" Parallel="true" PhysicalOp="Parallelism" EstimatedTotalSubtreeCost="0.140094">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[PACKET]" Column="PACKET_ID" />
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[PACKET]" Column="ADDRESS_ID" />
</OutputList>
<Parallelism PartitioningType="Hash">
<PartitionColumns>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[PACKET]" Column="ADDRESS_ID" />
</PartitionColumns>
<OrderBy>
<OrderByColumn Ascending="true">
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[PACKET]" Column="ADDRESS_ID" />
</OrderByColumn>
</OrderBy>
<RelOp AvgRowSize="15" EstimateCPU="0.316217" EstimateIO="5.22683" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="16544.4" LogicalOp="Index Scan" NodeId="26" Parallel="true" PhysicalOp="Index Scan" EstimatedTotalSubtreeCost="0.0429986" TableCardinality="2299620">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[PACKET]" Column="PACKET_ID" />
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[PACKET]" Column="ADDRESS_ID" />
</OutputList>
<IndexScan Ordered="true" ScanDirection="FORWARD" ForcedIndex="false" ForceSeek="false" ForceScan="false" NoExpandHint="false" Storage="RowStore">
<DefinedValues>
<DefinedValue>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[PACKET]" Column="PACKET_ID" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[PACKET]" Column="ADDRESS_ID" />
</DefinedValue>
</DefinedValues>
<Object Database="[cmsperformance]" Schema="[dbo]" Table="[PACKET]" Index="[idx_address]" IndexKind="NonClustered" />
</IndexScan>
</RelOp>
</Parallelism>
</RelOp>
<RelOp AvgRowSize="11" EstimateCPU="27.4473" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="3291110" LogicalOp="Filter" NodeId="27" Parallel="true" PhysicalOp="Filter" EstimatedTotalSubtreeCost="114.054">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</OutputList>
<Filter StartupExpression="false">
<RelOp AvgRowSize="15" EstimateCPU="126.308" EstimateIO="1.38245" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="3291110" LogicalOp="Right Outer Join" NodeId="28" Parallel="true" PhysicalOp="Merge Join" EstimatedTotalSubtreeCost="113.856">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[DIRECT_LENDING_SERVICE]" Column="DIRECT_LENDING_SERVICE_ID" />
</OutputList>
<Merge ManyToMany="true">
<InnerSideJoinColumns>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</InnerSideJoinColumns>
<OuterSideJoinColumns>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[DIRECT_LENDING_SERVICE]" Column="PREV_LIENHOLDER_MAIL_TO_ADDRESS_ID" />
</OuterSideJoinColumns>
<Residual>
<ScalarOperator ScalarString="[cmsperformance].[dbo].[DIRECT_LENDING_SERVICE].[PREV_LIENHOLDER_MAIL_TO_ADDRESS_ID]=[cmsperformance].[dbo].[ADDRESS].[ADDRESS_ID]">
<Compare CompareOp="EQ">
<ScalarOperator>
<Identifier>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[DIRECT_LENDING_SERVICE]" Column="PREV_LIENHOLDER_MAIL_TO_ADDRESS_ID" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Identifier>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</Identifier>
</ScalarOperator>
</Compare>
</ScalarOperator>
</Residual>
<RelOp AvgRowSize="15" EstimateCPU="0.0490204" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="4944.41" LogicalOp="Repartition Streams" NodeId="29" Parallel="true" PhysicalOp="Parallelism" EstimatedTotalSubtreeCost="0.0624888">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[DIRECT_LENDING_SERVICE]" Column="DIRECT_LENDING_SERVICE_ID" />
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[DIRECT_LENDING_SERVICE]" Column="PREV_LIENHOLDER_MAIL_TO_ADDRESS_ID" />
</OutputList>
<Parallelism PartitioningType="Hash">
<PartitionColumns>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[DIRECT_LENDING_SERVICE]" Column="PREV_LIENHOLDER_MAIL_TO_ADDRESS_ID" />
</PartitionColumns>
<OrderBy>
<OrderByColumn Ascending="true">
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[DIRECT_LENDING_SERVICE]" Column="PREV_LIENHOLDER_MAIL_TO_ADDRESS_ID" />
</OrderByColumn>
</OrderBy>
<RelOp AvgRowSize="15" EstimateCPU="0.0945177" EstimateIO="1.34387" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="4944.41" LogicalOp="Index Scan" NodeId="30" Parallel="true" PhysicalOp="Index Scan" EstimatedTotalSubtreeCost="0.0134684" TableCardinality="687259">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[DIRECT_LENDING_SERVICE]" Column="DIRECT_LENDING_SERVICE_ID" />
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[DIRECT_LENDING_SERVICE]" Column="PREV_LIENHOLDER_MAIL_TO_ADDRESS_ID" />
</OutputList>
<IndexScan Ordered="true" ScanDirection="FORWARD" ForcedIndex="false" ForceSeek="false" ForceScan="false" NoExpandHint="false" Storage="RowStore">
<DefinedValues>
<DefinedValue>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[DIRECT_LENDING_SERVICE]" Column="DIRECT_LENDING_SERVICE_ID" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[DIRECT_LENDING_SERVICE]" Column="PREV_LIENHOLDER_MAIL_TO_ADDRESS_ID" />
</DefinedValue>
</DefinedValues>
<Object Database="[cmsperformance]" Schema="[dbo]" Table="[DIRECT_LENDING_SERVICE]" Index="[idx_PREV_LIENHOLDER_MAIL_TO_ADDRESS]" IndexKind="NonClustered" />
</IndexScan>
</RelOp>
</Parallelism>
</RelOp>
<RelOp AvgRowSize="11" EstimateCPU="27.4473" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="3291110" LogicalOp="Filter" NodeId="31" Parallel="true" PhysicalOp="Filter" EstimatedTotalSubtreeCost="107.192">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</OutputList>
<Filter StartupExpression="false">
<RelOp AvgRowSize="15" EstimateCPU="0.0285332" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="3291110" LogicalOp="Repartition Streams" NodeId="32" Parallel="true" PhysicalOp="Parallelism" EstimatedTotalSubtreeCost="106.994">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[CHECK_REQUEST_DEFAULT_ADDRESS]" Column="CHECK_REQUEST_DEFAULT_ADDRESS_ID" />
</OutputList>
<Parallelism PartitioningType="Hash">
<PartitionColumns>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</PartitionColumns>
<OrderBy>
<OrderByColumn Ascending="true">
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</OrderByColumn>
</OrderBy>
<RelOp AvgRowSize="15" EstimateCPU="125.933" EstimateIO="0.0334788" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="3291110" LogicalOp="Right Outer Join" NodeId="33" Parallel="true" PhysicalOp="Merge Join" EstimatedTotalSubtreeCost="106.966">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[CHECK_REQUEST_DEFAULT_ADDRESS]" Column="CHECK_REQUEST_DEFAULT_ADDRESS_ID" />
</OutputList>
<Merge ManyToMany="true">
<InnerSideJoinColumns>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</InnerSideJoinColumns>
<OuterSideJoinColumns>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[CHECK_REQUEST_DEFAULT_ADDRESS]" Column="ADDRESS_ID" />
</OuterSideJoinColumns>
<Residual>
<ScalarOperator ScalarString="[cmsperformance].[dbo].[CHECK_REQUEST_DEFAULT_ADDRESS].[ADDRESS_ID]=[cmsperformance].[dbo].[ADDRESS].[ADDRESS_ID]">
<Compare CompareOp="EQ">
<ScalarOperator>
<Identifier>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[CHECK_REQUEST_DEFAULT_ADDRESS]" Column="ADDRESS_ID" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Identifier>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</Identifier>
</ScalarOperator>
</Compare>
</ScalarOperator>
</Residual>
<RelOp AvgRowSize="15" EstimateCPU="0.0287329" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="49.2528" LogicalOp="Repartition Streams" NodeId="34" Parallel="true" PhysicalOp="Parallelism" EstimatedTotalSubtreeCost="0.0320096">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[CHECK_REQUEST_DEFAULT_ADDRESS]" Column="CHECK_REQUEST_DEFAULT_ADDRESS_ID" />
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[CHECK_REQUEST_DEFAULT_ADDRESS]" Column="ADDRESS_ID" />
</OutputList>
<Parallelism PartitioningType="Hash">
<PartitionColumns>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[CHECK_REQUEST_DEFAULT_ADDRESS]" Column="ADDRESS_ID" />
</PartitionColumns>
<OrderBy>
<OrderByColumn Ascending="true">
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[CHECK_REQUEST_DEFAULT_ADDRESS]" Column="ADDRESS_ID" />
</OrderByColumn>
</OrderBy>
<RelOp AvgRowSize="15" EstimateCPU="0.00096095" EstimateIO="0.0209028" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="49.2528" LogicalOp="Index Scan" NodeId="35" Parallel="true" PhysicalOp="Index Scan" EstimatedTotalSubtreeCost="0.00327672" TableCardinality="6846">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[CHECK_REQUEST_DEFAULT_ADDRESS]" Column="CHECK_REQUEST_DEFAULT_ADDRESS_ID" />
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[CHECK_REQUEST_DEFAULT_ADDRESS]" Column="ADDRESS_ID" />
</OutputList>
<IndexScan Ordered="true" ScanDirection="FORWARD" ForcedIndex="false" ForceSeek="false" ForceScan="false" NoExpandHint="false" Storage="RowStore">
<DefinedValues>
<DefinedValue>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[CHECK_REQUEST_DEFAULT_ADDRESS]" Column="CHECK_REQUEST_DEFAULT_ADDRESS_ID" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[CHECK_REQUEST_DEFAULT_ADDRESS]" Column="ADDRESS_ID" />
</DefinedValue>
</DefinedValues>
<Object Database="[cmsperformance]" Schema="[dbo]" Table="[CHECK_REQUEST_DEFAULT_ADDRESS]" Index="[idx_address]" IndexKind="NonClustered" />
</IndexScan>
</RelOp>
</Parallelism>
</RelOp>
<RelOp AvgRowSize="11" EstimateCPU="27.4473" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="3291110" LogicalOp="Filter" NodeId="36" Parallel="true" PhysicalOp="Filter" EstimatedTotalSubtreeCost="100.344">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</OutputList>
<Filter StartupExpression="false">
<RelOp AvgRowSize="15" EstimateCPU="125.992" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="3291110" LogicalOp="Left Outer Join" NodeId="37" Parallel="true" PhysicalOp="Merge Join" EstimatedTotalSubtreeCost="100.147">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI3]" Column="EARLY_PAYOFF_INFO_ID" />
</OutputList>
<Merge ManyToMany="false">
<InnerSideJoinColumns>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI3]" Column="ADDRESS_ID2" />
</InnerSideJoinColumns>
<OuterSideJoinColumns>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</OuterSideJoinColumns>
<Residual>
<ScalarOperator ScalarString="[cmsperformance].[dbo].[EARLY_PAYOFF_INFO].[ADDRESS_ID2] as [EPI3].[ADDRESS_ID2]=[cmsperformance].[dbo].[ADDRESS].[ADDRESS_ID]">
<Compare CompareOp="EQ">
<ScalarOperator>
<Identifier>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI3]" Column="ADDRESS_ID2" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Identifier>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</Identifier>
</ScalarOperator>
</Compare>
</ScalarOperator>
</Residual>
<RelOp AvgRowSize="11" EstimateCPU="27.4473" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="3291110" LogicalOp="Filter" NodeId="38" Parallel="true" PhysicalOp="Filter" EstimatedTotalSubtreeCost="93.5016">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</OutputList>
<Filter StartupExpression="false">
<RelOp AvgRowSize="15" EstimateCPU="125.992" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="3291110" LogicalOp="Left Outer Join" NodeId="39" Parallel="true" PhysicalOp="Merge Join" EstimatedTotalSubtreeCost="93.3041">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI2]" Column="EARLY_PAYOFF_INFO_ID" />
</OutputList>
<Merge ManyToMany="false">
<InnerSideJoinColumns>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI2]" Column="ADDRESS_ID1" />
</InnerSideJoinColumns>
<OuterSideJoinColumns>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</OuterSideJoinColumns>
<Residual>
<ScalarOperator ScalarString="[cmsperformance].[dbo].[EARLY_PAYOFF_INFO].[ADDRESS_ID1] as [EPI2].[ADDRESS_ID1]=[cmsperformance].[dbo].[ADDRESS].[ADDRESS_ID]">
<Compare CompareOp="EQ">
<ScalarOperator>
<Identifier>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI2]" Column="ADDRESS_ID1" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Identifier>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</Identifier>
</ScalarOperator>
</Compare>
</ScalarOperator>
</Residual>
<RelOp AvgRowSize="11" EstimateCPU="27.4473" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="3291110" LogicalOp="Filter" NodeId="40" Parallel="true" PhysicalOp="Filter" EstimatedTotalSubtreeCost="70.9941">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</OutputList>
<Filter StartupExpression="false">
<RelOp AvgRowSize="15" EstimateCPU="125.992" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="3291110" LogicalOp="Left Outer Join" NodeId="41" Parallel="true" PhysicalOp="Merge Join" EstimatedTotalSubtreeCost="70.7967">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI1]" Column="EARLY_PAYOFF_INFO_ID" />
</OutputList>
<Merge ManyToMany="false">
<InnerSideJoinColumns>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI1]" Column="ADDRESS_ID" />
</InnerSideJoinColumns>
<OuterSideJoinColumns>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</OuterSideJoinColumns>
<Residual>
<ScalarOperator ScalarString="[cmsperformance].[dbo].[EARLY_PAYOFF_INFO].[ADDRESS_ID] as [EPI1].[ADDRESS_ID]=[cmsperformance].[dbo].[ADDRESS].[ADDRESS_ID]">
<Compare CompareOp="EQ">
<ScalarOperator>
<Identifier>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI1]" Column="ADDRESS_ID" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Identifier>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</Identifier>
</ScalarOperator>
</Compare>
</ScalarOperator>
</Residual>
<RelOp AvgRowSize="11" EstimateCPU="13.356" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="3291110" LogicalOp="Repartition Streams" NodeId="42" Parallel="true" PhysicalOp="Parallelism" EstimatedTotalSubtreeCost="48.4867">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</OutputList>
<Parallelism PartitioningType="Hash">
<PartitionColumns>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</PartitionColumns>
<OrderBy>
<OrderByColumn Ascending="true">
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</OrderByColumn>
</OrderBy>
<RelOp AvgRowSize="11" EstimateCPU="62.9001" EstimateIO="4819.74" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="3291110" LogicalOp="Clustered Index Scan" NodeId="43" Parallel="true" PhysicalOp="Clustered Index Scan" EstimatedTotalSubtreeCost="35.1307" TableCardinality="457455000">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</OutputList>
<IndexScan Ordered="true" ScanDirection="FORWARD" ForcedIndex="false" ForceSeek="false" ForceScan="false" NoExpandHint="false" Storage="RowStore">
<DefinedValues>
<DefinedValue>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Column="ADDRESS_ID" />
</DefinedValue>
</DefinedValues>
<Object Database="[cmsperformance]" Schema="[dbo]" Table="[ADDRESS]" Index="[ADDRESS_PK]" TableReferenceId="2" IndexKind="Clustered" />
</IndexScan>
</RelOp>
</Parallelism>
</RelOp>
<RelOp AvgRowSize="15" EstimateCPU="8.12372" EstimateIO="0.00140766" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="5231.39" LogicalOp="Sort" NodeId="44" Parallel="true" PhysicalOp="Sort" EstimatedTotalSubtreeCost="15.7258">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI1]" Column="EARLY_PAYOFF_INFO_ID" />
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI1]" Column="ADDRESS_ID" />
</OutputList>
<MemoryFractions Input="0.5" Output="0.5" />
<Sort Distinct="false">
<OrderBy>
<OrderByColumn Ascending="true">
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI1]" Column="ADDRESS_ID" />
</OrderByColumn>
</OrderBy>
<RelOp AvgRowSize="15" EstimateCPU="0.315292" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="727149" LogicalOp="Repartition Streams" NodeId="45" Parallel="true" PhysicalOp="Parallelism" EstimatedTotalSubtreeCost="7.60064">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI1]" Column="EARLY_PAYOFF_INFO_ID" />
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI1]" Column="ADDRESS_ID" />
</OutputList>
<Parallelism PartitioningType="Hash">
<PartitionColumns>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI1]" Column="ADDRESS_ID" />
</PartitionColumns>
<RelOp AvgRowSize="15" EstimateCPU="0.100003" EstimateIO="7.18535" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="727149" LogicalOp="Clustered Index Scan" NodeId="46" Parallel="true" PhysicalOp="Clustered Index Scan" EstimatedTotalSubtreeCost="7.28535" TableCardinality="727149">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI1]" Column="EARLY_PAYOFF_INFO_ID" />
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI1]" Column="ADDRESS_ID" />
</OutputList>
<IndexScan Ordered="false" ForcedIndex="false" ForceScan="false" NoExpandHint="false">
<DefinedValues>
<DefinedValue>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI1]" Column="EARLY_PAYOFF_INFO_ID" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI1]" Column="ADDRESS_ID" />
</DefinedValue>
</DefinedValues>
<Object Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Index="[EARLY_PAYOFF_INFO_PK]" Alias="[EPI1]" IndexKind="Clustered" />
</IndexScan>
</RelOp>
</Parallelism>
</RelOp>
</Sort>
</RelOp>
</Merge>
</RelOp>
<Predicate>
<ScalarOperator ScalarString="[cmsperformance].[dbo].[EARLY_PAYOFF_INFO].[EARLY_PAYOFF_INFO_ID] as [EPI1].[EARLY_PAYOFF_INFO_ID] IS NULL">
<Compare CompareOp="IS">
<ScalarOperator>
<Identifier>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI1]" Column="EARLY_PAYOFF_INFO_ID" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Const ConstValue="NULL" />
</ScalarOperator>
</Compare>
</ScalarOperator>
</Predicate>
</Filter>
</RelOp>
<RelOp AvgRowSize="15" EstimateCPU="8.12372" EstimateIO="0.00140766" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="5231.39" LogicalOp="Sort" NodeId="49" Parallel="true" PhysicalOp="Sort" EstimatedTotalSubtreeCost="15.7258">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI2]" Column="EARLY_PAYOFF_INFO_ID" />
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI2]" Column="ADDRESS_ID1" />
</OutputList>
<MemoryFractions Input="0.5" Output="0.5" />
<Sort Distinct="false">
<OrderBy>
<OrderByColumn Ascending="true">
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI2]" Column="ADDRESS_ID1" />
</OrderByColumn>
</OrderBy>
<RelOp AvgRowSize="15" EstimateCPU="0.315292" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="727149" LogicalOp="Repartition Streams" NodeId="50" Parallel="true" PhysicalOp="Parallelism" EstimatedTotalSubtreeCost="7.60064">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI2]" Column="EARLY_PAYOFF_INFO_ID" />
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI2]" Column="ADDRESS_ID1" />
</OutputList>
<Parallelism PartitioningType="Hash">
<PartitionColumns>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI2]" Column="ADDRESS_ID1" />
</PartitionColumns>
<RelOp AvgRowSize="15" EstimateCPU="0.100003" EstimateIO="7.18535" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="727149" LogicalOp="Clustered Index Scan" NodeId="51" Parallel="true" PhysicalOp="Clustered Index Scan" EstimatedTotalSubtreeCost="7.28535" TableCardinality="727149">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI2]" Column="EARLY_PAYOFF_INFO_ID" />
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI2]" Column="ADDRESS_ID1" />
</OutputList>
<IndexScan Ordered="false" ForcedIndex="false" ForceScan="false" NoExpandHint="false">
<DefinedValues>
<DefinedValue>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI2]" Column="EARLY_PAYOFF_INFO_ID" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI2]" Column="ADDRESS_ID1" />
</DefinedValue>
</DefinedValues>
<Object Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Index="[EARLY_PAYOFF_INFO_PK]" Alias="[EPI2]" IndexKind="Clustered" />
</IndexScan>
</RelOp>
</Parallelism>
</RelOp>
</Sort>
</RelOp>
</Merge>
</RelOp>
<Predicate>
<ScalarOperator ScalarString="[cmsperformance].[dbo].[EARLY_PAYOFF_INFO].[EARLY_PAYOFF_INFO_ID] as [EPI2].[EARLY_PAYOFF_INFO_ID] IS NULL">
<Compare CompareOp="IS">
<ScalarOperator>
<Identifier>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI2]" Column="EARLY_PAYOFF_INFO_ID" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Const ConstValue="NULL" />
</ScalarOperator>
</Compare>
</ScalarOperator>
</Predicate>
</Filter>
</RelOp>
<RelOp AvgRowSize="15" EstimateCPU="0.0502098" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="5231.39" LogicalOp="Repartition Streams" NodeId="54" Parallel="true" PhysicalOp="Parallelism" EstimatedTotalSubtreeCost="0.0607766">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI3]" Column="EARLY_PAYOFF_INFO_ID" />
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI3]" Column="ADDRESS_ID2" />
</OutputList>
<Parallelism PartitioningType="Hash">
<PartitionColumns>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI3]" Column="ADDRESS_ID2" />
</PartitionColumns>
<OrderBy>
<OrderByColumn Ascending="true">
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI3]" Column="ADDRESS_ID2" />
</OrderByColumn>
</OrderBy>
<RelOp AvgRowSize="15" EstimateCPU="0.100003" EstimateIO="0.934977" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="5231.39" LogicalOp="Index Scan" NodeId="55" Parallel="true" PhysicalOp="Index Scan" EstimatedTotalSubtreeCost="0.0105668" TableCardinality="727149">
<OutputList>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI3]" Column="EARLY_PAYOFF_INFO_ID" />
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI3]" Column="ADDRESS_ID2" />
</OutputList>
<IndexScan Ordered="true" ScanDirection="FORWARD" ForcedIndex="false" ForceSeek="false" ForceScan="false" NoExpandHint="false" Storage="RowStore">
<DefinedValues>
<DefinedValue>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI3]" Column="EARLY_PAYOFF_INFO_ID" />
</DefinedValue>
<DefinedValue>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI3]" Column="ADDRESS_ID2" />
</DefinedValue>
</DefinedValues>
<Object Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Index="[index_Early_Payoff_Info_Address_Id2]" Alias="[EPI3]" IndexKind="NonClustered" />
</IndexScan>
</RelOp>
</Parallelism>
</RelOp>
</Merge>
</RelOp>
<Predicate>
<ScalarOperator ScalarString="[cmsperformance].[dbo].[EARLY_PAYOFF_INFO].[EARLY_PAYOFF_INFO_ID] as [EPI3].[EARLY_PAYOFF_INFO_ID] IS NULL">
<Compare CompareOp="IS">
<ScalarOperator>
<Identifier>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[EARLY_PAYOFF_INFO]" Alias="[EPI3]" Column="EARLY_PAYOFF_INFO_ID" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Const ConstValue="NULL" />
</ScalarOperator>
</Compare>
</ScalarOperator>
</Predicate>
</Filter>
</RelOp>
</Merge>
</RelOp>
</Parallelism>
</RelOp>
<Predicate>
<ScalarOperator ScalarString="[cmsperformance].[dbo].[CHECK_REQUEST_DEFAULT_ADDRESS].[CHECK_REQUEST_DEFAULT_ADDRESS_ID] IS NULL">
<Compare CompareOp="IS">
<ScalarOperator>
<Identifier>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[CHECK_REQUEST_DEFAULT_ADDRESS]" Column="CHECK_REQUEST_DEFAULT_ADDRESS_ID" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Const ConstValue="NULL" />
</ScalarOperator>
</Compare>
</ScalarOperator>
</Predicate>
</Filter>
</RelOp>
</Merge>
</RelOp>
<Predicate>
<ScalarOperator ScalarString="[cmsperformance].[dbo].[DIRECT_LENDING_SERVICE].[DIRECT_LENDING_SERVICE_ID] IS NULL">
<Compare CompareOp="IS">
<ScalarOperator>
<Identifier>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[DIRECT_LENDING_SERVICE]" Column="DIRECT_LENDING_SERVICE_ID" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Const ConstValue="NULL" />
</ScalarOperator>
</Compare>
</ScalarOperator>
</Predicate>
</Filter>
</RelOp>
</Merge>
</RelOp>
<Predicate>
<ScalarOperator ScalarString="[cmsperformance].[dbo].[PACKET].[PACKET_ID] IS NULL">
<Compare CompareOp="IS">
<ScalarOperator>
<Identifier>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[PACKET]" Column="PACKET_ID" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Const ConstValue="NULL" />
</ScalarOperator>
</Compare>
</ScalarOperator>
</Predicate>
</Filter>
</RelOp>
</Merge>
</RelOp>
<Predicate>
<ScalarOperator ScalarString="[cmsperformance].[dbo].[WORK_QUEUE_ITEM].[ADDRESS_ID] IS NULL">
<Compare CompareOp="IS">
<ScalarOperator>
<Identifier>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[WORK_QUEUE_ITEM]" Column="ADDRESS_ID" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Const ConstValue="NULL" />
</ScalarOperator>
</Compare>
</ScalarOperator>
</Predicate>
</Filter>
</RelOp>
</Merge>
</RelOp>
<Predicate>
<ScalarOperator ScalarString="[cmsperformance].[dbo].[LEGAL_ENTITY].[LEGAL_ENTITY_ID] IS NULL">
<Compare CompareOp="IS">
<ScalarOperator>
<Identifier>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[LEGAL_ENTITY]" Column="LEGAL_ENTITY_ID" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Const ConstValue="NULL" />
</ScalarOperator>
</Compare>
</ScalarOperator>
</Predicate>
</Filter>
</RelOp>
</Merge>
</RelOp>
<Predicate>
<ScalarOperator ScalarString="[cmsperformance].[dbo].[SERVICE_REQUEST].[SERVICE_REQUEST_ID] IS NULL">
<Compare CompareOp="IS">
<ScalarOperator>
<Identifier>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[SERVICE_REQUEST]" Column="SERVICE_REQUEST_ID" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Const ConstValue="NULL" />
</ScalarOperator>
</Compare>
</ScalarOperator>
</Predicate>
</Filter>
</RelOp>
</Merge>
</RelOp>
<Predicate>
<ScalarOperator ScalarString="[cmsperformance].[dbo].[LIENHOLDER].[ADDRESS_ID] IS NULL">
<Compare CompareOp="IS">
<ScalarOperator>
<Identifier>
<ColumnReference Database="[cmsperformance]" Schema="[dbo]" Table="[LIENHOLDER]" Column="ADDRESS_ID" />
</Identifier>
</ScalarOperator>
<ScalarOperator>
<Const ConstValue="NULL" />
</ScalarOperator>
</Compare>
</ScalarOperator>
</Predicate>
</Filter>
</RelOp>
</StreamAggregate>
</RelOp>
</Parallelism>
</RelOp>
</Merge>
</RelOp>
</Parallelism>
</RelOp>
</Top>
</RelOp>
</QueryPlan>
</StmtSimple>
</Statements>
</Batch>
</BatchSequence>
</ShowPlanXML>
February 13, 2016 at 5:21 pm
We used to run these purge jobs on various tables on Sundays, deleting 50k records at a whack. Since our application tends to run 24/7 to one degree or another, this caused blocking. So the latest effort was to identify a chunk of "deltable" records ( into a temp table ), then run a while loop deleting one at a time during the business days. Nights are full of other batch and index maintenance jobs.
I didn't see any downsides to the one at a time deleting. However our operations group reported slowness and timeouts in their application ( there is no sql timeout setting ). Free'ing related plans from cache seemed to help, until the next day.
For now Management has asked that the purge jobs all be disabled. The cache thing made me wonder if deletions were screwing with statistics, but we weren't actually deleting in any of the tables those slow queries use.
February 13, 2016 at 6:49 pm
This query form produces a slightly (6% better) cheaper plan than the one you posted (and the query is a bit easier to understand in my opinion) but a cheaper plan does not always mean it will perform better. Can you give it a go and post the resulting actual execution plan?
SELECT TOP (20000) ADDRESS_ID
FROM dbo.ADDRESS
WHERE NOT EXISTS (SELECT * FROM EARLY_PAYOFF_INFO EPI1 WHERE EPI1.ADDRESS_ID = ADDRESS.ADDRESS_ID)
AND NOT EXISTS (SELECT * FROM EARLY_PAYOFF_INFO EPI2 WHERE EPI2.ADDRESS_ID1 = ADDRESS.ADDRESS_ID)
AND NOT EXISTS (SELECT * FROM EARLY_PAYOFF_INFO EPI3 WHERE EPI3.ADDRESS_ID2 = ADDRESS.ADDRESS_ID)
AND NOT EXISTS (SELECT * FROM CHECK_REQUEST_DEFAULT_ADDRESS WHERE CHECK_REQUEST_DEFAULT_ADDRESS.ADDRESS_ID = ADDRESS.ADDRESS_ID)
AND NOT EXISTS (SELECT * FROM DIRECT_LENDING_SERVICE WHERE DIRECT_LENDING_SERVICE.PREV_LIENHOLDER_MAIL_TO_ADDRESS_ID = ADDRESS.ADDRESS_ID)
AND NOT EXISTS (SELECT * FROM PACKET WHERE PACKET.ADDRESS_ID = ADDRESS.ADDRESS_ID)
AND NOT EXISTS (SELECT * FROM WORK_QUEUE_ITEM WHERE WORK_QUEUE_ITEM.ADDRESS_ID = ADDRESS.ADDRESS_ID)
AND NOT EXISTS (SELECT * FROM LEGAL_ENTITY WHERE LEGAL_ENTITY.ADDRESS_ID = ADDRESS.ADDRESS_ID)
AND NOT EXISTS (SELECT * FROM SERVICE_REQUEST WHERE SERVICE_REQUEST.ADDRESS_ID = ADDRESS.ADDRESS_ID)
AND NOT EXISTS (SELECT * FROM LIENHOLDER WHERE LIENHOLDER.ADDRESS_ID = ADDRESS.ADDRESS_ID)
ORDER BY ADDRESS_ID;
There are no special teachers of virtue, because virtue is taught by the whole community.
--Plato
February 13, 2016 at 6:54 pm
Indianrock (2/13/2016)
Here's the sql plan...(moved to attachment)
There are no special teachers of virtue, because virtue is taught by the whole community.
--Plato
February 13, 2016 at 8:32 pm
Yes thanks, I added those 3 indexes in one QA environment but the initial select of 20k records into a temp table still ran over an hour before I killed it I'll get into your other query suggestions tomorrow.
Tonight was installing Sql 2012 sp2 in production 🙂
February 14, 2016 at 4:33 am
Here are my thougts, based on the query, the execution plan you posted, and the comments. I have not looked at the CREATE TABLE / CREATE INDEX script; it is too long to analyze within the maximum time I can justify spending on unpaid work.
First: The plan shows that all tables you used are read completely. All except two are read using an index on Address_ID, that matches both the ORDER BY order and the join column used for all joins, which enables SQL Server to use the relatively cheap Merge Join operator. The only exceptions are two of the three Early_Payoff_Info tables. Apparently there is an index on Address_ID2 in this table, but not on Address_ID and Address_ID1, so here SQL Server has to read the clustered index and sort the data, It's just two sorts of just 727K rows each, so it will not have a very big impact, but you probably will gain performance by indexing those two columns. (Orlando posted this already, allthough he also includes an index on the Address_ID2 column - that one is not needed, you already have that index).
Second: About half of the Merge Join operators have the Many-to-many property set to true, which means that SQL Server has to do additional overhead. This is not fully in your control. SQL Server decides to join the tables in a certain order, and at one point it joins tables that both allow duplicates in the Address_ID column that you are joining on. I suspect that if you try the much simpler query Orlando posted, this might change. I definitely know that if you have any tables where you know that no duplicates can occur in Address_ID but you do not have the constraint to prove it, you should. If you can add UNIQUE constraints to some of the tables used, you will probably gain performance for this query. (But note that adding those UNIQUE constraints will automatically add indexes as well, and these indexes probably overlap with your existing indexes - so do not forget to clean up the now redundant indexes).
Third: I expect the plan shape to be the same as when you would remove the TOP operator. Because almost all operators are streaming, execution will still stop as soon as you hit the 20,000th row - but it is very hard to predict how many rows have been evaluated, processed, and discarded as not meeting the criteria before you get there. From the context I gather that you are running this in a loop: get 20,000 IDs to delete, delete them, then get the next batch of 20,000. But because the order is the same every time, it will scan and skip the same AddressID values every execution. (Example: the first iteration has to process 100,000 AddressID values before it has 20,000 AddressID's to delete, because 80,000 of the first 100,000 are still valid. The second iteration will start at the beginning again, so it will first encouter the 80,000 it already skipped the first time, before it starts looking at new values - and if the ratio is the same, it will now have to read another 100,000 for a total of 180,000 before it found 20,000 to delete. Then the third iterarion will have to process 260,000, etc). My first performance idea below tries to speed up things by not reading the same rows over and over again.
Fourth: You write somewhere that deletes go faster when they are done in order and that that's the reason for the ORDER BY in your query. But the query only loads into a temporary table. You can always load the table first, then build a clustered index on it (imposing an order), and then do the delete.
Also, in cases where an ordered delete is indeed faster, the query optimizer will usually include a Sort operator in the plan. Pre-sorting allows the optimizer to omit the cost of that operator, but that's not a real ssaving - yoou merely moved the location where you took the hit, to either the INSERT (in your case - allthough in this case it may not have mattered), or to the CREATE INDEX.
Based on these observations, I have two alternative ideas for you. But before even starting on them, you should definitely create the two extra indexes on Early_Payoff (as suggested by Orlando), and change the query to the much simpler WHERE NOT EXISTS ... AND NOT EXISTS ... syntax (as also suggested by Orlando), then request an Estimated Execution Plan and verify that (a) all scan operators are now (NonClustered) Index Scans, except for the Clustered Index Scan on the Address table itself, and the two Sort operators are gone; and that (b) all join operators are still Merge Join, and they now all have the Many-to-Many property set to False (check by hovering over the operator until the properties popup appears, or by right-clikcing the operator and selecting Properties).
Suggestion 1:
Instead of batching by using TOP, batch the purge by AddressID ranges. How big the ranges should be is up to you, because I don't know how big a range should be to get acceptable purge sizes. But the rough layout of the code, based on a range size of 100,000 rows, will be as below. (And note that if you change the range size, you have to change it in three places)
DECLARE @RangeStart int = 1,
@RangeEnd int = 100000,
@MaxAddressID int = (SELECT MAX(Address_ID) FROM dbo.Address);
WHILE @RangeStart < @MaxAddressID
BEGIN;
INSERT INTO #YourTempTable
SELECT Address_ID
FROM dbo.Address
WHERE Address_ID BETWEEN @RangeStart AND @RangeEnd
AND NOT EXISTS
(SELECT *
FROM dbo.Early_Payoff_Info AS EPI1
WHERE EPI1.Address_ID = Address.ADDRESS_ID
-- AND EPI1.Address_ID BETWEEN @RangeStart AND @RangeEnd
)
AND NOT EXISTS
(SELECT *
FROM dbo.Early_Payoff_Info AS EPI2
WHERE EPI2.Address_ID1 = Address.ADDRESS_ID
-- AND EPI2.Address_ID1 BETWEEN @RangeStart AND @RangeEnd
)
(...)
ORDER BY ADDRESS_ID;
-- Do the actual purge here, then truncate the temporary table for the next iteration
SET @RangeStart += 100000;
SET @RangeEnd += 100000;
END;
I have commented out the repeated BETWEEN check in the subqueries. I expect that the query optimizer will not need this, but do double check: request an estimated execution plan. You should now have (NonClustered) Index Seek operators for all those tables, and the properties of the Seek operator should include a Seek Predicates property that restricts the operation to the current range. If that is not the case, then uncomment all those extra BETWEEN lines.
An additional benefit of this approach is that you can set it to do a different range in every maintenance window. So if you find that you can do 15 iterations during the window, set it up to run from 1 to 1,500,000 on the first day, from 1,500,001 to 3,000,000 the next, and so on - and then cycle back to the beginning.
Suggestion 2:
I personally think that suggestion 1 is the best. But if that does not work, or if you cannot use it for some reason, then herer is another thing to try.
Remove the ORDER BY, and reduce the number given to TOP. Once you lower it sufficiently, the estimated execution plan should (hopefully) switch from using scans and merge joins, to using seeks and nested loops operators for the joins. Note that this is not guaranteed to work - if SQL Server estimates that it will have to process a million rows that do not meet the criteria before finding even the first match, then no matter how low you make the TOP, you will not get that plan. And if you do get that plan but then during execution it turns out that the first million rows processed do not qualify, you will get a performance that is way worse than you now have.
However, if the rows that to meet the criteria can be found pretty quickly without first having to plough through a huge amount of other rows, then a plan based on nested loops and index seeks might be faster than what you now have. You will have to test to be sure.
February 14, 2016 at 5:58 am
Thanks Hugo, I will thoroughly review your post.
I'll experiment with the number of rows gathered into the temp table up front -- this is only done once per day as the job runs once per day. Or in the case of this Address table where there are currently only about 4 million available for deletion ( meeting purge criteria ) I might try gathering all of them into the temp table on a weekend and then run the while loop. Also considering having the while loop deletions purge 100 at a time as long as that value is low enough to not cause blocking.
Current simplified purge logic:
Get x number of "id" values from target table into a temp table
In a while loop, delete one at a time of the ID values in the temp table
As far as indexes on the temp table, the temp table is created with an integer ID identity column as primary key.
CREATE TABLE #tempdata
(
ID INT IDENTITY(1, 1)
PRIMARY KEY ,
BILLING_ENTRY_ID INT
);
select top 100 * from #tempdata
with no order by in temp table and no index on BILLING_ENTRY_ID
IDBILLING_ENTRY_ID
13729150963059
13730150963057
13731150963058
13732150963060
with no order by in temp table and nonclustered index on BILLING_ENTRY_ID
IDBILLING_ENTRY_ID
619076151568408
619077151568409
619078151568410
619080151568411
Viewing 15 posts - 1 through 15 (of 53 total)
You must be logged in to reply to this topic. Login to reply