Advertisement
Guest User

Query 2 Plan

a guest
Apr 3rd, 2014
140
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
XML 96.19 KB | None | 0 0
  1. <?xml version="1.0" encoding="utf-16"?>
  2. <ShowPlanXML xmlns="http://schemas.microsoft.com/sqlserver/2004/07/showplan" Version="1.2" Build="11.0.3128.0">
  3.   <BatchSequence>
  4.     <Batch>
  5.       <Statements>
  6.         <StmtSimple StatementText="with results as(&#xD;&#xA;SELECT&#xD;&#xA;&#x9;  P.[patient_guid]&#xD;&#xA;      ,P.[client_guid]&#xD;&#xA;      ,P.[patient_account_id]&#xD;&#xA;      ,C.[database_guid]&#xD;&#xA;      ,P.[patient_name]   &#xD;&#xA;      ,P.[rabies_tag_number]&#xD;&#xA;      ,P.[rabies_serial_number]&#xD;&#xA;      ,P.[rabies_brand_name]&#xD;&#xA;      ,P.[species]     &#xD;&#xA;      ,P.[breed] &#xD;&#xA;      ,P.[coat_color]&#xD;&#xA;      ,P.[sex]&#xD;&#xA;      ,P.[birthdate]&#xD;&#xA;      ,P.[latest_visit]&#xD;&#xA;      ,P.[first_visit]&#xD;&#xA;      ,P.[maturity_code]&#xD;&#xA;      ,P.[medical_alert]&#xD;&#xA;      ,P.[chronic_ailment]&#xD;&#xA;      ,P.[continuous_medication]&#xD;&#xA;      ,P.[weight]&#xD;&#xA;      ,P.[doctor_preference]&#xD;&#xA;      ,P.[tattoo_number]&#xD;&#xA;      ,P.[avid_chip_number]&#xD;&#xA;      ,P.[comment]&#xD;&#xA;      ,P.[special_instructions]&#xD;&#xA;      ,P.[health_plan_name]&#xD;&#xA;      ,P.[deleted]&#xD;&#xA;      ,P.[has_lab_results]&#xD;&#xA;&#x9;  ,P.[trainer_id]&#xD;&#xA;&#x9;  ,P.[stable_id]&#xD;&#xA;      ,C.[first_name]&#xD;&#xA;      ,C.[last_name]&#xD;&#xA;&#x9;  ,P.[active]&#xD;&#xA;&#x9;  ,P.[deceased_date]&#xD;&#xA;  FROM [patients] P&#xD;&#xA;  inner join clients C on P.client_guid = C.client_guid&#xD;&#xA;  where C.database_guid = @DatabaseGuid and P.patient_name like '%'+@SearchText+'%')&#xD;&#xA;select results.*, (select count(*) from results) as total&#xD;&#xA;from results&#xD;&#xA;ORDER BY patient_name ASC, patient_guid&#xD;&#xA;OFFSET (@PageSize * @PageNumber) ROWS&#xD;&#xA;FETCH NEXT @PageSize ROWS ONLY;" StatementId="1" StatementCompId="5" StatementType="SELECT" RetrievedFromCache="true" StatementSubTreeCost="9.94398" StatementEstRows="100" StatementOptmLevel="FULL" QueryHash="0x4AA85494980142FA" QueryPlanHash="0x3456BA44F9F10ED">
  7.           <StatementSetOptions QUOTED_IDENTIFIER="true" ARITHABORT="false" CONCAT_NULL_YIELDS_NULL="true" ANSI_NULLS="true" ANSI_PADDING="true" ANSI_WARNINGS="true" NUMERIC_ROUNDABORT="false" />
  8.           <QueryPlan DegreeOfParallelism="1" MemoryGrant="9304" CachedPlanSize="152" CompileTime="67" CompileCPU="67" CompileMemory="1752">
  9.             <MemoryGrantInfo SerialRequiredMemory="1024" SerialDesiredMemory="9304" RequiredMemory="1024" DesiredMemory="9304" RequestedMemory="9304" GrantWaitTime="0" GrantedMemory="9304" MaxUsedMemory="1088" />
  10.             <OptimizerHardwareDependentProperties EstimatedAvailableMemoryGrant="209690" EstimatedPagesCached="52422" EstimatedAvailableDegreeOfParallelism="2" />
  11.             <RelOp NodeId="0" PhysicalOp="Compute Scalar" LogicalOp="Compute Scalar" EstimateRows="100" EstimateIO="0" EstimateCPU="1e-005" AvgRowSize="532" EstimatedTotalSubtreeCost="9.94398" Parallel="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row">
  12.               <OutputList>
  13.                 <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="patient_guid" />
  14.                 <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="client_guid" />
  15.                 <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="patient_account_id" />
  16.                 <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="patient_name" />
  17.                 <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="rabies_tag_number" />
  18.                 <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="rabies_serial_number" />
  19.                 <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="rabies_brand_name" />
  20.                 <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="species" />
  21.                 <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="breed" />
  22.                 <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="coat_color" />
  23.                 <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="sex" />
  24.                 <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="birthdate" />
  25.                 <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="latest_visit" />
  26.                 <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="first_visit" />
  27.                 <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="maturity_code" />
  28.                 <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="medical_alert" />
  29.                 <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="chronic_ailment" />
  30.                 <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="continuous_medication" />
  31.                 <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="weight" />
  32.                 <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="doctor_preference" />
  33.                 <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="tattoo_number" />
  34.                 <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="avid_chip_number" />
  35.                 <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="comment" />
  36.                 <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="special_instructions" />
  37.                 <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="health_plan_name" />
  38.                 <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="deleted" />
  39.                 <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="has_lab_results" />
  40.                 <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="stable_id" />
  41.                 <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="trainer_id" />
  42.                 <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="deceased_date" />
  43.                 <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="active" />
  44.                 <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[clients]" Alias="[C]" Column="database_guid" />
  45.                 <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[clients]" Alias="[C]" Column="first_name" />
  46.                 <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[clients]" Alias="[C]" Column="last_name" />
  47.                 <ColumnReference Column="Expr1010" />
  48.               </OutputList>
  49.               <ComputeScalar>
  50.                 <DefinedValues>
  51.                   <DefinedValue>
  52.                     <ColumnReference Column="Expr1010" />
  53.                     <ScalarOperator ScalarString="[Expr1008]">
  54.                       <Identifier>
  55.                         <ColumnReference Column="Expr1008" />
  56.                       </Identifier>
  57.                     </ScalarOperator>
  58.                   </DefinedValue>
  59.                 </DefinedValues>
  60.                 <RelOp NodeId="1" PhysicalOp="Top" LogicalOp="Top" EstimateRows="100" EstimateIO="0" EstimateCPU="1e-005" AvgRowSize="532" EstimatedTotalSubtreeCost="9.94397" Parallel="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row">
  61.                   <OutputList>
  62.                     <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="patient_guid" />
  63.                     <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="client_guid" />
  64.                     <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="patient_account_id" />
  65.                     <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="patient_name" />
  66.                     <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="rabies_tag_number" />
  67.                     <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="rabies_serial_number" />
  68.                     <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="rabies_brand_name" />
  69.                     <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="species" />
  70.                     <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="breed" />
  71.                     <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="coat_color" />
  72.                     <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="sex" />
  73.                     <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="birthdate" />
  74.                     <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="latest_visit" />
  75.                     <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="first_visit" />
  76.                     <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="maturity_code" />
  77.                     <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="medical_alert" />
  78.                     <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="chronic_ailment" />
  79.                     <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="continuous_medication" />
  80.                     <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="weight" />
  81.                     <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="doctor_preference" />
  82.                     <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="tattoo_number" />
  83.                     <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="avid_chip_number" />
  84.                     <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="comment" />
  85.                     <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="special_instructions" />
  86.                     <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="health_plan_name" />
  87.                     <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="deleted" />
  88.                     <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="has_lab_results" />
  89.                     <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="stable_id" />
  90.                     <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="trainer_id" />
  91.                     <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="deceased_date" />
  92.                     <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="active" />
  93.                     <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[clients]" Alias="[C]" Column="database_guid" />
  94.                     <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[clients]" Alias="[C]" Column="first_name" />
  95.                     <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[clients]" Alias="[C]" Column="last_name" />
  96.                     <ColumnReference Column="Expr1008" />
  97.                   </OutputList>
  98.                   <RunTimeInformation>
  99.                     <RunTimeCountersPerThread Thread="0" ActualRows="50" ActualEndOfScans="1" ActualExecutions="1" />
  100.                   </RunTimeInformation>
  101.                   <Top RowCount="0" IsPercent="0" WithTies="0">
  102.                     <OffsetExpression>
  103.                       <ScalarOperator ScalarString="CONVERT_IMPLICIT(bigint,[@PageSize]*[@PageNumber],0)">
  104.                         <Identifier>
  105.                           <ColumnReference Column="ConstExpr1020">
  106.                             <ScalarOperator>
  107.                               <Convert DataType="bigint" Style="0" Implicit="1">
  108.                                 <ScalarOperator>
  109.                                   <Arithmetic Operation="MULT">
  110.                                     <ScalarOperator>
  111.                                       <Identifier>
  112.                                         <ColumnReference Column="@PageSize" />
  113.                                       </Identifier>
  114.                                     </ScalarOperator>
  115.                                     <ScalarOperator>
  116.                                       <Identifier>
  117.                                         <ColumnReference Column="@PageNumber" />
  118.                                       </Identifier>
  119.                                     </ScalarOperator>
  120.                                   </Arithmetic>
  121.                                 </ScalarOperator>
  122.                               </Convert>
  123.                             </ScalarOperator>
  124.                           </ColumnReference>
  125.                         </Identifier>
  126.                       </ScalarOperator>
  127.                     </OffsetExpression>
  128.                     <TopExpression>
  129.                       <ScalarOperator ScalarString="CONVERT_IMPLICIT(bigint,[@PageSize],0)">
  130.                         <Identifier>
  131.                           <ColumnReference Column="ConstExpr1019">
  132.                             <ScalarOperator>
  133.                               <Convert DataType="bigint" Style="0" Implicit="1">
  134.                                 <ScalarOperator>
  135.                                   <Identifier>
  136.                                     <ColumnReference Column="@PageSize" />
  137.                                   </Identifier>
  138.                                 </ScalarOperator>
  139.                               </Convert>
  140.                             </ScalarOperator>
  141.                           </ColumnReference>
  142.                         </Identifier>
  143.                       </ScalarOperator>
  144.                     </TopExpression>
  145.                     <RelOp NodeId="2" PhysicalOp="Nested Loops" LogicalOp="Inner Join" EstimateRows="100" EstimateIO="0" EstimateCPU="0.0760357" AvgRowSize="532" EstimatedTotalSubtreeCost="9.94396" Parallel="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row">
  146.                       <OutputList>
  147.                         <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="patient_guid" />
  148.                         <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="client_guid" />
  149.                         <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="patient_account_id" />
  150.                         <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="patient_name" />
  151.                         <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="rabies_tag_number" />
  152.                         <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="rabies_serial_number" />
  153.                         <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="rabies_brand_name" />
  154.                         <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="species" />
  155.                         <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="breed" />
  156.                         <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="coat_color" />
  157.                         <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="sex" />
  158.                         <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="birthdate" />
  159.                         <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="latest_visit" />
  160.                         <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="first_visit" />
  161.                         <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="maturity_code" />
  162.                         <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="medical_alert" />
  163.                         <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="chronic_ailment" />
  164.                         <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="continuous_medication" />
  165.                         <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="weight" />
  166.                         <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="doctor_preference" />
  167.                         <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="tattoo_number" />
  168.                         <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="avid_chip_number" />
  169.                         <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="comment" />
  170.                         <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="special_instructions" />
  171.                         <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="health_plan_name" />
  172.                         <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="deleted" />
  173.                         <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="has_lab_results" />
  174.                         <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="stable_id" />
  175.                         <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="trainer_id" />
  176.                         <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="deceased_date" />
  177.                         <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="active" />
  178.                         <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[clients]" Alias="[C]" Column="database_guid" />
  179.                         <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[clients]" Alias="[C]" Column="first_name" />
  180.                         <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[clients]" Alias="[C]" Column="last_name" />
  181.                         <ColumnReference Column="Expr1008" />
  182.                       </OutputList>
  183.                       <RunTimeInformation>
  184.                         <RunTimeCountersPerThread Thread="0" ActualRows="50" ActualEndOfScans="0" ActualExecutions="1" />
  185.                       </RunTimeInformation>
  186.                       <NestedLoops Optimized="0">
  187.                         <RelOp NodeId="3" PhysicalOp="Compute Scalar" LogicalOp="Compute Scalar" EstimateRows="1" EstimateIO="0" EstimateCPU="0.0109147" AvgRowSize="11" EstimatedTotalSubtreeCost="4.19726" Parallel="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row">
  188.                           <OutputList>
  189.                             <ColumnReference Column="Expr1008" />
  190.                           </OutputList>
  191.                           <ComputeScalar>
  192.                             <DefinedValues>
  193.                               <DefinedValue>
  194.                                 <ColumnReference Column="Expr1008" />
  195.                                 <ScalarOperator ScalarString="CONVERT_IMPLICIT(int,[Expr1027],0)">
  196.                                   <Convert DataType="int" Style="0" Implicit="1">
  197.                                     <ScalarOperator>
  198.                                       <Identifier>
  199.                                         <ColumnReference Column="Expr1027" />
  200.                                       </Identifier>
  201.                                     </ScalarOperator>
  202.                                   </Convert>
  203.                                 </ScalarOperator>
  204.                               </DefinedValue>
  205.                             </DefinedValues>
  206.                             <RelOp NodeId="4" PhysicalOp="Stream Aggregate" LogicalOp="Aggregate" EstimateRows="1" EstimateIO="0" EstimateCPU="0.0109147" AvgRowSize="11" EstimatedTotalSubtreeCost="4.19726" Parallel="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row">
  207.                               <OutputList>
  208.                                 <ColumnReference Column="Expr1027" />
  209.                               </OutputList>
  210.                               <RunTimeInformation>
  211.                                 <RunTimeCountersPerThread Thread="0" ActualRows="1" ActualEndOfScans="0" ActualExecutions="1" />
  212.                               </RunTimeInformation>
  213.                               <StreamAggregate>
  214.                                 <DefinedValues>
  215.                                   <DefinedValue>
  216.                                     <ColumnReference Column="Expr1027" />
  217.                                     <ScalarOperator ScalarString="Count(*)">
  218.                                       <Aggregate AggType="countstar" Distinct="0" />
  219.                                     </ScalarOperator>
  220.                                   </DefinedValue>
  221.                                 </DefinedValues>
  222.                                 <RelOp NodeId="5" PhysicalOp="Hash Match" LogicalOp="Inner Join" EstimateRows="18190.4" EstimateIO="0" EstimateCPU="2.25928" AvgRowSize="9" EstimatedTotalSubtreeCost="4.18635" Parallel="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row">
  223.                                   <OutputList />
  224.                                   <MemoryFractions Input="1" Output="1" />
  225.                                   <RunTimeInformation>
  226.                                     <RunTimeCountersPerThread Thread="0" ActualRows="75" ActualEndOfScans="1" ActualExecutions="1" />
  227.                                   </RunTimeInformation>
  228.                                   <Hash>
  229.                                     <DefinedValues />
  230.                                     <HashKeysBuild>
  231.                                       <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[clients]" Alias="[C]" Column="client_guid" />
  232.                                     </HashKeysBuild>
  233.                                     <HashKeysProbe>
  234.                                       <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="client_guid" />
  235.                                     </HashKeysProbe>
  236.                                     <ProbeResidual>
  237.                                       <ScalarOperator ScalarString="[MobileServices].[dbo].[clients].[client_guid] as [C].[client_guid]=[MobileServices].[dbo].[patients].[client_guid] as [P].[client_guid]">
  238.                                         <Compare CompareOp="EQ">
  239.                                           <ScalarOperator>
  240.                                             <Identifier>
  241.                                               <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[clients]" Alias="[C]" Column="client_guid" />
  242.                                             </Identifier>
  243.                                           </ScalarOperator>
  244.                                           <ScalarOperator>
  245.                                             <Identifier>
  246.                                               <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="client_guid" />
  247.                                             </Identifier>
  248.                                           </ScalarOperator>
  249.                                         </Compare>
  250.                                       </ScalarOperator>
  251.                                     </ProbeResidual>
  252.                                     <RelOp NodeId="6" PhysicalOp="Index Seek" LogicalOp="Index Seek" EstimateRows="16648.7" EstimateIO="0.0816799" EstimateCPU="0.0184706" AvgRowSize="23" EstimatedTotalSubtreeCost="0.100151" TableCardinality="5.07786e+006" Parallel="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row">
  253.                                       <OutputList>
  254.                                         <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[clients]" Alias="[C]" Column="client_guid" />
  255.                                       </OutputList>
  256.                                       <RunTimeInformation>
  257.                                         <RunTimeCountersPerThread Thread="0" ActualRows="1464" ActualEndOfScans="1" ActualExecutions="1" />
  258.                                       </RunTimeInformation>
  259.                                       <IndexScan Ordered="1" ScanDirection="FORWARD" ForcedIndex="0" ForceSeek="0" ForceScan="0" NoExpandHint="0" Storage="RowStore">
  260.                                         <DefinedValues>
  261.                                           <DefinedValue>
  262.                                             <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[clients]" Alias="[C]" Column="client_guid" />
  263.                                           </DefinedValue>
  264.                                         </DefinedValues>
  265.                                         <Object Database="[MobileServices]" Schema="[dbo]" Table="[clients]" Index="[IX_clients]" Alias="[C]" TableReferenceId="2" IndexKind="NonClustered" />
  266.                                         <SeekPredicates>
  267.                                           <SeekPredicateNew>
  268.                                             <SeekKeys>
  269.                                               <Prefix ScanType="EQ">
  270.                                                 <RangeColumns>
  271.                                                   <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[clients]" Alias="[C]" Column="database_guid" />
  272.                                                 </RangeColumns>
  273.                                                 <RangeExpressions>
  274.                                                   <ScalarOperator ScalarString="[@DatabaseGuid]">
  275.                                                     <Identifier>
  276.                                                       <ColumnReference Column="@DatabaseGuid" />
  277.                                                     </Identifier>
  278.                                                   </ScalarOperator>
  279.                                                 </RangeExpressions>
  280.                                               </Prefix>
  281.                                             </SeekKeys>
  282.                                           </SeekPredicateNew>
  283.                                         </SeekPredicates>
  284.                                       </IndexScan>
  285.                                     </RelOp>
  286.                                     <RelOp NodeId="7" PhysicalOp="Nested Loops" LogicalOp="Inner Join" EstimateRows="283916" EstimateIO="1.26461" EstimateCPU="0.312464" AvgRowSize="33" EstimatedTotalSubtreeCost="1.57707" TableCardinality="1.05638e+007" Parallel="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row">
  287.                                       <OutputList>
  288.                                         <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="client_guid" />
  289.                                       </OutputList>
  290.                                       <RunTimeInformation>
  291.                                         <RunTimeCountersPerThread Thread="0" ActualRows="110555" ActualEndOfScans="1" ActualExecutions="1" />
  292.                                       </RunTimeInformation>
  293.                                       <NestedLoops Optimized="0">
  294.                                         <OuterReferences>
  295.                                           <ColumnReference Column="Expr1024" />
  296.                                           <ColumnReference Column="Expr1025" />
  297.                                           <ColumnReference Column="Expr1026" />
  298.                                         </OuterReferences>
  299.                                         <RelOp NodeId="8" PhysicalOp="Compute Scalar" LogicalOp="Compute Scalar" EstimateRows="1" EstimateIO="0" EstimateCPU="0" AvgRowSize="69" EstimatedTotalSubtreeCost="0" Parallel="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row">
  300.                                           <OutputList>
  301.                                             <ColumnReference Column="Expr1024" />
  302.                                             <ColumnReference Column="Expr1025" />
  303.                                             <ColumnReference Column="Expr1026" />
  304.                                           </OutputList>
  305.                                           <ComputeScalar>
  306.                                             <DefinedValues>
  307.                                               <DefinedValue>
  308.                                                 <ColumnReference Column="Expr1024" />
  309.                                                 <ScalarOperator ScalarString="LikeRangeStart('%'+[@SearchText]+'%')">
  310.                                                   <Identifier>
  311.                                                     <ColumnReference Column="ConstExpr1016">
  312.                                                       <ScalarOperator>
  313.                                                         <Intrinsic FunctionName="LikeRangeStart">
  314.                                                           <ScalarOperator>
  315.                                                             <Arithmetic Operation="ADD">
  316.                                                               <ScalarOperator>
  317.                                                                 <Arithmetic Operation="ADD">
  318.                                                                   <ScalarOperator>
  319.                                                                     <Const ConstValue="'%'" />
  320.                                                                   </ScalarOperator>
  321.                                                                   <ScalarOperator>
  322.                                                                     <Identifier>
  323.                                                                       <ColumnReference Column="@SearchText" />
  324.                                                                     </Identifier>
  325.                                                                   </ScalarOperator>
  326.                                                                 </Arithmetic>
  327.                                                               </ScalarOperator>
  328.                                                               <ScalarOperator>
  329.                                                                 <Const ConstValue="'%'" />
  330.                                                               </ScalarOperator>
  331.                                                             </Arithmetic>
  332.                                                           </ScalarOperator>
  333.                                                           <ScalarOperator>
  334.                                                             <Const ConstValue="" />
  335.                                                           </ScalarOperator>
  336.                                                         </Intrinsic>
  337.                                                       </ScalarOperator>
  338.                                                     </ColumnReference>
  339.                                                   </Identifier>
  340.                                                 </ScalarOperator>
  341.                                               </DefinedValue>
  342.                                               <DefinedValue>
  343.                                                 <ColumnReference Column="Expr1025" />
  344.                                                 <ScalarOperator ScalarString="LikeRangeEnd('%'+[@SearchText]+'%')">
  345.                                                   <Identifier>
  346.                                                     <ColumnReference Column="ConstExpr1017">
  347.                                                       <ScalarOperator>
  348.                                                         <Intrinsic FunctionName="LikeRangeEnd">
  349.                                                           <ScalarOperator>
  350.                                                             <Arithmetic Operation="ADD">
  351.                                                               <ScalarOperator>
  352.                                                                 <Arithmetic Operation="ADD">
  353.                                                                   <ScalarOperator>
  354.                                                                     <Const ConstValue="'%'" />
  355.                                                                   </ScalarOperator>
  356.                                                                   <ScalarOperator>
  357.                                                                     <Identifier>
  358.                                                                       <ColumnReference Column="@SearchText" />
  359.                                                                     </Identifier>
  360.                                                                   </ScalarOperator>
  361.                                                                 </Arithmetic>
  362.                                                               </ScalarOperator>
  363.                                                               <ScalarOperator>
  364.                                                                 <Const ConstValue="'%'" />
  365.                                                               </ScalarOperator>
  366.                                                             </Arithmetic>
  367.                                                           </ScalarOperator>
  368.                                                           <ScalarOperator>
  369.                                                             <Const ConstValue="" />
  370.                                                           </ScalarOperator>
  371.                                                         </Intrinsic>
  372.                                                       </ScalarOperator>
  373.                                                     </ColumnReference>
  374.                                                   </Identifier>
  375.                                                 </ScalarOperator>
  376.                                               </DefinedValue>
  377.                                               <DefinedValue>
  378.                                                 <ColumnReference Column="Expr1026" />
  379.                                                 <ScalarOperator ScalarString="LikeRangeInfo('%'+[@SearchText]+'%')">
  380.                                                   <Identifier>
  381.                                                     <ColumnReference Column="ConstExpr1018">
  382.                                                       <ScalarOperator>
  383.                                                         <Intrinsic FunctionName="LikeRangeInfo">
  384.                                                           <ScalarOperator>
  385.                                                             <Arithmetic Operation="ADD">
  386.                                                               <ScalarOperator>
  387.                                                                 <Arithmetic Operation="ADD">
  388.                                                                   <ScalarOperator>
  389.                                                                     <Const ConstValue="'%'" />
  390.                                                                   </ScalarOperator>
  391.                                                                   <ScalarOperator>
  392.                                                                     <Identifier>
  393.                                                                       <ColumnReference Column="@SearchText" />
  394.                                                                     </Identifier>
  395.                                                                   </ScalarOperator>
  396.                                                                 </Arithmetic>
  397.                                                               </ScalarOperator>
  398.                                                               <ScalarOperator>
  399.                                                                 <Const ConstValue="'%'" />
  400.                                                               </ScalarOperator>
  401.                                                             </Arithmetic>
  402.                                                           </ScalarOperator>
  403.                                                           <ScalarOperator>
  404.                                                             <Const ConstValue="" />
  405.                                                           </ScalarOperator>
  406.                                                         </Intrinsic>
  407.                                                       </ScalarOperator>
  408.                                                     </ColumnReference>
  409.                                                   </Identifier>
  410.                                                 </ScalarOperator>
  411.                                               </DefinedValue>
  412.                                             </DefinedValues>
  413.                                             <RelOp NodeId="9" PhysicalOp="Constant Scan" LogicalOp="Constant Scan" EstimateRows="1" EstimateIO="0" EstimateCPU="0" AvgRowSize="0" EstimatedTotalSubtreeCost="0" Parallel="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row">
  414.                                               <OutputList />
  415.                                               <RunTimeInformation>
  416.                                                 <RunTimeCountersPerThread Thread="0" ActualRows="1" ActualEndOfScans="1" ActualExecutions="1" />
  417.                                               </RunTimeInformation>
  418.                                               <ConstantScan />
  419.                                             </RelOp>
  420.                                           </ComputeScalar>
  421.                                         </RelOp>
  422.                                         <RelOp NodeId="17" PhysicalOp="Index Seek" LogicalOp="Index Seek" EstimateRows="283916" EstimateIO="1.26461" EstimateCPU="0.312464" AvgRowSize="33" EstimatedTotalSubtreeCost="1.57707" TableCardinality="1.05638e+007" Parallel="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row">
  423.                                           <OutputList>
  424.                                             <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="client_guid" />
  425.                                           </OutputList>
  426.                                           <RunTimeInformation>
  427.                                             <RunTimeCountersPerThread Thread="0" ActualRows="110555" ActualEndOfScans="1" ActualExecutions="1" />
  428.                                           </RunTimeInformation>
  429.                                           <IndexScan Ordered="1" ScanDirection="FORWARD" ForcedIndex="0" ForceSeek="0" ForceScan="0" NoExpandHint="0" Storage="RowStore">
  430.                                             <DefinedValues>
  431.                                               <DefinedValue>
  432.                                                 <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="client_guid" />
  433.                                               </DefinedValue>
  434.                                             </DefinedValues>
  435.                                             <Object Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Index="[_dta_index_patients_17_1479676319__K5_3]" Alias="[P]" TableReferenceId="2" IndexKind="NonClustered" />
  436.                                             <SeekPredicates>
  437.                                               <SeekPredicateNew>
  438.                                                 <SeekKeys>
  439.                                                   <StartRange ScanType="GT">
  440.                                                     <RangeColumns>
  441.                                                       <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="patient_name" />
  442.                                                     </RangeColumns>
  443.                                                     <RangeExpressions>
  444.                                                       <ScalarOperator ScalarString="[Expr1024]">
  445.                                                         <Identifier>
  446.                                                           <ColumnReference Column="Expr1024" />
  447.                                                         </Identifier>
  448.                                                       </ScalarOperator>
  449.                                                     </RangeExpressions>
  450.                                                   </StartRange>
  451.                                                   <EndRange ScanType="LT">
  452.                                                     <RangeColumns>
  453.                                                       <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="patient_name" />
  454.                                                     </RangeColumns>
  455.                                                     <RangeExpressions>
  456.                                                       <ScalarOperator ScalarString="[Expr1025]">
  457.                                                         <Identifier>
  458.                                                           <ColumnReference Column="Expr1025" />
  459.                                                         </Identifier>
  460.                                                       </ScalarOperator>
  461.                                                     </RangeExpressions>
  462.                                                   </EndRange>
  463.                                                 </SeekKeys>
  464.                                               </SeekPredicateNew>
  465.                                             </SeekPredicates>
  466.                                             <Predicate>
  467.                                               <ScalarOperator ScalarString="[MobileServices].[dbo].[patients].[patient_name] as [P].[patient_name] like '%'+[@SearchText]+'%'">
  468.                                                 <Intrinsic FunctionName="like">
  469.                                                   <ScalarOperator>
  470.                                                     <Identifier>
  471.                                                       <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="patient_name" />
  472.                                                     </Identifier>
  473.                                                   </ScalarOperator>
  474.                                                   <ScalarOperator>
  475.                                                     <Identifier>
  476.                                                       <ColumnReference Column="ConstExpr1015">
  477.                                                         <ScalarOperator>
  478.                                                           <Arithmetic Operation="ADD">
  479.                                                             <ScalarOperator>
  480.                                                               <Arithmetic Operation="ADD">
  481.                                                                 <ScalarOperator>
  482.                                                                   <Const ConstValue="'%'" />
  483.                                                                 </ScalarOperator>
  484.                                                                 <ScalarOperator>
  485.                                                                   <Identifier>
  486.                                                                     <ColumnReference Column="@SearchText" />
  487.                                                                   </Identifier>
  488.                                                                 </ScalarOperator>
  489.                                                               </Arithmetic>
  490.                                                             </ScalarOperator>
  491.                                                             <ScalarOperator>
  492.                                                               <Const ConstValue="'%'" />
  493.                                                             </ScalarOperator>
  494.                                                           </Arithmetic>
  495.                                                         </ScalarOperator>
  496.                                                       </ColumnReference>
  497.                                                     </Identifier>
  498.                                                   </ScalarOperator>
  499.                                                 </Intrinsic>
  500.                                               </ScalarOperator>
  501.                                             </Predicate>
  502.                                           </IndexScan>
  503.                                         </RelOp>
  504.                                       </NestedLoops>
  505.                                     </RelOp>
  506.                                   </Hash>
  507.                                 </RelOp>
  508.                               </StreamAggregate>
  509.                             </RelOp>
  510.                           </ComputeScalar>
  511.                         </RelOp>
  512.                         <RelOp NodeId="23" PhysicalOp="Nested Loops" LogicalOp="Inner Join" EstimateRows="100" EstimateIO="0" EstimateCPU="1.18677" AvgRowSize="528" EstimatedTotalSubtreeCost="5.74628" Parallel="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row">
  513.                           <OutputList>
  514.                             <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="patient_guid" />
  515.                             <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="client_guid" />
  516.                             <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="patient_account_id" />
  517.                             <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="patient_name" />
  518.                             <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="rabies_tag_number" />
  519.                             <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="rabies_serial_number" />
  520.                             <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="rabies_brand_name" />
  521.                             <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="species" />
  522.                             <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="breed" />
  523.                             <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="coat_color" />
  524.                             <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="sex" />
  525.                             <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="birthdate" />
  526.                             <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="latest_visit" />
  527.                             <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="first_visit" />
  528.                             <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="maturity_code" />
  529.                             <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="medical_alert" />
  530.                             <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="chronic_ailment" />
  531.                             <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="continuous_medication" />
  532.                             <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="weight" />
  533.                             <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="doctor_preference" />
  534.                             <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="tattoo_number" />
  535.                             <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="avid_chip_number" />
  536.                             <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="comment" />
  537.                             <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="special_instructions" />
  538.                             <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="health_plan_name" />
  539.                             <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="deleted" />
  540.                             <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="has_lab_results" />
  541.                             <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="stable_id" />
  542.                             <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="trainer_id" />
  543.                             <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="deceased_date" />
  544.                             <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="active" />
  545.                             <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[clients]" Alias="[C]" Column="database_guid" />
  546.                             <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[clients]" Alias="[C]" Column="first_name" />
  547.                             <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[clients]" Alias="[C]" Column="last_name" />
  548.                           </OutputList>
  549.                           <RunTimeInformation>
  550.                             <RunTimeCountersPerThread Thread="0" ActualRows="50" ActualEndOfScans="0" ActualExecutions="1" />
  551.                           </RunTimeInformation>
  552.                           <NestedLoops Optimized="0" WithOrderedPrefetch="1">
  553.                             <OuterReferences>
  554.                               <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="client_guid" />
  555.                               <ColumnReference Column="Expr1032" />
  556.                             </OuterReferences>
  557.                             <RelOp NodeId="25" PhysicalOp="Nested Loops" LogicalOp="Inner Join" EstimateRows="1560.8" EstimateIO="0" EstimateCPU="1.18677" AvgRowSize="495" EstimatedTotalSubtreeCost="5.1355" Parallel="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row">
  558.                               <OutputList>
  559.                                 <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="patient_guid" />
  560.                                 <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="client_guid" />
  561.                                 <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="patient_account_id" />
  562.                                 <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="patient_name" />
  563.                                 <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="rabies_tag_number" />
  564.                                 <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="rabies_serial_number" />
  565.                                 <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="rabies_brand_name" />
  566.                                 <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="species" />
  567.                                 <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="breed" />
  568.                                 <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="coat_color" />
  569.                                 <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="sex" />
  570.                                 <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="birthdate" />
  571.                                 <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="latest_visit" />
  572.                                 <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="first_visit" />
  573.                                 <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="maturity_code" />
  574.                                 <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="medical_alert" />
  575.                                 <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="chronic_ailment" />
  576.                                 <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="continuous_medication" />
  577.                                 <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="weight" />
  578.                                 <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="doctor_preference" />
  579.                                 <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="tattoo_number" />
  580.                                 <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="avid_chip_number" />
  581.                                 <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="comment" />
  582.                                 <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="special_instructions" />
  583.                                 <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="health_plan_name" />
  584.                                 <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="deleted" />
  585.                                 <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="has_lab_results" />
  586.                                 <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="stable_id" />
  587.                                 <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="trainer_id" />
  588.                                 <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="deceased_date" />
  589.                                 <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="active" />
  590.                               </OutputList>
  591.                               <RunTimeInformation>
  592.                                 <RunTimeCountersPerThread Thread="0" ActualRows="77753" ActualEndOfScans="0" ActualExecutions="1" />
  593.                               </RunTimeInformation>
  594.                               <NestedLoops Optimized="0" WithOrderedPrefetch="1">
  595.                                 <OuterReferences>
  596.                                   <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="patient_guid" />
  597.                                   <ColumnReference Column="Expr1031" />
  598.                                 </OuterReferences>
  599.                                 <RelOp NodeId="27" PhysicalOp="Nested Loops" LogicalOp="Inner Join" EstimateRows="1560.8" EstimateIO="0.846829" EstimateCPU="0.312464" AvgRowSize="33" EstimatedTotalSubtreeCost="0.00963412" TableCardinality="1.05638e+007" Parallel="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row">
  600.                                   <OutputList>
  601.                                     <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="patient_guid" />
  602.                                     <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="patient_name" />
  603.                                   </OutputList>
  604.                                   <RunTimeInformation>
  605.                                     <RunTimeCountersPerThread Thread="0" ActualRows="77753" ActualEndOfScans="0" ActualExecutions="1" />
  606.                                   </RunTimeInformation>
  607.                                   <NestedLoops Optimized="0">
  608.                                     <OuterReferences>
  609.                                       <ColumnReference Column="Expr1028" />
  610.                                       <ColumnReference Column="Expr1029" />
  611.                                       <ColumnReference Column="Expr1030" />
  612.                                     </OuterReferences>
  613.                                     <RelOp NodeId="28" PhysicalOp="Compute Scalar" LogicalOp="Compute Scalar" EstimateRows="1" EstimateIO="0" EstimateCPU="0" AvgRowSize="69" EstimatedTotalSubtreeCost="0" Parallel="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row">
  614.                                       <OutputList>
  615.                                         <ColumnReference Column="Expr1028" />
  616.                                         <ColumnReference Column="Expr1029" />
  617.                                         <ColumnReference Column="Expr1030" />
  618.                                       </OutputList>
  619.                                       <ComputeScalar>
  620.                                         <DefinedValues>
  621.                                           <DefinedValue>
  622.                                             <ColumnReference Column="Expr1028" />
  623.                                             <ScalarOperator ScalarString="LikeRangeStart('%'+[@SearchText]+'%')">
  624.                                               <Identifier>
  625.                                                 <ColumnReference Column="ConstExpr1012">
  626.                                                   <ScalarOperator>
  627.                                                     <Intrinsic FunctionName="LikeRangeStart">
  628.                                                       <ScalarOperator>
  629.                                                         <Arithmetic Operation="ADD">
  630.                                                           <ScalarOperator>
  631.                                                             <Arithmetic Operation="ADD">
  632.                                                               <ScalarOperator>
  633.                                                                 <Const ConstValue="'%'" />
  634.                                                               </ScalarOperator>
  635.                                                               <ScalarOperator>
  636.                                                                 <Identifier>
  637.                                                                   <ColumnReference Column="@SearchText" />
  638.                                                                 </Identifier>
  639.                                                               </ScalarOperator>
  640.                                                             </Arithmetic>
  641.                                                           </ScalarOperator>
  642.                                                           <ScalarOperator>
  643.                                                             <Const ConstValue="'%'" />
  644.                                                           </ScalarOperator>
  645.                                                         </Arithmetic>
  646.                                                       </ScalarOperator>
  647.                                                       <ScalarOperator>
  648.                                                         <Const ConstValue="" />
  649.                                                       </ScalarOperator>
  650.                                                     </Intrinsic>
  651.                                                   </ScalarOperator>
  652.                                                 </ColumnReference>
  653.                                               </Identifier>
  654.                                             </ScalarOperator>
  655.                                           </DefinedValue>
  656.                                           <DefinedValue>
  657.                                             <ColumnReference Column="Expr1029" />
  658.                                             <ScalarOperator ScalarString="LikeRangeEnd('%'+[@SearchText]+'%')">
  659.                                               <Identifier>
  660.                                                 <ColumnReference Column="ConstExpr1013">
  661.                                                   <ScalarOperator>
  662.                                                     <Intrinsic FunctionName="LikeRangeEnd">
  663.                                                       <ScalarOperator>
  664.                                                         <Arithmetic Operation="ADD">
  665.                                                           <ScalarOperator>
  666.                                                             <Arithmetic Operation="ADD">
  667.                                                               <ScalarOperator>
  668.                                                                 <Const ConstValue="'%'" />
  669.                                                               </ScalarOperator>
  670.                                                               <ScalarOperator>
  671.                                                                 <Identifier>
  672.                                                                   <ColumnReference Column="@SearchText" />
  673.                                                                 </Identifier>
  674.                                                               </ScalarOperator>
  675.                                                             </Arithmetic>
  676.                                                           </ScalarOperator>
  677.                                                           <ScalarOperator>
  678.                                                             <Const ConstValue="'%'" />
  679.                                                           </ScalarOperator>
  680.                                                         </Arithmetic>
  681.                                                       </ScalarOperator>
  682.                                                       <ScalarOperator>
  683.                                                         <Const ConstValue="" />
  684.                                                       </ScalarOperator>
  685.                                                     </Intrinsic>
  686.                                                   </ScalarOperator>
  687.                                                 </ColumnReference>
  688.                                               </Identifier>
  689.                                             </ScalarOperator>
  690.                                           </DefinedValue>
  691.                                           <DefinedValue>
  692.                                             <ColumnReference Column="Expr1030" />
  693.                                             <ScalarOperator ScalarString="LikeRangeInfo('%'+[@SearchText]+'%')">
  694.                                               <Identifier>
  695.                                                 <ColumnReference Column="ConstExpr1014">
  696.                                                   <ScalarOperator>
  697.                                                     <Intrinsic FunctionName="LikeRangeInfo">
  698.                                                       <ScalarOperator>
  699.                                                         <Arithmetic Operation="ADD">
  700.                                                           <ScalarOperator>
  701.                                                             <Arithmetic Operation="ADD">
  702.                                                               <ScalarOperator>
  703.                                                                 <Const ConstValue="'%'" />
  704.                                                               </ScalarOperator>
  705.                                                               <ScalarOperator>
  706.                                                                 <Identifier>
  707.                                                                   <ColumnReference Column="@SearchText" />
  708.                                                                 </Identifier>
  709.                                                               </ScalarOperator>
  710.                                                             </Arithmetic>
  711.                                                           </ScalarOperator>
  712.                                                           <ScalarOperator>
  713.                                                             <Const ConstValue="'%'" />
  714.                                                           </ScalarOperator>
  715.                                                         </Arithmetic>
  716.                                                       </ScalarOperator>
  717.                                                       <ScalarOperator>
  718.                                                         <Const ConstValue="" />
  719.                                                       </ScalarOperator>
  720.                                                     </Intrinsic>
  721.                                                   </ScalarOperator>
  722.                                                 </ColumnReference>
  723.                                               </Identifier>
  724.                                             </ScalarOperator>
  725.                                           </DefinedValue>
  726.                                         </DefinedValues>
  727.                                         <RelOp NodeId="29" PhysicalOp="Constant Scan" LogicalOp="Constant Scan" EstimateRows="1" EstimateIO="0" EstimateCPU="0" AvgRowSize="0" EstimatedTotalSubtreeCost="0" Parallel="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row">
  728.                                           <OutputList />
  729.                                           <RunTimeInformation>
  730.                                             <RunTimeCountersPerThread Thread="0" ActualRows="1" ActualEndOfScans="0" ActualExecutions="1" />
  731.                                           </RunTimeInformation>
  732.                                           <ConstantScan />
  733.                                         </RelOp>
  734.                                       </ComputeScalar>
  735.                                     </RelOp>
  736.                                     <RelOp NodeId="37" PhysicalOp="Index Seek" LogicalOp="Index Seek" EstimateRows="1560.8" EstimateIO="0.846829" EstimateCPU="0.312464" AvgRowSize="33" EstimatedTotalSubtreeCost="0.00963412" TableCardinality="1.05638e+007" Parallel="0" EstimateRebinds="0" EstimateRewinds="0" EstimatedExecutionMode="Row">
  737.                                       <OutputList>
  738.                                         <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="patient_guid" />
  739.                                         <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="patient_name" />
  740.                                       </OutputList>
  741.                                       <RunTimeInformation>
  742.                                         <RunTimeCountersPerThread Thread="0" ActualRows="77753" ActualEndOfScans="0" ActualExecutions="1" />
  743.                                       </RunTimeInformation>
  744.                                       <IndexScan Ordered="1" ScanDirection="FORWARD" ForcedIndex="0" ForceSeek="0" ForceScan="0" NoExpandHint="0" Storage="RowStore">
  745.                                         <DefinedValues>
  746.                                           <DefinedValue>
  747.                                             <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="patient_guid" />
  748.                                           </DefinedValue>
  749.                                           <DefinedValue>
  750.                                             <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="patient_name" />
  751.                                           </DefinedValue>
  752.                                         </DefinedValues>
  753.                                         <Object Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Index="[_dta_index_patients_17_1479676319__K5]" Alias="[P]" TableReferenceId="1" IndexKind="NonClustered" />
  754.                                         <SeekPredicates>
  755.                                           <SeekPredicateNew>
  756.                                             <SeekKeys>
  757.                                               <StartRange ScanType="GT">
  758.                                                 <RangeColumns>
  759.                                                   <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="patient_name" />
  760.                                                 </RangeColumns>
  761.                                                 <RangeExpressions>
  762.                                                   <ScalarOperator ScalarString="[Expr1028]">
  763.                                                     <Identifier>
  764.                                                       <ColumnReference Column="Expr1028" />
  765.                                                     </Identifier>
  766.                                                   </ScalarOperator>
  767.                                                 </RangeExpressions>
  768.                                               </StartRange>
  769.                                               <EndRange ScanType="LT">
  770.                                                 <RangeColumns>
  771.                                                   <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="patient_name" />
  772.                                                 </RangeColumns>
  773.                                                 <RangeExpressions>
  774.                                                   <ScalarOperator ScalarString="[Expr1029]">
  775.                                                     <Identifier>
  776.                                                       <ColumnReference Column="Expr1029" />
  777.                                                     </Identifier>
  778.                                                   </ScalarOperator>
  779.                                                 </RangeExpressions>
  780.                                               </EndRange>
  781.                                             </SeekKeys>
  782.                                           </SeekPredicateNew>
  783.                                         </SeekPredicates>
  784.                                         <Predicate>
  785.                                           <ScalarOperator ScalarString="[MobileServices].[dbo].[patients].[patient_name] as [P].[patient_name] like '%'+[@SearchText]+'%'">
  786.                                             <Intrinsic FunctionName="like">
  787.                                               <ScalarOperator>
  788.                                                 <Identifier>
  789.                                                   <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="patient_name" />
  790.                                                 </Identifier>
  791.                                               </ScalarOperator>
  792.                                               <ScalarOperator>
  793.                                                 <Identifier>
  794.                                                   <ColumnReference Column="ConstExpr1011">
  795.                                                     <ScalarOperator>
  796.                                                       <Arithmetic Operation="ADD">
  797.                                                         <ScalarOperator>
  798.                                                           <Arithmetic Operation="ADD">
  799.                                                             <ScalarOperator>
  800.                                                               <Const ConstValue="'%'" />
  801.                                                             </ScalarOperator>
  802.                                                             <ScalarOperator>
  803.                                                               <Identifier>
  804.                                                                 <ColumnReference Column="@SearchText" />
  805.                                                               </Identifier>
  806.                                                             </ScalarOperator>
  807.                                                           </Arithmetic>
  808.                                                         </ScalarOperator>
  809.                                                         <ScalarOperator>
  810.                                                           <Const ConstValue="'%'" />
  811.                                                         </ScalarOperator>
  812.                                                       </Arithmetic>
  813.                                                     </ScalarOperator>
  814.                                                   </ColumnReference>
  815.                                                 </Identifier>
  816.                                               </ScalarOperator>
  817.                                             </Intrinsic>
  818.                                           </ScalarOperator>
  819.                                         </Predicate>
  820.                                       </IndexScan>
  821.                                     </RelOp>
  822.                                   </NestedLoops>
  823.                                 </RelOp>
  824.                                 <RelOp NodeId="39" PhysicalOp="Clustered Index Seek" LogicalOp="Clustered Index Seek" EstimateRows="1" EstimateIO="0.003125" EstimateCPU="0.0001581" AvgRowSize="477" EstimatedTotalSubtreeCost="5.11798" TableCardinality="1.05638e+007" Parallel="0" EstimateRebinds="1560.8" EstimateRewinds="0" EstimatedExecutionMode="Row">
  825.                                   <OutputList>
  826.                                     <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="client_guid" />
  827.                                     <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="patient_account_id" />
  828.                                     <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="rabies_tag_number" />
  829.                                     <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="rabies_serial_number" />
  830.                                     <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="rabies_brand_name" />
  831.                                     <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="species" />
  832.                                     <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="breed" />
  833.                                     <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="coat_color" />
  834.                                     <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="sex" />
  835.                                     <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="birthdate" />
  836.                                     <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="latest_visit" />
  837.                                     <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="first_visit" />
  838.                                     <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="maturity_code" />
  839.                                     <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="medical_alert" />
  840.                                     <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="chronic_ailment" />
  841.                                     <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="continuous_medication" />
  842.                                     <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="weight" />
  843.                                     <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="doctor_preference" />
  844.                                     <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="tattoo_number" />
  845.                                     <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="avid_chip_number" />
  846.                                     <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="comment" />
  847.                                     <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="special_instructions" />
  848.                                     <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="health_plan_name" />
  849.                                     <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="deleted" />
  850.                                     <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="has_lab_results" />
  851.                                     <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="stable_id" />
  852.                                     <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="trainer_id" />
  853.                                     <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="deceased_date" />
  854.                                     <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="active" />
  855.                                   </OutputList>
  856.                                   <RunTimeInformation>
  857.                                     <RunTimeCountersPerThread Thread="0" ActualRows="77753" ActualEndOfScans="0" ActualExecutions="77753" />
  858.                                   </RunTimeInformation>
  859.                                   <IndexScan Lookup="1" Ordered="1" ScanDirection="FORWARD" ForcedIndex="0" ForceSeek="0" ForceScan="0" NoExpandHint="0" Storage="RowStore">
  860.                                     <DefinedValues>
  861.                                       <DefinedValue>
  862.                                         <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="client_guid" />
  863.                                       </DefinedValue>
  864.                                       <DefinedValue>
  865.                                         <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="patient_account_id" />
  866.                                       </DefinedValue>
  867.                                       <DefinedValue>
  868.                                         <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="rabies_tag_number" />
  869.                                       </DefinedValue>
  870.                                       <DefinedValue>
  871.                                         <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="rabies_serial_number" />
  872.                                       </DefinedValue>
  873.                                       <DefinedValue>
  874.                                         <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="rabies_brand_name" />
  875.                                       </DefinedValue>
  876.                                       <DefinedValue>
  877.                                         <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="species" />
  878.                                       </DefinedValue>
  879.                                       <DefinedValue>
  880.                                         <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="breed" />
  881.                                       </DefinedValue>
  882.                                       <DefinedValue>
  883.                                         <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="coat_color" />
  884.                                       </DefinedValue>
  885.                                       <DefinedValue>
  886.                                         <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="sex" />
  887.                                       </DefinedValue>
  888.                                       <DefinedValue>
  889.                                         <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="birthdate" />
  890.                                       </DefinedValue>
  891.                                       <DefinedValue>
  892.                                         <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="latest_visit" />
  893.                                       </DefinedValue>
  894.                                       <DefinedValue>
  895.                                         <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="first_visit" />
  896.                                       </DefinedValue>
  897.                                       <DefinedValue>
  898.                                         <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="maturity_code" />
  899.                                       </DefinedValue>
  900.                                       <DefinedValue>
  901.                                         <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="medical_alert" />
  902.                                       </DefinedValue>
  903.                                       <DefinedValue>
  904.                                         <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="chronic_ailment" />
  905.                                       </DefinedValue>
  906.                                       <DefinedValue>
  907.                                         <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="continuous_medication" />
  908.                                       </DefinedValue>
  909.                                       <DefinedValue>
  910.                                         <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="weight" />
  911.                                       </DefinedValue>
  912.                                       <DefinedValue>
  913.                                         <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="doctor_preference" />
  914.                                       </DefinedValue>
  915.                                       <DefinedValue>
  916.                                         <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="tattoo_number" />
  917.                                       </DefinedValue>
  918.                                       <DefinedValue>
  919.                                         <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="avid_chip_number" />
  920.                                       </DefinedValue>
  921.                                       <DefinedValue>
  922.                                         <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="comment" />
  923.                                       </DefinedValue>
  924.                                       <DefinedValue>
  925.                                         <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="special_instructions" />
  926.                                       </DefinedValue>
  927.                                       <DefinedValue>
  928.                                         <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="health_plan_name" />
  929.                                       </DefinedValue>
  930.                                       <DefinedValue>
  931.                                         <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="deleted" />
  932.                                       </DefinedValue>
  933.                                       <DefinedValue>
  934.                                         <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="has_lab_results" />
  935.                                       </DefinedValue>
  936.                                       <DefinedValue>
  937.                                         <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="stable_id" />
  938.                                       </DefinedValue>
  939.                                       <DefinedValue>
  940.                                         <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="trainer_id" />
  941.                                       </DefinedValue>
  942.                                       <DefinedValue>
  943.                                         <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="deceased_date" />
  944.                                       </DefinedValue>
  945.                                       <DefinedValue>
  946.                                         <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="active" />
  947.                                       </DefinedValue>
  948.                                     </DefinedValues>
  949.                                     <Object Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Index="[PK_patients]" Alias="[P]" TableReferenceId="-1" IndexKind="Clustered" />
  950.                                     <SeekPredicates>
  951.                                       <SeekPredicateNew>
  952.                                         <SeekKeys>
  953.                                           <Prefix ScanType="EQ">
  954.                                             <RangeColumns>
  955.                                               <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="patient_guid" />
  956.                                             </RangeColumns>
  957.                                             <RangeExpressions>
  958.                                               <ScalarOperator ScalarString="[MobileServices].[dbo].[patients].[patient_guid] as [P].[patient_guid]">
  959.                                                 <Identifier>
  960.                                                   <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="patient_guid" />
  961.                                                 </Identifier>
  962.                                               </ScalarOperator>
  963.                                             </RangeExpressions>
  964.                                           </Prefix>
  965.                                         </SeekKeys>
  966.                                       </SeekPredicateNew>
  967.                                     </SeekPredicates>
  968.                                   </IndexScan>
  969.                                 </RelOp>
  970.                               </NestedLoops>
  971.                             </RelOp>
  972.                             <RelOp NodeId="99" PhysicalOp="Index Seek" LogicalOp="Index Seek" EstimateRows="1" EstimateIO="0.003125" EstimateCPU="0.0001581" AvgRowSize="41" EstimatedTotalSubtreeCost="0.619433" TableCardinality="5.07786e+006" Parallel="0" EstimateRebinds="1600" EstimateRewinds="0.219897" EstimatedExecutionMode="Row">
  973.                               <OutputList>
  974.                                 <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[clients]" Alias="[C]" Column="database_guid" />
  975.                                 <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[clients]" Alias="[C]" Column="first_name" />
  976.                                 <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[clients]" Alias="[C]" Column="last_name" />
  977.                               </OutputList>
  978.                               <RunTimeInformation>
  979.                                 <RunTimeCountersPerThread Thread="0" ActualRows="50" ActualEndOfScans="77703" ActualExecutions="77753" />
  980.                               </RunTimeInformation>
  981.                               <IndexScan Ordered="1" ScanDirection="FORWARD" ForcedIndex="0" ForceSeek="0" ForceScan="0" NoExpandHint="0" Storage="RowStore">
  982.                                 <DefinedValues>
  983.                                   <DefinedValue>
  984.                                     <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[clients]" Alias="[C]" Column="database_guid" />
  985.                                   </DefinedValue>
  986.                                   <DefinedValue>
  987.                                     <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[clients]" Alias="[C]" Column="first_name" />
  988.                                   </DefinedValue>
  989.                                   <DefinedValue>
  990.                                     <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[clients]" Alias="[C]" Column="last_name" />
  991.                                   </DefinedValue>
  992.                                 </DefinedValues>
  993.                                 <Object Database="[MobileServices]" Schema="[dbo]" Table="[clients]" Index="[_dta_index_clients_17_1035150733__K2_K1_5_6]" Alias="[C]" TableReferenceId="1" IndexKind="NonClustered" />
  994.                                 <SeekPredicates>
  995.                                   <SeekPredicateNew>
  996.                                     <SeekKeys>
  997.                                       <Prefix ScanType="EQ">
  998.                                         <RangeColumns>
  999.                                           <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[clients]" Alias="[C]" Column="database_guid" />
  1000.                                           <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[clients]" Alias="[C]" Column="client_guid" />
  1001.                                         </RangeColumns>
  1002.                                         <RangeExpressions>
  1003.                                           <ScalarOperator ScalarString="[@DatabaseGuid]">
  1004.                                             <Identifier>
  1005.                                               <ColumnReference Column="@DatabaseGuid" />
  1006.                                             </Identifier>
  1007.                                           </ScalarOperator>
  1008.                                           <ScalarOperator ScalarString="[MobileServices].[dbo].[patients].[client_guid] as [P].[client_guid]">
  1009.                                             <Identifier>
  1010.                                               <ColumnReference Database="[MobileServices]" Schema="[dbo]" Table="[patients]" Alias="[P]" Column="client_guid" />
  1011.                                             </Identifier>
  1012.                                           </ScalarOperator>
  1013.                                         </RangeExpressions>
  1014.                                       </Prefix>
  1015.                                     </SeekKeys>
  1016.                                   </SeekPredicateNew>
  1017.                                 </SeekPredicates>
  1018.                               </IndexScan>
  1019.                             </RelOp>
  1020.                           </NestedLoops>
  1021.                         </RelOp>
  1022.                       </NestedLoops>
  1023.                     </RelOp>
  1024.                   </Top>
  1025.                 </RelOp>
  1026.               </ComputeScalar>
  1027.             </RelOp>
  1028.             <ParameterList>
  1029.               <ColumnReference Column="@PageNumber" ParameterRuntimeValue="(0)" />
  1030.               <ColumnReference Column="@PageSize" ParameterRuntimeValue="(50)" />
  1031.               <ColumnReference Column="@SearchText" ParameterRuntimeValue="'jo'" />
  1032.               <ColumnReference Column="@DatabaseGuid" ParameterRuntimeValue="{guid'CE7BB6B9-FD26-4467-A73C-B094DB25B22A'}" />
  1033.             </ParameterList>
  1034.           </QueryPlan>
  1035.         </StmtSimple>
  1036.       </Statements>
  1037.     </Batch>
  1038.   </BatchSequence>
  1039. </ShowPlanXML>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement