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: <> causing full table scan

RE: <> causing full table scan

From: Richard Huntley <rhuntley_at_mindleaders.com>
Date: Tue, 30 Jul 2002 12:02:33 -0800
Message-ID: <F001.004A66C0.20020730120233@fatcity.com>


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 Lists

--------------------------------------------------------------------
To REMOVE yourself from this mailing list, send an E-Mail message
to: 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

Original text of this message

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