【发布时间】:2013-01-16 09:50:36
【问题描述】:
这是在线门户的产品表结构。
目前product表有超过100万条记录。
我创建了关于状态和交付 ID 的索引。
通过 ORDER BY status DESC, delivery_id ASC
列出产品时出现性能问题
完整查询:
SELECT product_name FROM product ORDER BY status DESC, delivery_id ASC LIMIT 10
如何改进此查询以更快地执行?
【问题讨论】:
-
请粘贴解释计划
标签: mysql sql performance sql-order-by multiple-columns