Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
venkath
Posting Yak Master
202 Posts |
Posted - 2009-01-07 : 12:33:57
|
Hi allPlease clarify me on the followingIn an Order by clause of a query, which column should be prefered and why?- Sorting on Duplicate data string column- Sorting on Duplicate data numeric column- Sorting on unique numeric columnAnd also please let me know whether having an index on sorting column improves the performance?Thanks |
|
revdnrdy
Posting Yak Master
220 Posts |
Posted - 2009-01-07 : 12:39:44
|
Generally speaking a computer can sort integer data faster than string data. A computer has to do additional comparison and conversion on string data which slows down the processing. As the dataset (# of records) increases this becomes more prolific.Also using indexing can vastly improve performance. However you would need to evaluate an indexing scheme for your particular database table (such as clustered vs non-clustered).I am sure more detail can be provided by other posters as necessary. r&r |
 |
|
tkizer
Almighty SQL Goddess
38200 Posts |
|
|
|
|