fine true to be
the max.
Henry
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Thursday, July 27, 2000 9:28 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re: RE: Re(2): [SQL] optimize sql
but active is a boolean field.
[EMAIL PROTECTED] writes:
>I
WHERE code = office_code AND active >= 't'
GROUP BY name
HAVING MIN(active) > 't'
Henry
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
Sent: Wednesday, July 26, 2000 9:40 PM
To: [EMAIL PROTECTED]; [EMAIL PROTECTED]
Subject: Re(2): [S
[EMAIL PROTECTED] writes:
>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 els
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);
>
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);
Can anyone tell me how to optimize it?
Thanks.