How to improve query with select top n rows ?

  • 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.

  • 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 *******

  • how many records in the table ?

    MVDBA

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

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