Oracle FAQ | Your Portal to the Oracle Knowledge Grid |
Home -> Community -> Mailing Lists -> Oracle-L -> RE: <> causing full table scan
bp, indexes are used when limiting conditions are equalities not
inequalities (<>, !=, NOT IN)
How about rewriting the query to replace the <> by an outer join.
-----Original Message-----
Sent: Tuesday, July 30, 2002 3:20 PM
To: Multiple recipients of list ORACLE-L
Hi list ,
In one of my queries if I use <> in where clause it is causing full table
scan . If i use "IN " ( ) it uses index . Actually if it is" <> " the it
is doing hash join and if "IN" then nested loop .
when i make opt_indx_cost_adj to 5 it starts using index again with <>
condition .
Is there a way i can cause it to use index ( yeah i can use hints . ) ?
anything else ..
-bp
--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Richard Huntley
INET: rhuntley_at_mindleaders.com
Fat City Network Services -- (858) 538-5051 FAX: (858) 538-5051 San Diego, California -- Public Internet access / Mailing Liststo: ListGuru_at_fatcity.com (note EXACT spelling of 'ListGuru') and in the message BODY, include a line containing: UNSUB ORACLE-L (or the name of mailing list you want to be removed from). You may also send the HELP command for other information (like subscribing). Received on Tue Jul 30 2002 - 15:02:33 CDT
--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message