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: How to use both nvl and index access without creating functional index ?

RE: How to use both nvl and index access without creating functional index ?

From: Daniel Wittry <daniel.wittry_at_quest.com>
Date: Fri, 13 May 2005 09:07:35 -0700
Message-ID: <B5C5F99D765BB744B54FFDF35F6026210A19A83D@irvmbxw02>


If I understand your intent, you wish to Select the rows that are null on that column without doing a FTS. Yes?

Consider having a default value of "null" on the field and rather than using WHERE column IS NULL, use WHERE column=3D'null'. The index will = not
be suppressed.

Select decode(column, 'null', NULL, column)   from tableA
 where column =3D 'null'

Daniel Wittry, OCA
OCP wannabe
=20

-----Original Message-----
From: oracle-l-bounce_at_freelists.org
[mailto:oracle-l-bounce_at_freelists.org] On Behalf Of Ranko Mosic Sent: Friday, May 13, 2005 8:57 AM
To: oracle-l_at_freelists.org
Subject: How to use both nvl and index access without creating functional index ?

Hi,=3D20
I have to use NVL function ( or similar ) in where clause.=3D20 I need = to
have column accessed via index.=3D20 Creation of functional indexes on nvl(column_name ) can not be done for all columns ( political and other reasons ).

Is there a way ?

Regards, Ranko.

--
http://www.freelists.org/webpage/oracle-l
Received on Fri May 13 2005 - 12:12:11 CDT

Original text of this message

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