摘要: 查询%xx%的记录1.使用instrselect count(*) from table t where instr(t.column,'xx')> 0这种查询效果很好,速度很快查询%xx的记录selectcount(c.c_ply_no)asCOUNTfromPolicy_Data_Allc,Item_Data_Alliwherec.c_ply_no=i.c_ply_noandi.C_LCN_NOlike'%245'在执行的时候,执行计划显示,消耗值,io值,cpu值均非常大,原因是like后面前模糊查询导致索引失效,进行全表扫描解决方法:这种只有前模糊 阅读全文
posted @ 2011-04-25 19:32 郭振斌 阅读(5430) 评论(0) 推荐(2) 编辑