摘要: mysql强制索引和禁止某个索引 1、mysql强制使用索引:force index(索引名或者主键PRI) 例如: select * from table force index(PRI) limit 2;(强制使用主键) select * from table force index(zidua 阅读全文
posted @ 2016-05-17 18:09 殷桃丸子 阅读(758) 评论(0) 推荐(0) 编辑
摘要: 数据库如何提高大数据量查询速度 数据库如何提高大数据量查询速度 数据库如何提高大数据量查询速度 1.对查询进行优化,应尽量避免全表扫描,首先应考虑在 where 及 order by 涉及的列上建立索引。2.应尽量避免在 where 子句中对字段进行 null 值判断,否则将导致引擎放弃使用索引而进 阅读全文
posted @ 2016-05-17 17:53 殷桃丸子 阅读(8138) 评论(0) 推荐(0) 编辑