导航

2015年9月12日

摘要: 应尽量避免在 where 子句中使用 or 来连接条件,否则将导致引擎放弃使用索引而进行全表扫描,如: select id from t where num=10 or num=20 可以这样查询: select id from t where num=10 unio... 阅读全文

posted @ 2015-09-12 21:21 ggzone 阅读(81) 评论(0) 推荐(0) 编辑

摘要: 应尽量避免在 where 子句中使用 or 来连接条件,否则将导致引擎放弃使用索引而进行全表扫描,如: select id from t where num=10 or num=20 可以这样查询: select id from t where ... 阅读全文

posted @ 2015-09-12 21:21 ggzone 阅读(109) 评论(0) 推荐(0) 编辑