| Oracle FAQ | Your Portal to the Oracle Knowledge Grid | |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: Forcing SQL query to use 2 index hints
Try the following per "Specifying a Full Set of Hints" in the 9ir2
Performance Tuning Guide and Reference
SELECT /*+ index(a index_A) index(b index_B) */ column1,column2,column3,column4
from table_a a,table_b b
where a.something = b.something;
Bob Stauffer
DBA
D&E Communications
Ephrata, PA, USA
717-738-8737
rstauffer_at_decommunications.com
-----Original Message-----
From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Fred Smith
Sent: Friday, September 09, 2005 11:17
To: oracle-l_at_freelists.org
Subject: Forcing SQL query to use 2 index hints
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!!!!!
--
http://www.freelists.org/webpage/oracle-l
**DISCLAIMER
This e-mail message and any files transmitted with it are intended for the use of the individual or entity to which they are addressed and may contain information that is privileged, proprietary and confidential. If you are not the intended recipient, you may not use, copy or disclose to anyone the message or any information contained in the message. If you have received this communication in error, please notify the sender and delete this e-mail message. The contents do not represent the opinion of D&E except to the extent that it relates to their official business.
--
http://www.freelists.org/webpage/oracle-l
Received on Fri Sep 09 2005 - 10:31:30 CDT
![]() |
![]() |