How to improve query with select top n rows ?

  • JasonO

    SSC Veteran

    Points: 231

    I notice some slowness on a select  statement whenever it's selecting top n rows.

    Is there anyway to improve it? Query seems to execute faster if I just issue select * instead of select top n rows.

  • SGT_squeequal

    SSCertifiable

    Points: 7145

    your query is most likely doing a costly sort operation etc, do you have an actual execution plan? also can you provide data structure and indexes for the table

     

    ***The first step is always the hardest *******

  • MVDBA (Mike Vessey)

    SSC-Insane

    Points: 21492

    how many records in the table ?

    MVDBA

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

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