3

mysql创建索引时的asc/desc/none有啥区别

 2 years ago
source link: https://www.oschina.net/question/3777570_2324271
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.

mysql创建索引时的asc/desc/none有啥区别

某某某x 发布于 11/02 16:10
阅读 130

例如创建一个创建时间字段的索引

CREATE INDEX create_time_index ON t_order (create_time DESC);//或者create_time ASC 或者create_time

上面三种排序方式有何区别,假设设为asc,当我的语句order by create_time desc时能利用到索引吗,反之,如果不设置任何排序方式(none),是否order by asc和desc时索引是否起作用呢


About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK