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

Home -> Community -> Mailing Lists -> Oracle-L -> Forcing SQL query to use 2 index hints

Forcing SQL query to use 2 index hints

From: Fred Smith <fred_fred_1_at_hotmail.com>
Date: Fri, 09 Sep 2005 11:17:07 -0400
Message-ID: <BAY107-F24EC387448194C4A192DA6FE980@phx.gbl>


Hello all,
  I am attempting to force a query to use 2 index hints, but am not having any luck with finding the correct syntax.

  The query works, and if I add 1 index hint, the explain plan output shows that it is using the index I specify. However, I need it to use 2 hints:

What is the correct syntax?

SELECT /*+ index(a index_A, b index_B) */ column1,column2,column3,column4

    from table_a a,table_b b
where a.something = b.something;

(The above is not using "index_B" .... how do I force it to use index_B?? Only index_A is being used. What is the correct syntax?)

Thank you!!!!!



Donít just search. Find. Check out the new MSN Search! http://search.msn.click-url.com/go/onm00200636ave/direct/01/
--
http://www.freelists.org/webpage/oracle-l
Received on Fri Sep 09 2005 - 10:19:18 CDT

Original text of this message

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