oh_jack 2009-06-20 16:41
浏览 232
已采纳

一个索引的问题

有一个order by a asc ,b desc,c desc 的排序
建了个索引 create index index_o on A(a asc,b desc,c desc)
但是没有用 难道order by 后面的只有在全升序或者全降序的条件下才有用?

数据库是mysql5

  • 写回答

1条回答 默认 最新

  • xenocide 2009-06-20 17:36
    关注

    [quote]An index_col_name specification can end with ASC or DESC. These keywords are allowed for future extensions for specifying ascending or descending index value storage. Currently, they are parsed but ignored; index values are always stored in ascending order. [/quote]

    嗯,当前索引列只有 ASC 有效。连 6.0 都不支持 DESC。

    参考
    [url]http://dev.mysql.com/doc/refman/5.4/en/create-index.html[/url]

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论

报告相同问题?

悬赏问题

  • ¥17 pro*C预编译“闪回查询”报错SCN不能识别
  • ¥15 微信会员卡接入微信支付商户号收款
  • ¥15 如何获取烟草零售终端数据
  • ¥15 数学建模招标中位数问题
  • ¥15 phython路径名过长报错 不知道什么问题
  • ¥15 深度学习中模型转换该怎么实现
  • ¥15 Stata外部命令安装问题求帮助!
  • ¥15 从键盘随机输入A-H中的一串字符串,用七段数码管方法进行绘制。提交代码及运行截图。
  • ¥15 如何用python向钉钉机器人发送可以放大的图片?
  • ¥15 matlab(相关搜索:紧聚焦)