Received: (qmail 3825 invoked from network); 6 Jul 2011 15:05:17 -0500
Received: from freelists-180.iquest.net (HELO turing.freelists.org) (206.53.239.180)
  by static-ip-85-25-126-90.inaddr.intergenia.de with SMTP; 6 Jul 2011 15:05:11 -0500
Received: from localhost (localhost [127.0.0.1])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id E0D9DE326E9;
 Wed,  6 Jul 2011 16:04:59 -0400 (EDT)
X-Virus-Scanned: Debian amavisd-new at localhost.localdomain
Received: from turing.freelists.org ([127.0.0.1])
 by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024)
 with ESMTP id BasLOKz-FHn9; Wed,  6 Jul 2011 16:04:59 -0400 (EDT)
Received: from turing.freelists.org (localhost [127.0.0.1])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 6B5A1E3264D;
 Wed,  6 Jul 2011 16:04:16 -0400 (EDT)
Received: with ECARTIS (v1.0.0; list oracle-l); Wed, 06 Jul 2011 16:03:34 -0400 (EDT)
Received: from localhost (localhost [127.0.0.1])	by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 6BCC1E325A3	for <oracle-l@freelists.org>; Wed,  6 Jul 2011 16:03:34 -0400 (EDT)
Received: from turing.freelists.org ([127.0.0.1])	by localhost (turing.freelists.org [127.0.0.1]) (amavisd-new, port 10024)	with ESMTP id 3-xwsEn3aAkc for <oracle-l@freelists.org>;	Wed,  6 Jul 2011 16:03:34 -0400 (EDT)
Received: from mail-iw0-f179.google.com (mail-iw0-f179.google.com [209.85.214.179])	by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 31ACEE32581	for <oracle-l@freelists.org>; Wed,  6 Jul 2011 16:03:33 -0400 (EDT)
Received: by iwg8 with SMTP id 8so227469iwg.10        for <oracle-l@freelists.org>; Wed, 06 Jul 2011 13:03:33 -0700 (PDT)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;        d=gmail.com; s=gamma;        h=mime-version:in-reply-to:references:date:message-id:subject:from:to         :cc:content-type;        bh=HHwv/Gxv5jVflBAaINAeTz2JcQfLOE/mY6l3IWON8yU=;        b=x20g9hWdjanO3ydKuC1JuU2uexMMzml3Pnh1OdIb/Kd3ZlFBC66Qvmxv44yHaiasHa         jk/aXNBcjV8fBSE3cmpWNmI5mpyJe+6oWkAoN7zHzN5VIVPzMmUhAakFvzj5M2gmRg8c         CaqlIDe4rK0uYqLkKTXmWjNfQ8jhm8F4XOx68=
MIME-Version: 1.0
Received: by 10.231.117.156 with SMTP id r28mr954ibq.0.1309982613346; Wed, 06 Jul 2011 13:03:33 -0700 (PDT)
Received: by 10.231.149.212 with HTTP; Wed, 6 Jul 2011 13:03:33 -0700 (PDT)
In-Reply-To: <CAE-dsOKkcokGkGq=pPRLHGmBYJA9tYug+2S7VKCi22S8T9CJEw@mail.gmail.com>
References: <CAE-dsOKkcokGkGq=pPRLHGmBYJA9tYug+2S7VKCi22S8T9CJEw@mail.gmail.com>
Date: Wed, 6 Jul 2011 13:03:33 -0700
Message-ID: <CACpWLjNzLh+aMYZ2JbDUr4YDqbL7fXRo1BgtTEmnk4q5iHnekg@mail.gmail.com>
Subject: Re: inlist iterator algorithm
From: Michael Moore <michaeljmoore@gmail.com>
To: oracledbaquestions@gmail.com
Cc: oracle-l@freelists.org
Content-Type: multipart/alternative; boundary=0016369201cc54989604a76c18c5
X-archive-position: 37270
X-ecartis-version: Ecartis v1.0.0
Sender: oracle-l-bounce@freelists.org
Errors-to: oracle-l-bounce@freelists.org
X-original-sender: michaeljmoore@gmail.com
Precedence: normal
Reply-To: michaeljmoore@gmail.com
List-help: <mailto:ecartis@freelists.org?Subject=help>
List-unsubscribe: <oracle-l-request@freelists.org?Subject=unsubscribe>
List-software: Ecartis version 1.0.0
List-Id: oracle-l <oracle-l.freelists.org>
X-List-ID: oracle-l <oracle-l.freelists.org>
List-subscribe: <oracle-l-request@freelists.org?Subject=subscribe>
List-owner: <mailto:steve.adams@ixora.com.au>
List-post: <mailto:oracle-l@freelists.org>
List-archive: <http://www.freelists.org/archives/oracle-l>
X-list: oracle-l
--0016369201cc54989604a76c18c5
Content-Type: text/plain; charset=ISO-8859-1

IN can be thought of as a shortcut for writing a series of ORs.
NOT IN can be thought of as  a shortcut for writing a series of ANDs.
Consider this:
select dummy from dual where dummy not in  ('z',null,'y');

Mike


On Wed, Jul 6, 2011 at 12:46 PM, Dba DBA <oracledbaquestions@gmail.com>wrote:

> I am not sure if this is documented. I am just curious.
>
> When Oracle does an inlist iterator, what is it doing under the cover. When
> I think "iterator", I think
>
>    for i in array.start.. array.end
>       run query(i)
>    end loop;
>
> so if i have 5 values in the inlist, the query runs 5 times. once for each
> value in the inlist.
>
>
> My understanding
> 1. In, is a group of "or" statements
> 2. Or is the samething as a union all
>
>
> So when you do an or or a union all, you are running 2 queries.
>
> Is the inlist smarter than that?
>

--0016369201cc54989604a76c18c5
Content-Type: text/html; charset=ISO-8859-1
Content-Transfer-Encoding: quoted-printable

IN can be thought of as a shortcut for writing a series of ORs.<div>NOT IN =
can be thought of as=A0=A0a shortcut for writing a series of ANDs.</div><di=
v>Consider this:</div><div>select dummy from dual where dummy not in =A0(&#=
39;z&#39;,null,&#39;y&#39;);</div>
<div><br></div><div>Mike</div><div><br><br><div class=3D"gmail_quote">On We=
d, Jul 6, 2011 at 12:46 PM, Dba DBA <span dir=3D"ltr">&lt;<a href=3D"mailto=
:oracledbaquestions@gmail.com">oracledbaquestions@gmail.com</a>&gt;</span> =
wrote:<br>
<blockquote class=3D"gmail_quote" style=3D"margin:0 0 0 .8ex;border-left:1p=
x #ccc solid;padding-left:1ex;"><div>I am not sure if this is documented. I=
 am just curious. </div>
<div>=A0</div>
<div>When Oracle does an inlist iterator, what is it doing under the cover.=
 When I think &quot;iterator&quot;, I think</div>
<div>=A0</div>
<div>=A0=A0 for i in array.start.. array.end</div>
<div>=A0=A0=A0=A0=A0 run query(i)</div>
<div>=A0=A0 end loop;</div>
<div>=A0</div>
<div>so if i have 5 values in the inlist, the query runs 5 times. once for =
each value in the inlist. </div>
<div>=A0</div>
<div>=A0</div>
<div>My understanding</div>
<div>1. In, is a group of &quot;or&quot; statements</div>
<div>2. Or is the samething as a union all</div>
<div>=A0</div>
<div>=A0</div>
<div>So when you do an or or a union all, you are running 2 queries. </div>
<div>=A0</div>
<div>Is the inlist smarter than that? </div>
</blockquote></div><br></div>

--0016369201cc54989604a76c18c5--
--
http://www.freelists.org/webpage/oracle-l


