SQL Index Performance - ASC vs DESC

前端 未结 4 694
花落未央
花落未央 2021-01-01 14:07

I\'ve got a user table keyed on an auto-increment int column that looks something like this:

CREATE TABLE `user_def` (
  `user_id` int(11) NOT NULL AUTO_INC         


        
4条回答
  •  情书的邮戳
    2021-01-01 15:03

    In MySQL defining ASC or DESC for indexes is not only unsupported, but it would also be pointless. MySQL can traverse indexes in both directions as needed, so it does not require the order to be defined explicitly.

提交回复
热议问题