Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Sorting Float Column vs Int Column in SQL Server

I wonder if type of a column matters in terms of sorting performance. I have heard that int columns are sorted faster than float columns. Do you think it is correct?

like image 238
B Faley Avatar asked Apr 25 '26 07:04

B Faley


1 Answers

For columns without an index on them, sorting does depend on the data type.

Floats are more complex than integers, so it is logical to conclude that sorting them takes a bit longer.

like image 51
Tomalak Avatar answered Apr 27 '26 23:04

Tomalak



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!