From: | Abdul Wahab Dahalan <wahab(at)mimos(dot)my> |
---|---|
To: | pgsql-sql(at)postgresql(dot)org, wahab(at)mimos(dot)my |
Subject: | How to speeed up the query performance |
Date: | 2003-08-13 03:20:58 |
Message-ID: | 3F39AE9A.5020901@mimos.my |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-sql |
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
From | Date | Subject | |
---|---|---|---|
Next Message | SZŰCS Gábor | 2003-08-13 10:11:46 | Order of triggers - totally lost |
Previous Message | Stephan Szabo | 2003-08-13 01:29:14 | Re: How to optimize this query ? |