| From: | Herouth Maoz <herouth(at)oumail(dot)openu(dot)ac(dot)il> |
|---|---|
| To: | Michael Olivier <molivier(at)yahoo(dot)com>, "pgsql-sql postgresql(dot)org" <pgsql-sql(at)postgreSQL(dot)org> |
| Subject: | Re: [SQL] optimizing 2-table join w/millions of rows |
| Date: | 1998-11-22 11:18:03 |
| Message-ID: | l03110700b27da28b94ff@[147.233.159.109] |
| Views: | Whole Thread | Raw Message | Download mbox | Resend email |
| Thread: | |
| Lists: | pgsql-sql |
At 4:26 +0200 on 20/11/98, Michael Olivier wrote:
>
> select U.acctname from usertest U, bgndtest B where
> B.part_needed=3 and B.loc_needed=5 and
> B.acctname=U.acctname and U.acctname in
> (select acctname from usertest where part=2 and loc=3)
Can you explain *verbally* what you meant to do here? It seems as if the
subselect is redundant. How about:
SELECT U.acctname
FROM usertest U, bgndtest B
WHERE B.acctname = U.acctname
AND B.part_needed=3 AND B.loc_needed=5
AND U.part=2 AND U.loc=3;
Herouth
--
Herouth Maoz, Internet developer.
Open University of Israel - Telem project
http://telem.openu.ac.il/~herutma
| From | Date | Subject | |
|---|---|---|---|
| Next Message | Postgres DBA | 1998-11-22 12:35:12 | Re: [SQL] Re: How do I COPY empty Datetimes? |
| Previous Message | Tom Lane | 1998-11-21 19:01:16 | Re: How do I COPY empty Datetimes? |