INNER JOIN local table to Linked Server table, only first match returned

  • jeff.born

    Ten Centuries

    Points: 1133

    I've recently noticed that when joining to a local table to a remote table through a linked server only the first matched row comes back. I'm using SQL Server 2014 for the on prem local database, and an Azure Managed Instance database for the Linked Server.   All of our work is being pushed to the cloud in Azure and data that used to be replicated to allow all queries to happen on the same SQL Server will now happen across a Linked Server.

    Why is this happening?  Is there a way to get this to work with a linked server change? Is the only option to rewrite with CTEs or Temp tables and bring the data locally first?

    DECLARE @Id INT = 381785;

    SELECT 'LinkedServerMI lnkSvr w/join' fromSrc, *
    FROM LinkedServer.DatabaseName.dbo.CustomerInfoPhone cip
    INNER JOIN dbo.CustomerInfo ci ON cip.CustomerInfoId = ci.CustomerInfoId -- Simple join
    WHERE ci.CustomerInfoId = @Id; -- No other filters
    -- One row comes back, expected 2 or more

    SELECT 'LinkedServerMI lnkSvr select only' fromSrc, *
    FROM LinkedServer.DatabaseName.dbo.CustomerInfoPhone cip
    WHERE cip.CustomerInfoId = @Id;
    --For the customer id in question 2 rows come back.

    Linked server was defined like so:

    EXEC master.dbo.sp_addlinkedserver @server = N'LinkedServer', @srvproduct=N'SQL', @provider=N'SQLNCLI11', @datasrc=N'<servername>', @provstr=N'Data Source=<servername>;User ID=<remoteuser>;ApplicationIntent=ReadOnly'

    EXEC master.dbo.sp_addlinkedsrvlogin @rmtsrvname=N'LinkedServer',@useself=N'False',@locallogin=NULL,@rmtuser='<remoteuser>',@rmtpassword='########';

    • This topic was modified 2 months, 2 weeks ago by  jeff.born.
  • Erland Sommarskog

    SSC-Insane

    Points: 23929

    I don't know might be going on. The result certainly is not expected. Could you post the output of "SELECT @@version" for your local instance?

    Also, can you attach the query plans (in XML format) for the two queries?

    If you change

    WHERE ci.CustomerInfoId = @Id

    to

    WHERE cip.CustomerInfoId = @Id

    does that have any effect?

    [font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]

  • jeff.born

    Ten Centuries

    Points: 1133

    Changing ci to cip doesn't help.

    Version is: Microsoft SQL Azure (RTM) - 12.0.2000.8 May 15 2020 00:47:08 Copyright (C) 2019 Microsoft Corporation

    XML Query plan is as follows:

    <?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.541" Build="15.0.2000.1622" xmlns="http://schemas.microsoft.com/sqlserver/2004/07/showplan">
    <BatchSequence>
    <Batch>
    <Statements>
    <StmtSimple StatementCompId="2" StatementEstRows="1" StatementId="1" StatementOptmLevel="FULL" StatementOptmEarlyAbortReason="GoodEnoughPlanFound" CardinalityEstimationModelVersion="150" StatementSubTreeCost="0.0206709" StatementText="SELECT 'LinkedServerMI lnkSvr w/join' fromSrc, * FROM [LinkedServer].[DatabaseName].dbo.CustomerInfoPhone pip INNER JOIN dbo.CustomerInfo pi ON pip.CustomerInfoId = pi.CustomerInfoId WHERE pi.CustomerInfoId = @CustomerId" StatementType="SELECT" QueryHash="0xAD8FEF4EDAAB4F9A" QueryPlanHash="0x8FE395D67B3A990A" RetrievedFromCache="true" SecurityPolicyApplied="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 DegreeOfParallelism="1" NonParallelPlanReason="CouldNotGenerateValidParallelPlan" CachedPlanSize="208" CompileTime="1407" CompileCPU="1400" CompileMemory="600">
    <MemoryGrantInfo SerialRequiredMemory="0" SerialDesiredMemory="0" GrantedMemory="0" MaxUsedMemory="0" />
    <OptimizerHardwareDependentProperties EstimatedAvailableMemoryGrant="534835" EstimatedPagesCached="133708" EstimatedAvailableDegreeOfParallelism="2" MaxCompileMemory="10755032" />
    <WaitStats>
    <Wait WaitType="OLEDB" WaitTimeMs="130" WaitCount="7" />
    </WaitStats>
    <QueryTimeStats CpuTime="131" ElapsedTime="131" />
    <RelOp AvgRowSize="5860" EstimateCPU="1E-07" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1" LogicalOp="Compute Scalar" NodeId="0" Parallel="false" PhysicalOp="Compute Scalar" EstimatedTotalSubtreeCost="0.0206709">
    <OutputList>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="CustomerInfoPhoneId" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="CustomerInfoId" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="CustomerInfoPhoneTypeId" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="CustomerInfoPhoneNumber" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="CustomerInfoPhoneExtension" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="IsDefault" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="Created" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="Creator" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="Updated" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="Updater" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="Archived" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="ArchivedBy" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="ArchivedDate" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="CustomerInfoId" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="CustomerInfoSalutationId" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="FirstName" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="MiddleName" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="LastName" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column21" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Created" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Creator" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Updated" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Updater" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Archived" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="ArchivedBy" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="ArchivedDate" />
    <ColumnReference Column="Expr1006" />
    </OutputList>
    <ComputeScalar>
    <DefinedValues>
    <DefinedValue>
    <ColumnReference Column="Expr1006" />
    <ScalarOperator ScalarString="'LinkedServerMI lnkSvr w/join'">
    <Const ConstValue="'LinkedServerMI lnkSvr w/join'" />
    </ScalarOperator>
    </DefinedValue>
    </DefinedValues>
    <RelOp AvgRowSize="5846" EstimateCPU="4.18E-06" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1" LogicalOp="Inner Join" NodeId="1" Parallel="false" PhysicalOp="Nested Loops" EstimatedTotalSubtreeCost="0.0206708">
    <OutputList>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="CustomerInfoPhoneId" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="CustomerInfoId" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="CustomerInfoPhoneTypeId" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="CustomerInfoPhoneNumber" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="CustomerInfoPhoneExtension" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="IsDefault" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="Created" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="Creator" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="Updated" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="Updater" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="Archived" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="ArchivedBy" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="ArchivedDate" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="CustomerInfoId" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="CustomerInfoSalutationId" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="FirstName" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="MiddleName" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="LastName" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column1" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column2" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column3" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column4" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column5" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column6" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column7" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column8" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column9" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column10" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column11" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column12" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column13" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column14" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column15" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column16" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column17" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column18" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column19" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column20" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column21" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Created" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Creator" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Updated" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Updater" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Archived" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="ArchivedBy" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="ArchivedDate" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column22" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column23" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column24" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column25" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column26" />
    </OutputList>
    <RunTimeInformation>
    <RunTimeCountersPerThread Thread="0" ActualRows="1" Batches="0" ActualEndOfScans="1" ActualExecutions="1" ActualExecutionMode="Row" ActualElapsedms="131" ActualCPUms="131" />
    </RunTimeInformation>
    <NestedLoops Optimized="false">
    <RelOp AvgRowSize="5762" EstimateCPU="0.0103333" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1" LogicalOp="Compute Scalar" NodeId="2" Parallel="false" PhysicalOp="Compute Scalar" EstimatedTotalSubtreeCost="0.0103333">
    <OutputList>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="CustomerInfoId" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="CustomerInfoSalutationId" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="FirstName" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="MiddleName" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="LastName" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column1" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column2" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column3" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column4" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column5" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column6" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column7" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column8" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column9" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column10" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column11" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column12" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column13" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column14" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column15" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column16" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column17" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column18" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column19" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column20" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column21" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Created" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Creator" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Updated" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Updater" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Archived" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="ArchivedBy" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="ArchivedDate" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column22" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column23" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column24" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column25" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column26" />
    </OutputList>
    <ComputeScalar>
    <DefinedValues>
    <DefinedValue>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="CustomerInfoId" />
    <ScalarOperator ScalarString="[LinkedServer].[DatabaseName].[dbo].[CustomerInfo].[CustomerInfoId]">
    <Identifier>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="CustomerInfoId" />
    </Identifier>
    </ScalarOperator>
    </DefinedValue>
    <DefinedValue>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="CustomerInfoSalutationId" />
    <ScalarOperator ScalarString="[LinkedServer].[DatabaseName].[dbo].[CustomerInfo].[CustomerInfoSalutationId]">
    <Identifier>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="CustomerInfoSalutationId" />
    </Identifier>
    </ScalarOperator>
    </DefinedValue>
    <DefinedValue>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="FirstName" />
    <ScalarOperator ScalarString="[LinkedServer].[DatabaseName].[dbo].[CustomerInfo].[FirstName]">
    <Identifier>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="FirstName" />
    </Identifier>
    </ScalarOperator>
    </DefinedValue>
    <DefinedValue>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="MiddleName" />
    <ScalarOperator ScalarString="[LinkedServer].[DatabaseName].[dbo].[CustomerInfo].[MiddleName]">
    <Identifier>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="MiddleName" />
    </Identifier>
    </ScalarOperator>
    </DefinedValue>
    <DefinedValue>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="LastName" />
    <ScalarOperator ScalarString="[LinkedServer].[DatabaseName].[dbo].[CustomerInfo].[LastName]">
    <Identifier>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="LastName" />
    </Identifier>
    </ScalarOperator>
    </DefinedValue>
    <DefinedValue>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column1" />
    <ScalarOperator ScalarString="[LinkedServer].[DatabaseName].[dbo].[CustomerInfo].[Column1]">
    <Identifier>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column1" />
    </Identifier>
    </ScalarOperator>
    </DefinedValue>
    <DefinedValue>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column2" />
    <ScalarOperator ScalarString="[LinkedServer].[DatabaseName].[dbo].[CustomerInfo].[Column2]">
    <Identifier>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column2" />
    </Identifier>
    </ScalarOperator>
    </DefinedValue>
    <DefinedValue>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column3" />
    <ScalarOperator ScalarString="[LinkedServer].[DatabaseName].[dbo].[CustomerInfo].[Column3]">
    <Identifier>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column3" />
    </Identifier>
    </ScalarOperator>
    </DefinedValue>
    <DefinedValue>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column4" />
    <ScalarOperator ScalarString="[LinkedServer].[DatabaseName].[dbo].[CustomerInfo].[Column4]">
    <Identifier>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column4" />
    </Identifier>
    </ScalarOperator>
    </DefinedValue>
    <DefinedValue>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column5" />
    <ScalarOperator ScalarString="[LinkedServer].[DatabaseName].[dbo].[CustomerInfo].[Column5]">
    <Identifier>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column5" />
    </Identifier>
    </ScalarOperator>
    </DefinedValue>
    <DefinedValue>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column6" />
    <ScalarOperator ScalarString="[LinkedServer].[DatabaseName].[dbo].[CustomerInfo].[Column6]">
    <Identifier>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column6" />
    </Identifier>
    </ScalarOperator>
    </DefinedValue>
    <DefinedValue>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column7" />
    <ScalarOperator ScalarString="[LinkedServer].[DatabaseName].[dbo].[CustomerInfo].[Column7]">
    <Identifier>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column7" />
    </Identifier>
    </ScalarOperator>
    </DefinedValue>
    <DefinedValue>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column8" />
    <ScalarOperator ScalarString="[LinkedServer].[DatabaseName].[dbo].[CustomerInfo].[Column8]">
    <Identifier>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column8" />
    </Identifier>
    </ScalarOperator>
    </DefinedValue>
    <DefinedValue>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column9" />
    <ScalarOperator ScalarString="[LinkedServer].[DatabaseName].[dbo].[CustomerInfo].[Column9]">
    <Identifier>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column9" />
    </Identifier>
    </ScalarOperator>
    </DefinedValue>
    <DefinedValue>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column10" />
    <ScalarOperator ScalarString="[LinkedServer].[DatabaseName].[dbo].[CustomerInfo].[Column10]">
    <Identifier>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column10" />
    </Identifier>
    </ScalarOperator>
    </DefinedValue>
    <DefinedValue>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column11" />
    <ScalarOperator ScalarString="[LinkedServer].[DatabaseName].[dbo].[CustomerInfo].[Column11]">
    <Identifier>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column11" />
    </Identifier>
    </ScalarOperator>
    </DefinedValue>
    <DefinedValue>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column12" />
    <ScalarOperator ScalarString="[LinkedServer].[DatabaseName].[dbo].[CustomerInfo].[Column12]">
    <Identifier>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column12" />
    </Identifier>
    </ScalarOperator>
    </DefinedValue>
    <DefinedValue>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column13" />
    <ScalarOperator ScalarString="[LinkedServer].[DatabaseName].[dbo].[CustomerInfo].[Column13]">
    <Identifier>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column13" />
    </Identifier>
    </ScalarOperator>
    </DefinedValue>
    <DefinedValue>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column14" />
    <ScalarOperator ScalarString="[LinkedServer].[DatabaseName].[dbo].[CustomerInfo].[Column14]">
    <Identifier>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column14" />
    </Identifier>
    </ScalarOperator>
    </DefinedValue>
    <DefinedValue>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column15" />
    <ScalarOperator ScalarString="[LinkedServer].[DatabaseName].[dbo].[CustomerInfo].[Column15]">
    <Identifier>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column15" />
    </Identifier>
    </ScalarOperator>
    </DefinedValue>
    <DefinedValue>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column16" />
    <ScalarOperator ScalarString="[LinkedServer].[DatabaseName].[dbo].[CustomerInfo].[Column16]">
    <Identifier>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column16" />
    </Identifier>
    </ScalarOperator>
    </DefinedValue>
    <DefinedValue>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column17" />
    <ScalarOperator ScalarString="[LinkedServer].[DatabaseName].[dbo].[CustomerInfo].[Column17]">
    <Identifier>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column17" />
    </Identifier>
    </ScalarOperator>
    </DefinedValue>
    <DefinedValue>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column18" />
    <ScalarOperator ScalarString="[LinkedServer].[DatabaseName].[dbo].[CustomerInfo].[Column18]">
    <Identifier>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column18" />
    </Identifier>
    </ScalarOperator>
    </DefinedValue>
    <DefinedValue>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column19" />
    <ScalarOperator ScalarString="[LinkedServer].[DatabaseName].[dbo].[CustomerInfo].[Column19]">
    <Identifier>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column19" />
    </Identifier>
    </ScalarOperator>
    </DefinedValue>
    <DefinedValue>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column20" />
    <ScalarOperator ScalarString="[LinkedServer].[DatabaseName].[dbo].[CustomerInfo].[Column20]">
    <Identifier>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column20" />
    </Identifier>
    </ScalarOperator>
    </DefinedValue>
    <DefinedValue>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column21" />
    <ScalarOperator ScalarString="[LinkedServer].[DatabaseName].[dbo].[CustomerInfo].[Column21]">
    <Identifier>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column21" />
    </Identifier>
    </ScalarOperator>
    </DefinedValue>
    <DefinedValue>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Created" />
    <ScalarOperator ScalarString="[LinkedServer].[DatabaseName].[dbo].[CustomerInfo].[Created]">
    <Identifier>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Created" />
    </Identifier>
    </ScalarOperator>
    </DefinedValue>
    <DefinedValue>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Creator" />
    <ScalarOperator ScalarString="[LinkedServer].[DatabaseName].[dbo].[CustomerInfo].[Creator]">
    <Identifier>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Creator" />
    </Identifier>
    </ScalarOperator>
    </DefinedValue>
    <DefinedValue>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Updated" />
    <ScalarOperator ScalarString="[LinkedServer].[DatabaseName].[dbo].[CustomerInfo].[Updated]">
    <Identifier>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Updated" />
    </Identifier>
    </ScalarOperator>
    </DefinedValue>
    <DefinedValue>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Updater" />
    <ScalarOperator ScalarString="[LinkedServer].[DatabaseName].[dbo].[CustomerInfo].[Updater]">
    <Identifier>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Updater" />
    </Identifier>
    </ScalarOperator>
    </DefinedValue>
    <DefinedValue>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Archived" />
    <ScalarOperator ScalarString="[LinkedServer].[DatabaseName].[dbo].[CustomerInfo].[Archived]">
    <Identifier>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Archived" />
    </Identifier>
    </ScalarOperator>
    </DefinedValue>
    <DefinedValue>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="ArchivedBy" />
    <ScalarOperator ScalarString="[LinkedServer].[DatabaseName].[dbo].[CustomerInfo].[ArchivedBy]">
    <Identifier>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="ArchivedBy" />
    </Identifier>
    </ScalarOperator>
    </DefinedValue>
    <DefinedValue>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="ArchivedDate" />
    <ScalarOperator ScalarString="[LinkedServer].[DatabaseName].[dbo].[CustomerInfo].[ArchivedDate]">
    <Identifier>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="ArchivedDate" />
    </Identifier>
    </ScalarOperator>
    </DefinedValue>
    <DefinedValue>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column22" />
    <ScalarOperator ScalarString="[LinkedServer].[DatabaseName].[dbo].[CustomerInfo].[Column22]">
    <Identifier>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column22" />
    </Identifier>
    </ScalarOperator>
    </DefinedValue>
    <DefinedValue>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column23" />
    <ScalarOperator ScalarString="[LinkedServer].[DatabaseName].[dbo].[CustomerInfo].[Column23]">
    <Identifier>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column23" />
    </Identifier>
    </ScalarOperator>
    </DefinedValue>
    <DefinedValue>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column24" />
    <ScalarOperator ScalarString="[LinkedServer].[DatabaseName].[dbo].[CustomerInfo].[Column24]">
    <Identifier>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column24" />
    </Identifier>
    </ScalarOperator>
    </DefinedValue>
    <DefinedValue>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column25" />
    <ScalarOperator ScalarString="[LinkedServer].[DatabaseName].[dbo].[CustomerInfo].[Column25]">
    <Identifier>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column25" />
    </Identifier>
    </ScalarOperator>
    </DefinedValue>
    <DefinedValue>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column26" />
    <ScalarOperator ScalarString="[LinkedServer].[DatabaseName].[dbo].[CustomerInfo].[Column26]">
    <Identifier>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column26" />
    </Identifier>
    </ScalarOperator>
    </DefinedValue>
    </DefinedValues>
    <RelOp AvgRowSize="5762" EstimateCPU="0.0103333" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1" LogicalOp="Remote Query" NodeId="3" Parallel="false" PhysicalOp="Remote Query" EstimatedTotalSubtreeCost="0.0103333">
    <OutputList>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="CustomerInfoId" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="CustomerInfoSalutationId" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="FirstName" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="MiddleName" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="LastName" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column1" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column2" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column3" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column4" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column5" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column6" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column7" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column8" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column9" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column10" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column11" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column12" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column13" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column14" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column15" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column16" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column17" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column18" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column19" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column20" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column21" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Created" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Creator" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Updated" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Updater" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Archived" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="ArchivedBy" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="ArchivedDate" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column22" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column23" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column24" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column25" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfo]" Column="Column26" />
    </OutputList>
    <RunTimeInformation>
    <RunTimeCountersPerThread Thread="0" ActualRebinds="1" ActualRewinds="0" ActualRows="1" Batches="0" ActualEndOfScans="1" ActualExecutions="1" ActualExecutionMode="Row" ActualElapsedms="65" ActualCPUms="65" ActualScans="0" ActualLogicalReads="0" ActualPhysicalReads="0" ActualReadAheads="0" ActualLobLogicalReads="0" ActualLobPhysicalReads="0" ActualLobReadAheads="0" />
    </RunTimeInformation>
    <RemoteQuery RemoteSource="LinkedServer" RemoteQuery="SELECT &quot;Tbl1004&quot;.&quot;CustomerInfoId&quot; &quot;Col1009&quot;,&quot;Tbl1004&quot;.&quot;CustomerInfoSalutationId&quot; &quot;Col1010&quot;,&quot;Tbl1004&quot;.&quot;FirstName&quot; &quot;Col1011&quot;,&quot;Tbl1004&quot;.&quot;MiddleName&quot; &quot;Col1012&quot;,&quot;Tbl1004&quot;.&quot;LastName&quot; &quot;Col1013&quot;,&quot;Tbl1004&quot;.&quot;Column1&quot; &quot;Col1014&quot;,&quot;Tbl1004&quot;.&quot;Column2&quot; &quot;Col1015&quot;,&quot;Tbl1004&quot;.&quot;Column3&quot; &quot;Col1016&quot;,&quot;Tbl1004&quot;.&quot;Column4&quot; &quot;Col1017&quot;,&quot;Tbl1004&quot;.&quot;Column5&quot; &quot;Col1018&quot;,&quot;Tbl1004&quot;.&quot;Column6&quot; &quot;Col1019&quot;,&quot;Tbl1004&quot;.&quot;Column7&quot; &quot;Col1020&quot;,&quot;Tbl1004&quot;.&quot;Column8&quot; &quot;Col1021&quot;,&quot;Tbl1004&quot;.&quot;Column9&quot; &quot;Col1022&quot;,&quot;Tbl1004&quot;.&quot;Column10&quot; &quot;Col1023&quot;,&quot;Tbl1004&quot;.&quot;Column11&quot; &quot;Col1024&quot;,&quot;Tbl1004&quot;.&quot;Column12&quot; &quot;Col1025&quot;,&quot;Tbl1004&quot;.&quot;Column13&quot; &quot;Col1026&quot;,&quot;Tbl1004&quot;.&quot;Column14&quot; &quot;Col1027&quot;,&quot;Tbl1004&quot;.&quot;Column15&quot; &quot;Col1028&quot;,&quot;Tbl1004&quot;.&quot;Column16&quot; &quot;Col1029&quot;,&quot;Tbl1004&quot;.&quot;Column17&quot; &quot;Col1030&quot;,&quot;Tbl1004&quot;.&quot;Column18&quot; &quot;Col1031&quot;,&quot;Tbl1004&quot;.&quot;Column19&quot; &quot;Col1032&quot;,&quot;Tbl1004&quot;.&quot;Column20&quot; &quot;Col1033&quot;,&quot;Tbl1004&quot;.&quot;Column21&quot; &quot;Col1034&quot;,&quot;Tbl1004&quot;.&quot;Created&quot; &quot;Col1035&quot;,&quot;Tbl1004&quot;.&quot;Creator&quot; &quot;Col1036&quot;,&quot;Tbl1004&quot;.&quot;Updated&quot; &quot;Col1037&quot;,&quot;Tbl1004&quot;.&quot;Updater&quot; &quot;Col1038&quot;,&quot;Tbl1004&quot;.&quot;Archived&quot; &quot;Col1039&quot;,&quot;Tbl1004&quot;.&quot;ArchivedBy&quot; &quot;Col1040&quot;,&quot;Tbl1004&quot;.&quot;ArchivedDate&quot; &quot;Col1041&quot;,&quot;Tbl1004&quot;.&quot;Column22&quot; &quot;Col1042&quot;,&quot;Tbl1004&quot;.&quot;Column23&quot; &quot;Col1043&quot;,&quot;Tbl1004&quot;.&quot;Column24&quot; &quot;Col1044&quot;,&quot;Tbl1004&quot;.&quot;Column25&quot; &quot;Col1045&quot;,&quot;Tbl1004&quot;.&quot;Column26&quot; &quot;Col1007&quot; FROM &quot;[DatabaseName]&quot;.&quot;dbo&quot;.&quot;CustomerInfo&quot; &quot;Tbl1004&quot; WHERE &quot;Tbl1004&quot;.&quot;CustomerInfoId&quot;=?" />
    </RelOp>
    </ComputeScalar>
    </RelOp>
    <RelOp AvgRowSize="93" EstimateCPU="0.0103333" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1" LogicalOp="Compute Scalar" NodeId="4" Parallel="false" PhysicalOp="Compute Scalar" EstimatedTotalSubtreeCost="0.0103333">
    <OutputList>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="CustomerInfoPhoneId" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="CustomerInfoId" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="CustomerInfoPhoneTypeId" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="CustomerInfoPhoneNumber" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="CustomerInfoPhoneExtension" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="IsDefault" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="Created" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="Creator" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="Updated" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="Updater" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="Archived" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="ArchivedBy" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="ArchivedDate" />
    </OutputList>
    <ComputeScalar>
    <DefinedValues>
    <DefinedValue>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="CustomerInfoPhoneId" />
    <ScalarOperator ScalarString="[LinkedServer].[DatabaseName].[dbo].[CustomerInfoPhone].[CustomerInfoPhoneId] as [pip].[CustomerInfoPhoneId]">
    <Identifier>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="CustomerInfoPhoneId" />
    </Identifier>
    </ScalarOperator>
    </DefinedValue>
    <DefinedValue>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="CustomerInfoId" />
    <ScalarOperator ScalarString="[LinkedServer].[DatabaseName].[dbo].[CustomerInfoPhone].[CustomerInfoId] as [pip].[CustomerInfoId]">
    <Identifier>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="CustomerInfoId" />
    </Identifier>
    </ScalarOperator>
    </DefinedValue>
    <DefinedValue>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="CustomerInfoPhoneTypeId" />
    <ScalarOperator ScalarString="[LinkedServer].[DatabaseName].[dbo].[CustomerInfoPhone].[CustomerInfoPhoneTypeId] as [pip].[CustomerInfoPhoneTypeId]">
    <Identifier>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="CustomerInfoPhoneTypeId" />
    </Identifier>
    </ScalarOperator>
    </DefinedValue>
    <DefinedValue>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="CustomerInfoPhoneNumber" />
    <ScalarOperator ScalarString="[LinkedServer].[DatabaseName].[dbo].[CustomerInfoPhone].[CustomerInfoPhoneNumber] as [pip].[CustomerInfoPhoneNumber]">
    <Identifier>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="CustomerInfoPhoneNumber" />
    </Identifier>
    </ScalarOperator>
    </DefinedValue>
    <DefinedValue>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="CustomerInfoPhoneExtension" />
    <ScalarOperator ScalarString="[LinkedServer].[DatabaseName].[dbo].[CustomerInfoPhone].[CustomerInfoPhoneExtension] as [pip].[CustomerInfoPhoneExtension]">
    <Identifier>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="CustomerInfoPhoneExtension" />
    </Identifier>
    </ScalarOperator>
    </DefinedValue>
    <DefinedValue>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="IsDefault" />
    <ScalarOperator ScalarString="[LinkedServer].[DatabaseName].[dbo].[CustomerInfoPhone].[IsDefault] as [pip].[IsDefault]">
    <Identifier>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="IsDefault" />
    </Identifier>
    </ScalarOperator>
    </DefinedValue>
    <DefinedValue>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="Created" />
    <ScalarOperator ScalarString="[LinkedServer].[DatabaseName].[dbo].[CustomerInfoPhone].[Created] as [pip].[Created]">
    <Identifier>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="Created" />
    </Identifier>
    </ScalarOperator>
    </DefinedValue>
    <DefinedValue>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="Creator" />
    <ScalarOperator ScalarString="[LinkedServer].[DatabaseName].[dbo].[CustomerInfoPhone].[Creator] as [pip].[Creator]">
    <Identifier>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="Creator" />
    </Identifier>
    </ScalarOperator>
    </DefinedValue>
    <DefinedValue>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="Updated" />
    <ScalarOperator ScalarString="[LinkedServer].[DatabaseName].[dbo].[CustomerInfoPhone].[Updated] as [pip].[Updated]">
    <Identifier>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="Updated" />
    </Identifier>
    </ScalarOperator>
    </DefinedValue>
    <DefinedValue>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="Updater" />
    <ScalarOperator ScalarString="[LinkedServer].[DatabaseName].[dbo].[CustomerInfoPhone].[Updater] as [pip].[Updater]">
    <Identifier>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="Updater" />
    </Identifier>
    </ScalarOperator>
    </DefinedValue>
    <DefinedValue>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="Archived" />
    <ScalarOperator ScalarString="[LinkedServer].[DatabaseName].[dbo].[CustomerInfoPhone].[Archived] as [pip].[Archived]">
    <Identifier>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="Archived" />
    </Identifier>
    </ScalarOperator>
    </DefinedValue>
    <DefinedValue>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="ArchivedBy" />
    <ScalarOperator ScalarString="[LinkedServer].[DatabaseName].[dbo].[CustomerInfoPhone].[ArchivedBy] as [pip].[ArchivedBy]">
    <Identifier>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="ArchivedBy" />
    </Identifier>
    </ScalarOperator>
    </DefinedValue>
    <DefinedValue>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="ArchivedDate" />
    <ScalarOperator ScalarString="[LinkedServer].[DatabaseName].[dbo].[CustomerInfoPhone].[ArchivedDate] as [pip].[ArchivedDate]">
    <Identifier>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="ArchivedDate" />
    </Identifier>
    </ScalarOperator>
    </DefinedValue>
    </DefinedValues>
    <RelOp AvgRowSize="93" EstimateCPU="0.0103333" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1" LogicalOp="Remote Query" NodeId="5" Parallel="false" PhysicalOp="Remote Query" EstimatedTotalSubtreeCost="0.0103333">
    <OutputList>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="CustomerInfoPhoneId" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="CustomerInfoId" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="CustomerInfoPhoneTypeId" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="CustomerInfoPhoneNumber" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="CustomerInfoPhoneExtension" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="IsDefault" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="Created" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="Creator" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="Updated" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="Updater" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="Archived" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="ArchivedBy" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="ArchivedDate" />
    </OutputList>
    <RunTimeInformation>
    <RunTimeCountersPerThread Thread="0" ActualRebinds="1" ActualRewinds="0" ActualRows="1" Batches="0" ActualEndOfScans="0" ActualExecutions="1" ActualExecutionMode="Row" ActualElapsedms="65" ActualCPUms="65" ActualScans="0" ActualLogicalReads="0" ActualPhysicalReads="0" ActualReadAheads="0" ActualLobLogicalReads="0" ActualLobPhysicalReads="0" ActualLobReadAheads="0" />
    </RunTimeInformation>
    <RemoteQuery RemoteSource="LinkedServer" RemoteQuery="SELECT &quot;Tbl1001&quot;.&quot;CustomerInfoPhoneId&quot; &quot;Col1048&quot;,&quot;Tbl1001&quot;.&quot;CustomerInfoId&quot; &quot;Col1049&quot;,&quot;Tbl1001&quot;.&quot;CustomerInfoPhoneTypeId&quot; &quot;Col1050&quot;,&quot;Tbl1001&quot;.&quot;CustomerInfoPhoneNumber&quot; &quot;Col1051&quot;,&quot;Tbl1001&quot;.&quot;CustomerInfoPhoneExtension&quot; &quot;Col1052&quot;,&quot;Tbl1001&quot;.&quot;IsDefault&quot; &quot;Col1053&quot;,&quot;Tbl1001&quot;.&quot;Created&quot; &quot;Col1054&quot;,&quot;Tbl1001&quot;.&quot;Creator&quot; &quot;Col1055&quot;,&quot;Tbl1001&quot;.&quot;Updated&quot; &quot;Col1056&quot;,&quot;Tbl1001&quot;.&quot;Updater&quot; &quot;Col1057&quot;,&quot;Tbl1001&quot;.&quot;Archived&quot; &quot;Col1058&quot;,&quot;Tbl1001&quot;.&quot;ArchivedBy&quot; &quot;Col1059&quot;,&quot;Tbl1001&quot;.&quot;ArchivedDate&quot; &quot;Col1046&quot; FROM &quot;[DatabaseName]&quot;.&quot;dbo&quot;.&quot;CustomerInfoPhone&quot; &quot;Tbl1001&quot; WHERE &quot;Tbl1001&quot;.&quot;CustomerInfoId&quot;=?" />
    </RelOp>
    </ComputeScalar>
    </RelOp>
    </NestedLoops>
    </RelOp>
    </ComputeScalar>
    </RelOp>
    <ParameterList>
    <ColumnReference Column="@CustomerId" ParameterDataType="int" ParameterRuntimeValue="(200040)" />
    </ParameterList>
    </QueryPlan>
    </StmtSimple>
    </Statements>
    </Batch>
    <Batch>
    <Statements>
    <StmtSimple StatementCompId="3" StatementEstRows="1" StatementId="2" StatementOptmLevel="FULL" StatementOptmEarlyAbortReason="GoodEnoughPlanFound" CardinalityEstimationModelVersion="150" StatementSubTreeCost="0.0103333" StatementText="SELECT 'LinkedServerMI lnkSvr select only' fromSrc, * FROM [LinkedServer].[DatabaseName].dbo.CustomerInfoPhone pip WHERE pip.CustomerInfoId = @CustomerId" StatementType="SELECT" QueryHash="0xD2F251BF7CB57653" QueryPlanHash="0x156E0DB0BC863C5D" RetrievedFromCache="true" SecurityPolicyApplied="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 DegreeOfParallelism="1" NonParallelPlanReason="CouldNotGenerateValidParallelPlan" CachedPlanSize="104" CompileTime="869" CompileCPU="868" CompileMemory="288">
    <MemoryGrantInfo SerialRequiredMemory="0" SerialDesiredMemory="0" GrantedMemory="0" MaxUsedMemory="0" />
    <OptimizerHardwareDependentProperties EstimatedAvailableMemoryGrant="534835" EstimatedPagesCached="133708" EstimatedAvailableDegreeOfParallelism="2" MaxCompileMemory="10754608" />
    <WaitStats>
    <Wait WaitType="OLEDB" WaitTimeMs="65" WaitCount="4" />
    </WaitStats>
    <QueryTimeStats CpuTime="65" ElapsedTime="66" />
    <RelOp AvgRowSize="110" EstimateCPU="0.0103333" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1" LogicalOp="Compute Scalar" NodeId="0" Parallel="false" PhysicalOp="Compute Scalar" EstimatedTotalSubtreeCost="0.0103333">
    <OutputList>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="CustomerInfoPhoneId" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="CustomerInfoId" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="CustomerInfoPhoneTypeId" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="CustomerInfoPhoneNumber" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="CustomerInfoPhoneExtension" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="IsDefault" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="Created" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="Creator" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="Updated" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="Updater" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="Archived" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="ArchivedBy" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="ArchivedDate" />
    <ColumnReference Column="Expr1002" />
    </OutputList>
    <ComputeScalar>
    <DefinedValues>
    <DefinedValue>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="CustomerInfoPhoneId" />
    <ScalarOperator ScalarString="[LinkedServer].[DatabaseName].[dbo].[CustomerInfoPhone].[CustomerInfoPhoneId] as [pip].[CustomerInfoPhoneId]">
    <Identifier>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="CustomerInfoPhoneId" />
    </Identifier>
    </ScalarOperator>
    </DefinedValue>
    <DefinedValue>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="CustomerInfoId" />
    <ScalarOperator ScalarString="[LinkedServer].[DatabaseName].[dbo].[CustomerInfoPhone].[CustomerInfoId] as [pip].[CustomerInfoId]">
    <Identifier>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="CustomerInfoId" />
    </Identifier>
    </ScalarOperator>
    </DefinedValue>
    <DefinedValue>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="CustomerInfoPhoneTypeId" />
    <ScalarOperator ScalarString="[LinkedServer].[DatabaseName].[dbo].[CustomerInfoPhone].[CustomerInfoPhoneTypeId] as [pip].[CustomerInfoPhoneTypeId]">
    <Identifier>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="CustomerInfoPhoneTypeId" />
    </Identifier>
    </ScalarOperator>
    </DefinedValue>
    <DefinedValue>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="CustomerInfoPhoneNumber" />
    <ScalarOperator ScalarString="[LinkedServer].[DatabaseName].[dbo].[CustomerInfoPhone].[CustomerInfoPhoneNumber] as [pip].[CustomerInfoPhoneNumber]">
    <Identifier>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="CustomerInfoPhoneNumber" />
    </Identifier>
    </ScalarOperator>
    </DefinedValue>
    <DefinedValue>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="CustomerInfoPhoneExtension" />
    <ScalarOperator ScalarString="[LinkedServer].[DatabaseName].[dbo].[CustomerInfoPhone].[CustomerInfoPhoneExtension] as [pip].[CustomerInfoPhoneExtension]">
    <Identifier>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="CustomerInfoPhoneExtension" />
    </Identifier>
    </ScalarOperator>
    </DefinedValue>
    <DefinedValue>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="IsDefault" />
    <ScalarOperator ScalarString="[LinkedServer].[DatabaseName].[dbo].[CustomerInfoPhone].[IsDefault] as [pip].[IsDefault]">
    <Identifier>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="IsDefault" />
    </Identifier>
    </ScalarOperator>
    </DefinedValue>
    <DefinedValue>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="Created" />
    <ScalarOperator ScalarString="[LinkedServer].[DatabaseName].[dbo].[CustomerInfoPhone].[Created] as [pip].[Created]">
    <Identifier>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="Created" />
    </Identifier>
    </ScalarOperator>
    </DefinedValue>
    <DefinedValue>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="Creator" />
    <ScalarOperator ScalarString="[LinkedServer].[DatabaseName].[dbo].[CustomerInfoPhone].[Creator] as [pip].[Creator]">
    <Identifier>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="Creator" />
    </Identifier>
    </ScalarOperator>
    </DefinedValue>
    <DefinedValue>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="Updated" />
    <ScalarOperator ScalarString="[LinkedServer].[DatabaseName].[dbo].[CustomerInfoPhone].[Updated] as [pip].[Updated]">
    <Identifier>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="Updated" />
    </Identifier>
    </ScalarOperator>
    </DefinedValue>
    <DefinedValue>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="Updater" />
    <ScalarOperator ScalarString="[LinkedServer].[DatabaseName].[dbo].[CustomerInfoPhone].[Updater] as [pip].[Updater]">
    <Identifier>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="Updater" />
    </Identifier>
    </ScalarOperator>
    </DefinedValue>
    <DefinedValue>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="Archived" />
    <ScalarOperator ScalarString="[LinkedServer].[DatabaseName].[dbo].[CustomerInfoPhone].[Archived] as [pip].[Archived]">
    <Identifier>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="Archived" />
    </Identifier>
    </ScalarOperator>
    </DefinedValue>
    <DefinedValue>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="ArchivedBy" />
    <ScalarOperator ScalarString="[LinkedServer].[DatabaseName].[dbo].[CustomerInfoPhone].[ArchivedBy] as [pip].[ArchivedBy]">
    <Identifier>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="ArchivedBy" />
    </Identifier>
    </ScalarOperator>
    </DefinedValue>
    <DefinedValue>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="ArchivedDate" />
    <ScalarOperator ScalarString="[LinkedServer].[DatabaseName].[dbo].[CustomerInfoPhone].[ArchivedDate] as [pip].[ArchivedDate]">
    <Identifier>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="ArchivedDate" />
    </Identifier>
    </ScalarOperator>
    </DefinedValue>
    <DefinedValue>
    <ColumnReference Column="Expr1002" />
    <ScalarOperator ScalarString="[Expr1002]">
    <Identifier>
    <ColumnReference Column="Expr1002" />
    </Identifier>
    </ScalarOperator>
    </DefinedValue>
    </DefinedValues>
    <RelOp AvgRowSize="110" EstimateCPU="0.0103333" EstimateIO="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row" EstimateRows="1" LogicalOp="Remote Query" NodeId="1" Parallel="false" PhysicalOp="Remote Query" EstimatedTotalSubtreeCost="0.0103333">
    <OutputList>
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="CustomerInfoPhoneId" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="CustomerInfoId" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="CustomerInfoPhoneTypeId" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="CustomerInfoPhoneNumber" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="CustomerInfoPhoneExtension" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="IsDefault" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="Created" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="Creator" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="Updated" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="Updater" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="Archived" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="ArchivedBy" />
    <ColumnReference Server="[LinkedServer]" Database="[DatabaseName]" Schema="[dbo]" Table="[CustomerInfoPhone]" Alias="[pip]" Column="ArchivedDate" />
    <ColumnReference Column="Expr1002" />
    </OutputList>
    <RunTimeInformation>
    <RunTimeCountersPerThread Thread="0" ActualRebinds="1" ActualRewinds="0" ActualRows="5" Batches="0" ActualEndOfScans="1" ActualExecutions="1" ActualExecutionMode="Row" ActualElapsedms="65" ActualCPUms="65" ActualScans="0" ActualLogicalReads="0" ActualPhysicalReads="0" ActualReadAheads="0" ActualLobLogicalReads="0" ActualLobPhysicalReads="0" ActualLobReadAheads="0" />
    </RunTimeInformation>
    <RemoteQuery RemoteSource="LinkedServer" RemoteQuery="SELECT &quot;Tbl1001&quot;.&quot;CustomerInfoPhoneId&quot; &quot;Col1005&quot;,&quot;Tbl1001&quot;.&quot;CustomerInfoId&quot; &quot;Col1006&quot;,&quot;Tbl1001&quot;.&quot;CustomerInfoPhoneTypeId&quot; &quot;Col1007&quot;,&quot;Tbl1001&quot;.&quot;CustomerInfoPhoneNumber&quot; &quot;Col1008&quot;,&quot;Tbl1001&quot;.&quot;CustomerInfoPhoneExtension&quot; &quot;Col1009&quot;,&quot;Tbl1001&quot;.&quot;IsDefault&quot; &quot;Col1010&quot;,&quot;Tbl1001&quot;.&quot;Created&quot; &quot;Col1011&quot;,&quot;Tbl1001&quot;.&quot;Creator&quot; &quot;Col1012&quot;,&quot;Tbl1001&quot;.&quot;Updated&quot; &quot;Col1013&quot;,&quot;Tbl1001&quot;.&quot;Updater&quot; &quot;Col1014&quot;,&quot;Tbl1001&quot;.&quot;Archived&quot; &quot;Col1015&quot;,&quot;Tbl1001&quot;.&quot;ArchivedBy&quot; &quot;Col1016&quot;,&quot;Tbl1001&quot;.&quot;ArchivedDate&quot; &quot;Col1003&quot;,'LinkedServerMI lnkSvr select only' &quot;Expr1002&quot; FROM &quot;[DatabaseName]&quot;.&quot;dbo&quot;.&quot;CustomerInfoPhone&quot; &quot;Tbl1001&quot; WHERE &quot;Tbl1001&quot;.&quot;CustomerInfoId&quot;=?" />
    </RelOp>
    </ComputeScalar>
    </RelOp>
    <ParameterList>
    <ColumnReference Column="@CustomerId" ParameterDataType="int" ParameterRuntimeValue="(200040)" />
    </ParameterList>
    </QueryPlan>
    </StmtSimple>
    </Statements>
    </Batch>
    </BatchSequence>
    </ShowPlanXML>
  • Erland Sommarskog

    SSC-Insane

    Points: 23929

    I asked for @@version for your local instance, not for Azure MI. Anyway, it is in the plan. and it seems that you have SQL 2019 RTM. You could try to apply the latest CU to see if this is a bug that has been fixed. Because, it certainly looks like a bug to me.

    I noticed that that dbo.CustomerInfo is also on the linked server, so you could rewrite this with OPENQUERY to have the join to happen remotely.

    You could also try to use Profiler on the Managed Instance to see what is actually being sent to it.

    By the way, next time someone asks for a query plan, please attach it as a file.

    • This reply was modified 2 months, 2 weeks ago by  Erland Sommarskog. Reason: Addition

    [font="Times New Roman"]Erland Sommarskog, SQL Server MVP, www.sommarskog.se[/font]

  • jeff.born

    Ten Centuries

    Points: 1133

    Both the remote and local databases are Azure Remote Instances with the same version.  One of the benefits of using a Managed Instance is that it is supposed to be always up to date.

    I was blind and didn't see the attach file option.  Thanks for taking a look at this for me too.  The confirmation that it's not supposed to work this way is what I needed.  Now to figure out how to submit a bug to Microsoft.

Viewing 5 posts - 1 through 5 (of 5 total)

You must be logged in to reply to this topic. Login to reply