Take the 2-minute tour ×
Database Administrators Stack Exchange is a question and answer site for database professionals who wish to improve their database skills and learn from others in the community. It's 100% free, no registration required.

I have the following query:

SELECT T2.Title 
FROM TitleTable T1
    INNER JOIN TitleTable T2 ON T2.FKID1 = T1.FKID1
WHERE T1.FKID2 = @ID_PARAM1 
    AND T2.FKID2 = @ID_PARAM2 
    AND CONTAINS(T1.Title, '"' + @SINGLE_WORD_PARAM +'"')

Title is of type NVARCHAR(100). All the IDs are INT.

My Execution Plan is such that it is using the Key Lookup (Clustered) operation 80+% of the time:

  • Predicate: TitleTable.FKID2 AS T2.FKID2 = @ID_PARAM2
  • Object: TitleTable T2
  • Output list: TitleTable.Title

Each and every mentioned column is in its own non-clustered index, Title is additionally in the full-text index and there's a clustered index on the primary key as well. Is there a way to include the full-text index in the covering index or something?

EDIT: execution plan

share|improve this question
    
If your question is "why is my query so slow", you may want to check out SARGability. stackoverflow.com/questions/799584/… or brentozar.com/archive/2010/06/sargable-why-string-is-slow –  Max Vernon Mar 7 '13 at 18:48
1  
Could you please post the plan? –  swasheck Mar 8 '13 at 0:26
    
MaxVernon thanks, I'll take a look! @swasheck I've edited the question. –  Howie Mar 8 '13 at 6:02
    
@Howie I know it's been a while, but I was wondering if you could post the xml execution plan. IMGUR is blocked for me here at work. Alternatively, you can post the plan to answers.sqlsentry.net and link back to here. –  swasheck Mar 11 '13 at 18:43

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.