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: Function Based Index - Not Used ???

RE: Function Based Index - Not Used ???

From: Hallas, John, Tech Dev <John.Hallas_at_gb.vodafone.co.uk>
Date: Thu, 29 May 2003 04:45:44 -0800
Message-ID: <F001.005A558D.20030529044544@fatcity.com>


Naveen , these parameters look to be already set Doesn't FBI come in with 8.1.7 and Prem is on 8.16 and a comapatible of 8.10 is in place

Failing that, as my second guess, 2 privileges need to be assigned to the user (QUERY_REWRITE and CREATE INDEX). The 2nd one is obviously in place to allow the index to be created but I don't know about the first

The final point is whether the name column is not null , again I assume not but it is a possibility

John

-----Original Message-----
Sent: 29 May 2003 08:50
To: Multiple recipients of list ORACLE-L

Don't remember but you need a few parameters set appropriately for the FB indexes to work.

I guess one of the parameters is QUERY_REWRITE_ENABLED which should be set to TRUE and you also need to set QUERY_REWRITE_INTEGRITY to some appropriate value.

Regards
Naveen  

> -----Original Message-----
> From: Prem Khanna J [mailto:jprem_at_kssnet.co.jp]
> Sent: Thursday, May 29, 2003 12:25 PM
> To: Multiple recipients of list ORACLE-L
> Subject: Function Based Index - Not Used ???
>
>
> Guys,
>
> create table Tab1 ( name varchar2(100),age int,state
> varchar2(100),country varchar2(100));
>
> insert into tab1 values ('SCOTT',25,'TN','India');
>
> I have 20,00,000 records like above.
>
> create index idx1 on tab1 (upper(name));
>
> analyze table tab1 compute statistics;
> analyze index idx1 compute statistics;
>
> select age from tab1 where upper(name)='SCOTT'; ---> this
> will return around 50 records.
>
> ---------------------------------------------------------
> 0 SELECT STATEMENT Optimizer=CHOOSE (Cost=2458
> Card=262146 Bytes=2097168)
> 1 0 TABLE ACCESS (FULL) OF 'TAB1' (Cost=2458
> Card=262146 Bytes=2097168)
>
> --- INIT.ORA ----------------------
> optimizer_mode=choose
> compatible=8.1.0
> query_rewrite_enabled=true
> query_rewrite_integrity=trusted
> -----------------------------------
> It's Oracle 8.1.6/Win2K.
>
> When i add a HINT, IDX1 is used.Why is it so ?
> Why this SELECT does not use index IDX1 w/o a hint ?
>
> TIA.
> Jp.
>
>
> --
> Please see the official ORACLE-L FAQ: http://www.orafaq.net
> --
> Author: Prem Khanna J
> INET: jprem_at_kssnet.co.jp
>
> Fat City Network Services -- 858-538-5051 http://www.fatcity.com
> San Diego, California -- Mailing list and web hosting services
> ---------------------------------------------------------------------
> 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).
>
>

DISCLAIMER:
This message (including attachment if any) is confidential and may be privileged. Before opening attachments please check them for viruses and defects. MindTree Consulting Private Limited (MindTree) will not be responsible for any viruses or defects or any forwarded attachments emanating either from within MindTree or outside. If you have received this message by mistake please notify the sender by return e-mail and delete this message from your system. Any unauthorized use or dissemination of this message in whole or in part is strictly prohibited. Please note that e-mails are susceptible to change and MindTree shall not be liable for any improper, untimely or incomplete transmission.

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.net
-- 
Author: Naveen Nahata
  INET: naveen_nahata_at_mindtree.com

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
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.net
-- 
Author: Hallas, John, Tech Dev
  INET: John.Hallas_at_gb.vodafone.co.uk

Fat City Network Services    -- 858-538-5051 http://www.fatcity.com
San Diego, California        -- Mailing list and web hosting services
---------------------------------------------------------------------
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 May 29 2003 - 07:45:44 CDT

Original text of this message

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