How do I speed up the quey performance if I've a query like this :
Does 'not in' command will affected the performance?.

select      ts.transportid,ts.transporttype,ts.transportcapacity,ts.transportstatus,ts.routecoverage,ts.transportregnumber
from       transportsetup ts
where     ts.bizid = 'B126'
and         ts.deletestatus = 0
and         ts.transportid not in (    select t.transportid
                                                  f rom transportsetup t,servicedetail s,logisticservice l
                                                  where t.bizid=l.bizid
                                                      and l.serviceid=s.serviceid
                                                      and t.transportid=s.transportid
                                                      and t.bizid = 'B126'
                                                      and l.status='Pending'
                                                  or t.bizid=l.bizid
                                                      and l.serviceid=s.serviceid
                                                      and t.transportid=s.transportid
                                                      and t.bizid = 'B126' and l.status='Reserved' )
order by ts.transporttype;


Any help pretty much appreciated. Thanks

Reply via email to