我的数据表中只有四万条记录,但查询起来速度非常慢
数据表:
CREATE TABLE IF NOT EXISTS `book_capital_11` (
`cid` int(8) unsigned NOT NULL AUTO_INCREMENT,
`bid` int(8) NOT NULL,
`listorder` smallint(5) unsigned NOT NULL DEFAULT '0',
`title` varchar(200) NOT NULL,
`content` text NOT NULL,
`updatetime` int(11) NOT NULL,
`url` varchar(200) NOT NULL,
`juanid` smallint(3) DEFAULT NULL,
`groupid` varchar(10) DEFAULT NULL,
PRIMARY KEY (`cid`),
UNIQUE KEY `cid` (`cid`)
) ENGINE=MyISAM DEFAULT CHARSET=utf8 AUTO_INCREMENT=1 ;
搜索语法:
SELECT bid,cid,url FROM book_capital_11 where bid=3319 ORDER BY `cid` desc LIMIT 0,20
这样搜索后速度比较慢,还有比这个效率更高的写法吗。