Does Mysql5.6 have a sort index?

for example, the field addtime is a timestamp, and my business is almost always sorted inversely by the time of this field. Can I directly build such an index? You don"t need order by addtime desc?

Mar.04,2021

No, if you want the result set of sql to be ordered, you must specify the order by statement.


The

index is to find the

of the data more efficiently.

sort belong to business requirements

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b414cc-2c564.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b414cc-2c564.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?