Return-Path: <oracle-l-bounce@freelists.org>
Delivered-To: 2-oracle-l@orafaq.com
Received: (qmail 1053 invoked from network); 25 Jul 2008 03:56:18 -0500
Received: from freelists-180.iquest.net (HELO turing.freelists.org) (206.53.239.180)
  by air964.startdedicated.com with SMTP; 25 Jul 2008 03:56:18 -0500
Received: from localhost (localhost [127.0.0.1])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id 374D68C798B;
 Fri, 25 Jul 2008 04:56:18 -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 09680-07; Fri, 25 Jul 2008 04:56:18 -0400 (EDT)
Received: from turing (localhost [127.0.0.1])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id A56B78C74CA;
 Fri, 25 Jul 2008 04:56:17 -0400 (EDT)
Received: with ECARTIS (v1.0.0; list oracle-l); Fri, 25 Jul 2008 04:17:03 -0400 (EDT)
Received: from localhost (localhost [127.0.0.1])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id DF73D8C8162
 for <oracle-l@freelists.org>; Fri, 25 Jul 2008 04:17:02 -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 06745-09 for <oracle-l@freelists.org>;
 Fri, 25 Jul 2008 04:17:02 -0400 (EDT)
Received: from smtp-out3.blueyonder.co.uk (smtp-out3.blueyonder.co.uk [195.188.213.6])
 by turing.freelists.org (Avenir Technologies Mail Multiplex) with ESMTP id A78388C8155
 for <oracle-l@freelists.org>; Fri, 25 Jul 2008 04:17:02 -0400 (EDT)
Received: from [172.23.170.143] (helo=anti-virus02-10)
 by smtp-out3.blueyonder.co.uk with smtp (Exim 4.52)
 id 1KMIU1-0001qQ-D4
 for oracle-l@freelists.org; Fri, 25 Jul 2008 09:17:01 +0100
Received: from [82.35.20.102] (helo=starbase-2.local)
 by asmtp-out6.blueyonder.co.uk with esmtp (Exim 4.52)
 id 1KMIU0-0000Vg-VS
 for oracle-l@freelists.org; Fri, 25 Jul 2008 09:17:01 +0100
Message-ID: <48898BFE.3000407@williamrobertson.net>
Date: Fri, 25 Jul 2008 09:17:02 +0100
From: William Robertson <william@williamrobertson.net>
User-Agent: Thunderbird 2.0.0.16 (Macintosh/20080707)
MIME-Version: 1.0
To: "oracle-l@freelists.org" <oracle-l@freelists.org>
Subject: Re: Parallel hint ignored only in subquery
References: <34908.12.17.117.251.1216917363.squirrel@12.17.117.251>    <0E077BEDC1D3614AA06282FF824D813113837D72F5@XVS2-CLUSTER.yu.yale.edu> <29832.12.17.117.251.1216928679.squirrel@12.17.117.251>
In-Reply-To: <29832.12.17.117.251.1216928679.squirrel@12.17.117.251>
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
X-archive-position: 9742
X-ecartis-version: Ecartis v1.0.0
Sender: oracle-l-bounce@freelists.org
Errors-to: oracle-l-bounce@freelists.org
X-original-sender: william@williamrobertson.net
Precedence: normal
Reply-to: william@williamrobertson.net
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
X-Virus-Scanned: Debian amavisd-new at localhost.localdomain

I think that's true in a general sense, however the hint syntax makes 
the distinction because there is a big difference to the optimizer 
between the two constructions, and between the two transformations that 
can be applied to them.

 From the documentation:

"
The MERGE hint lets you merge views in a query.
The NO_MERGE hint instructs the optimizer not to combine the outer query 
and any inline view queries into a single query.

The UNNEST hint instructs the optimizer to unnest and merge the body of 
the subquery into the body of the query block that contains it, allowing 
the optimizer to consider them together when evaluating access paths and 
joins.
Use of the NO_UNNEST hint turns off unnesting.
"

So it's MERGE/NO_MERGE for inline views, UNNEST/NO_UNNEST for subqueries 
(in the classic sense). I can never remember which is which and I always 
have to double-check. Hmm, "SUBQUERY" and "UNNEST" both have the letter 
"U" - maybe I'll use that to remind me from now on.


-----Original message-----
From: Rich Jesse
Date: 24/7/08 20:44
> Relationally speaking, I thought that an inline view was just one type of
> subquery, no?
>
> I did not try the NO_MERGE until just now and it works!  I learned something
> new today, or at least I learned that I'll have to learn more about
> MERGE/NO_MERGE.
>
> Thanks, Amit!
> Rich
>
>   
>> This is not a subquery but an inline view.
>>
>> Did you try no_merge hint
>>
>> Amit
>>
>>     
> [snip]

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


