Return-Path: <root@fatcity.cts.com>
Received: from newsfeed.cts.com (newsfeed.cts.com [209.68.248.164])
 by naude.co.za (8.11.2/8.11.2) with SMTP id g7VBOpe06494
 for <oracle-l@naude.co.za>; Sat, 31 Aug 2002 07:24:51 -0400
Received: from fatcity.UUCP (uucp@localhost)
 by newsfeed.cts.com (8.9.3/8.9.3) with UUCP id CAA27518;
 Sat, 31 Aug 2002 02:23:32 -0700 (PDT)
Received: by fatcity.com (26-Feb-2001/v1.0g-b72/bab) via UUCP id 004C4EC2; Sat, 31 Aug 2002 02:13:20 -0800
Message-ID: <F001.004C4EC2.20020831021320@fatcity.com>
Date: Sat, 31 Aug 2002 02:13:20 -0800
To: Multiple recipients of list ORACLE-L <ORACLE-L@fatcity.com>
X-Comment: Oracle RDBMS Community Forum
X-Sender: "Sandeep Kurliye" <Sandeep@almoayyedintl.com.bh>
Sender: root@fatcity.com
Reply-To: ORACLE-L@fatcity.com
Errors-To: ML-ERRORS@fatcity.com
From: "Sandeep Kurliye" <Sandeep@almoayyedintl.com.bh>
Subject: RE: Function-Based Index not working
Organization: Fat City Network Services, San Diego, California
X-ListServer: v1.0g, build 72; ListGuru (c) 1996-2001 Bruce A. Bergman
Precedence: bulk
Mime-Version: 1.0
Content-Type: multipart/mixed;	boundary="----_=_NextPart_001_01C250CE.6B165B8E"
------_=_NextPart_001_01C250CE.6B165B8E
Content-Type: text/plain;
 charset="Windows-1252"
Content-Transfer-Encoding: quoted-printable

If CBO think - cost of FTS will be less than index scan then it will not =
use index.

HTH.



-----Original Message-----
From:	Marul Mehta [mailto:marul@zycus.com]
Sent:	Sat 8/31/2002 11:48
To:	Multiple recipients of list ORACLE-L
Cc:=09
Subject:	Function-Based Index not working

Hi,

Can you please help me out in solving this weird problem of =
funcation-based index not being used when I query the table.
This is the comand I fired and the result it returned me.

1. SQL> create table employees  (last_name varchar2(20));
    Table created.

2. SQL> CREATE INDEX upper_ix ON employees (UPPER(last_name));
    Index created.

Made the autotrace on and than:-

3. SELECT last_name FROM employees WHERE UPPER(last_name) IS NOT NULL  =
ORDER BY UPPER(last_name);
    no rows selected.

Execution Plan
----------------------------------------------------------
   0      SELECT STATEMENT Optimizer=3DCHOOSE
   1    0   SORT (ORDER BY)
   2    1     TABLE ACCESS (FULL) OF 'EMPLOYEES'


I fired without order by clause also but no use.
=20
Now can any body please let tell me why this Oracle is having a full =
scan of the employee table.

TIA,
Marul.


   =20







------_=_NextPart_001_01C250CE.6B165B8E
Content-Type: application/ms-tnef;
 name="winmail.dat"
Content-Transfer-Encoding: 7bit

<encoded content removed -- binaries not allowed by ListGuru>

------_=_NextPart_001_01C250CE.6B165B8E--
Content-Type: text/plain; name="ReadMe.txt"; charset="us-ascii"
Content-Transfer-Encoding: 7bit

The previous attachment was filtered out by the ListGuru mailing
software at fatcity.com because binary attachments are not appropriate
for mailing lists.  If you want a copy of the attachment which was
removed, contact the sender directly and ask for it to be sent to
you by private E-mail.

This warning is inserted into all messages containing binary
attachments which have been removed by ListGuru.  If you have questions
about this message, contact Postmaster@fatcity.com for clarification.

------_=_NextPart_001_01C250CE.6B165B8E--
-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Sandeep Kurliye
  INET: Sandeep@almoayyedintl.com.bh

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@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).

