Avoid sort on SELECT command

  • Thread starter Thread starter _VJ
  • Start date Start date
Thanks a lot for your answers. I agree that the usage of SELECT * is
undesirable, in the production code I don't use it
 
Because the execution plan uses the non-clustered index to retrieve the data
therefore the result is sorted by the indexed column (Y). If the data and
the schema doesn't change then the execution plan won't change either so
you'll most likely see the same result repeatedly.

given your explanation, why only "most likely" instead of "all the time" ?
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top