查询语句相当慢
我想查询A表里的记录,如我要查询A表里的当前时间前三月name是tom的记录,但是这个记录不存在于字段job like'经理'里面
如:
select * from (select t.iFollowid from ent_plan t
where t.dttrackingdate between to_date('20080901','yyyy-MM-dd') and to_date('20080930','yyyy-MM-dd') and
t.chfollowresult like '%3%' ) y where y.iFollowid not in
(select t.iFollowid from ent_plant where t.chfollow like '%4%' or t.chFollow like '%5%'
or t.chFollow like '%6%')
这条语句相当慢花了24秒,大哥用什么解决呢?