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: nvl affect on idexes

RE: nvl affect on idexes

From: Tim Sawmiller <sawmillert_at_state.mi.us>
Date: Thu, 29 Mar 2001 08:55:58 -0800
Message-ID: <F001.002DBAC2.20010329085300@fatcity.com>

Well, assuming xfoo is a variable, this is not correct...the function is not being used on the indexed field in this case, so the index WILL be used. If xfoo is a column in the table, then I would expect a full table scan to be used.

>>> prakash.bala_at_cingular.com 03/29/01 11:16AM >>>
Eric, Oracle won't use the index in this case. Instead have a function-based index.

Prakash

-----Original Message-----
Sent: Thursday, March 29, 2001 9:43 AM
To: Multiple recipients of list ORACLE-L

Does nvl have any effect on indexes. In other words would it slow down a query if you used the nvl function in the where clause on an indexed field.

i.e.

select *
from foo
where indexField > nvl(xfoo,0);

Thanks,
Eric

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com 
-- 
Author: Chesebro, Eric
  INET: Eric.Chesebro_at_apfs.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).
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com 
-- 
Author: Bala, Prakash
  INET: prakash.bala_at_cingular.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).

--
Please see the official ORACLE-L FAQ: http://www.orafaq.com
--
Author: Tim Sawmiller
  INET: sawmillert_at_state.mi.us

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 Thu Mar 29 2001 - 10:55:58 CST

Original text of this message

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