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

Home -> Community -> Mailing Lists -> Oracle-L -> Re: Hint for using a nested loop for an in subquery

Re: Hint for using a nested loop for an in subquery

From: Jonathan Lewis <jonathan_at_jlcomp.demon.co.uk>
Date: Fri, 3 Nov 2006 20:52:33 -0000
Message-ID: <018b01c6ff89$fc70ef60$0200a8c0@Primary>

If you want to execute the subquery first, the hint you want is UNNEST in the subquery.

Regards

Jonathan Lewis
http://jonathanlewis.wordpress.com

Author: Cost Based Oracle: Fundamentals
http://www.jlcomp.demon.co.uk/cbo_book/ind_book.html

The Co-operative Oracle Users' FAQ
http://www.jlcomp.demon.co.uk/faq/ind_faq.html

>I have used a hint in the past to force a query to use a nested loop join
> for a sub query however the name of the hint escapes me. I have googled for
> it unsuccessfully. Anyone remember it offhand?
>
> Query looks like
>
> Select something
> From table1
> Where somethingelse in (select somethingelse from table2 where
> somethingelse2 between x and y)
>
> The ideal plan would evaluate the subquery first then use nested loops
> against an index belonging to table1. I have tried using the no_unnest,
> various index and use_nl hints unsuccessfully.
>
> Thanks,
> Ken
>


No virus found in this incoming message. Checked by AVG Free Edition.
Version: 7.1.409 / Virus Database: 268.13.24/514 - Release Date: 02/11/2006

--
http://www.freelists.org/webpage/oracle-l
Received on Fri Nov 03 2006 - 14:52:33 CST

Original text of this message

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