Query is performing slow when sorted on datetime column

  • Have you updated the statistics recently and if so, have you tried updating with a full scan? There is a bit of a discrepancy between the estimated rows & the actual rows. This could be caused by out of date statistics (there are other reasons too, but that's one).

    How selective is the data in the TIMESTAMP_NC column?

    As bad as the key lookup is for performance, the LOOP join just a little later to the QuestionKeyword table is just as bad. It's doing 4000 seeks on that table. I'm just wandering if updated statistics could help the optimizer to use a hash instead.

    "The credit belongs to the man who is actually in the arena, whose face is marred by dust and sweat and blood"
    - Theodore Roosevelt

    Author of:
    SQL Server Execution Plans
    SQL Server Query Performance Tuning

Viewing post 16 (of 15 total)

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