摘要: 优化SQL语句的方法 首先,对于where语句的注意事项: 1.应尽量避免在 where 子句中对字段进行 null 值判断,否则将导致引擎放弃使用索引而进行全表扫描,如: select id from t where num is null 可以在num上设置默认值0,确保表中num列没有null 阅读全文
posted @ 2017-08-20 11:06 花开半夏雨 阅读(570) 评论(0) 推荐(0)