- 论坛徽章:
- 9
|
原帖由 yyxxzz 于 2009-11-17 13:47 发表 ![]()
把key_total 调整为 ( cid,lmsn,key_prop ) 这样调整的话,
这样的sql 用不到key_total了吧?或者只能用到cid了
select iid,title,nick,category_name,pic_path,price,credit from tb_goods where ci ...
如果你还有select iid,title,nick,category_name,pic_path,price,credit from tb_goods where cid=1201 and key_prop='xx' order by lmsn desc limit 0,20
这样的语句的话,就不能改顺序了。
只有加use index了。
至于key_buffer_size主要是看你status来进行的调优的
show global status like '%key%';
| Key_read_requests | 1313785 |
| Key_reads | 7247 |
1-Key_reads/Key_read_requests 就是你key-buffer的命中率
一般来说 Key_reads/Key_read_requests 小于0.001为佳 |
|