From: Abdul Wahab Dahalan <wahab@mimos.my>
To: pgsql-sql@postgresql.org
To: wahab@mimos.my
Subject: How to speeed up the query performance
Date: Wed, 13 Aug 2003 11:20:58 +0800
Message-ID: <3F39AE9A.5020901@mimos.my> (raw)
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 instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-sql@postgresql.org
Cc: wahab@mimos.my
Subject: Re: How to speeed up the query performance
In-Reply-To: <3F39AE9A.5020901@mimos.my>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox