Access SQL 语句优化提速

版权声明:本文为博主原创文章,未经博主允许不得转载。 https://blog.csdn.net/u013084746/article/details/88099850

exists() 语句 条件放在外面提速不少

select *  from T_ZDJZD a where  exists(select * from T_ZDJZX  b where a.ZD_ID=b.ZD_ID and ZD_ID=73090 and a.JZD_ID=b.QS_JZD and a.JZ_XH<>b.JZ_XH)

优化为:

select *  from T_ZDJZD a where  exists(select * from T_ZDJZX  b where a.ZD_ID=b.ZD_ID  and a.JZD_ID=b.QS_JZD and a.JZ_XH<>b.JZ_XH) and a.ZD_ID=73090

猜你喜欢

转载自blog.csdn.net/u013084746/article/details/88099850