Oracle FAQ Your Portal to the Oracle Knowledge Grid
HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US
 

Home -> Community -> Usenet -> c.d.o.misc -> Re: Max size of query?

Re: Max size of query?

From: Stephan Born <stephan.born_at_bNeOuSsPeAnM.de>
Date: Mon, 12 Aug 2002 10:46:26 +0200
Message-ID: <3D5775E2.1000501@bNeOuSsPeAnM.de>


Daniel Morgan wrote:

>>  SELECT ... WHERE uname in ('user','user',...);

> the person banging out the code. For example I would never write what
> you have done above. Rather I would do this:
>
> SELECT ...
> FROM ...
> WHERE uname IN (
> SELECT uname
> FROM some_other table);

Wouldn't it be better to join the table?

SELECT ...
FROM
   some_other so,
   ...
WHERE so.uname = uname;

AFAIK the optimizer can handle this better then IN-clauses...

Regards, Stephan

-- 
---------------------------------------------------------------
Dipl.-Inf. (FH) Stephan Born       | beusen Solutions GmbH
                                    | Landsberger Allee 366
eMail: delete the capital letters  | 12681 Berlin
eMail: entferne die Grossbuchstaben| Germany
---------------------------------------------------------------
        PGP-Key verfügbar           |   PGP-Key available
---------------------------------------------------------------
Received on Mon Aug 12 2002 - 03:46:26 CDT

Original text of this message

HOME | ASK QUESTION | ADD INFO | SEARCH | E-MAIL US