When would be the order by faster ?

  • CELKO (8/11/2010)


    You really don't understand SQL yet and you keep posting the wrong kind of questions.

    Yes i accept that i am not good in Sql but this is the only way i can learn things but putting these STUPID question 😀 .But i have heard many times that "NO QUESTION IS STUPID/MEANINGLESS". it will yield you some learning. 🙂

    And thanks to people like Paul, Gail, Lynn who always keep motivating, learners this me 🙂

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)

  • ORDER BY is actually a very expensive operation in sql server. If you're using a table variable or a temp table to insert rows peior to displaying it on the application, then I would suggest that you create a clustered index instead, in the manner that you want the data to be sorted (that is, how you declare the sorting using the order by clause). That way, you'll be able to retrieve results much faster with less resources used.

  • Thanks for this LATEST reply but this is 2 years old thread 😀

    -------Bhuvnesh----------
    I work only to learn Sql Server...though my company pays me for getting their stuff done;-)

Viewing 3 posts - 16 through 17 (of 17 total)

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