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" ?
 
Back
Top