title: Performance improvement suggestion for query
body: <p>Below is my query and execution plan. i am looking to improve performance Last day i created one question and it was not clear. So i am adding it here with proper query and execution plan</p>
  
  <pre><code> INSERT INTO #FinalResultTable              
     (              
        [Disclosure Category]              
       , [Line #]              
       , [AllocationProcessId]        
       , [Line Description (Long)]              
       , [Line Description (Short)]              
       , [Segment Start Date]                   
       , [Segment End Date]              
       , [Tag Group1]              
       , [Tag Group2]              
       , [Tag Group3]              
       , [Tag Group4]          
       , [UniqueTransactionId]            
        , [TransactionName] 
          , InvestmentNumber               
      )     
   SELECT              
           WSS.Name ,              
           SS.SortSequence AS [LineNo],        
           AD.AllocationProcessId,              
           SS.UnformattedQuestionText AS [LineDescriptionLong],              
           SS.ShortDescription AS [LineDescriptionShort],              
           [SegmentStartDate],              
           [SegmentEndDate],              
           [TagDescription1],              
           [TagDescription2],              
           [TagDescription3],              
           [TagDescription4],              
           [UniqueTransactionId],                
           [TransactionName],              
  
           InvestmentNumber             
          FROM [#AllocationData] AD              
          JOIN [#SupplementalSection]  SS ON
           (SS.Code = AD.Code AND AD.SupplementalSectionQnId IS NULL)     or
           AD.SupplementalSectionQnId = SS.SupplementalSectionQnId 
  
  
          JOIN Workpaper.SupplementalSection WSS WITH(NOLOCK)               
          ON SS.SupplementalSectionId = WSS.Id  
          WHERE WSS.IsActive = 1 AND WSS.IsDeleted = 0 AND WSS.formTypeId = @formTypeId
  </code></pre>
  
  <p>as per the execution plan table insert cost 75%.total cost of this is 29%. For AllocationData i have nonclustered index for SupplementalSectionQnId,Code </p>