SQL 加了Order By超慢,去掉飞快,怎么解决 本帖最后由 sksgod 于 2011-08-28 10:57:01 编辑 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 创建 (BookName, UpTime)的复合索引 参考一下这个贴子。http://topic.csdn.net/u/20110827/17/739bd667-703b-4ca1-89ff-e625e724d00b.html 贴出你的EXPLAIN结果和所有相关表的show index from .. 1 SIMPLE novel_chapter ALL BookName 68522 Using temporary; Using filesort1 SIMPLE novel_booklist ref BookName BookName 130 novel.novel_chapter.BookName 1 1 SIMPLE novel_category ALL CategoryName 8 Using where; Using join buffernovel_chapter 0 PRIMARY 1 ID A 68522 BTREE novel_chapter 1 BookName 1 BookName A 243 YES BTREE novel_chapter 1 BookName 2 UpTime A 68522 YES BTREE novel_chapter 1 BookName 3 ChapterName A 68522 BTREE novel_chapter 1 ID 1 ID A 68522 BTREE novel_chapter 1 ChapterName 1 ID A 68522 BTREE novel_chapter 1 ChapterName 2 ChapterName A 68522 BTREE novel_chapter 1 ChapterName 3 Volume A 68522 YES BTREE novel_chapter 1 ChapterName 4 ChapterLen A 68522 YES BTREE novel_chapter 1 ChapterLen 1 ChapterLen A 68522 YES BTREE novel_chapter 1 UpTime 1 UpTime A 22840 YES BTREE 强制索引select *from A force index(1楼的索引)where ... 在线等:::::::多条件排序问题 这两句SQL运行效率有区别吗? 关于c访问mysql 怎么只显示一个? mysql中使用exists的问题 mysql如何用另一个表去更新某一个表的字段? 关于建立索引的问题? 有没有sql语句能够判断某个表是否存在? 菜鸟问题 PHP中mysql_data_seek函数做什么的???? 求一条mysql语句 wamp 2.2 的phpmyadmin 想改成输入密码登陆方式。
1 SIMPLE novel_booklist ref BookName BookName 130 novel.novel_chapter.BookName 1
1 SIMPLE novel_category ALL CategoryName 8 Using where; Using join buffernovel_chapter 0 PRIMARY 1 ID A 68522 BTREE
novel_chapter 1 BookName 1 BookName A 243 YES BTREE
novel_chapter 1 BookName 2 UpTime A 68522 YES BTREE
novel_chapter 1 BookName 3 ChapterName A 68522 BTREE
novel_chapter 1 ID 1 ID A 68522 BTREE
novel_chapter 1 ChapterName 1 ID A 68522 BTREE
novel_chapter 1 ChapterName 2 ChapterName A 68522 BTREE
novel_chapter 1 ChapterName 3 Volume A 68522 YES BTREE
novel_chapter 1 ChapterName 4 ChapterLen A 68522 YES BTREE
novel_chapter 1 ChapterLen 1 ChapterLen A 68522 YES BTREE
novel_chapter 1 UpTime 1 UpTime A 22840 YES BTREE
from A force index(1楼的索引)
where ...