Re: Am I really stupid???

From: sidster <patrick(at)mail(dot)boxsoft(dot)com>
To: Alfred Perlstein <bright(at)wintelcom(dot)net>
Cc: Dragos Stoichita <ddd(at)genesis(dot)homeip(dot)net>, pgsql-general(at)hub(dot)org
Subject: Re: Am I really stupid???
Date: 2000-05-17 06:53:40
Message-ID: 20000516235340.E230@3eye.boxsoft.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-general

* Alfred Perlstein (bright(at)wintelcom(dot)net) [20000516 22:54]:

> In the meanwhile I think a better way to accomplish your query would
> be this:
>
> SELECT
> t1.f2
> FROM
> t1, t2
> WHERE
> t1.f1 > 100 AND t2.f1 > 100
> AND t1.f2 = t2.f2
> ;
>
> (I hope) :)

You really don't need the t2.f1 > 100 bit because of the latter join.

i.e.,

SELECT
t1.f2
FROM
t1, t2
WHERE
t1.f1 > 100 AND t1.f2 = t2.f2
;

should be sufficient.

Hope this helps,

patrick
--
Abstainer: a weak person who yields to the temptation of
denying himself a pleasure.
-- Ambrose Bierce

In response to

Browse pgsql-general by date

  From Date Subject
Next Message Dragos Stoichita 2000-05-17 08:57:45 Re: Am I really stupid???
Previous Message Nikolay Mijaylov 2000-05-17 06:16:33 simple question for users and db