NOT IN CLAUSE
Hi, Everyone,
i have this sql query which is working fine but it is very slow.
select distinct a.customer_no,e.sku_id,e.sku_description, 201152 as weekid
from cust_base a,customer_seg b,cust_sku_purchase c,
associated_cat d,sku_prom e, CAT_SHOP_SCORE g
where
flag = 0
and (a.customer_no not in (select customer_no from recommendation) or e.sku_id not in (select sku_id from recommendation))
and (a.customer_no not in (select customer_no from cust_sku_purchase) or e.sku_id not in (select sku_id from cust_sku_purchase))
and a.customer_no = b.customer_no
and a.customer_no = g.customer_no
and b.segment_id = d.segment_id
and c.category = d.cat_2
and d.cat_1 = e.category
is there any alternative for NOT in clause which would run much faster???
my oracle database version is 11.1.0.6.
Could anyone please help???
Thanks in advance