2010年4月29日
摘要: 具体要注意的: 1.应尽量避免在 where 子句中对字段进行 null 值判断,否则将导致引擎放弃使用索引而进行全表扫描,如: select id from t where num is null 可以在num上设置默认值0,确保表中num列没有null值,然后这样查询: select id from t where num=0 2.应尽量避免在 where 子句中使用!=或<>操作... 阅读全文
posted @ 2010-04-29 11:39 游子 阅读(509) 评论(1) 推荐(0) 编辑