Re: optimize sql - Mailing list pgsql-sql

From Ross J. Reedstrom
Subject Re: optimize sql
Date
Msg-id 20000726105107.A19381@rice.edu
Whole thread Raw
In response to optimize sql  (pgsql-sql@fc.emc.com.ph (pgsql-sql))
List pgsql-sql
On Wed, Jul 26, 2000 at 10:11:15PM +0800, pgsql-sql wrote:
> HI!
> 
> The SQL below is too slow.
> 
> SELECT name FROM office, office_application 
> WHERE code = office_code 
> AND name NOT IN
> (SELECT DISTINCT name FROM office, office_application
> WHERE active = 't' AND code = office_code);
> 

How does the output of the above differ from:

SELECT name FROM office, office_application 
WHERE code = office_code 
AND active != 't';

Without knowing the table structures (which tables to active, code, 
and office_code belong to?) it's hard to suggest much else.

Ross
-- 
Ross J. Reedstrom, Ph.D., <reedstrm@rice.edu> 
NSBRI Research Scientist/Programmer
Computer and Information Technology Institute
Rice University, 6100 S. Main St.,  Houston, TX 77005


pgsql-sql by date:

Previous
From: pgsql-sql@fc.emc.com.ph (pgsql-sql)
Date:
Subject: optimize sql
Next
From: pgsql-sql@fc.emc.com.ph (pgsql-sql)
Date:
Subject: Re(2): optimize sql