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 indexes

RE: Function based indexes

From: Hallas John <John.Hallas_at_btcellnet.net>
Date: Wed, 27 Feb 2002 00:53:18 -0800
Message-ID: <F001.004196A9.20020227005318@fatcity.com>


Sergey,  

I did a quick test which indicates that no special path is mentioned when using a FBI, instead the execution plan will show that an index is being used, which it would not do if a FBI had not been set up. The example below shows what I mean  

HTH   John    

SQL> create index john_idx1 on john(spid_type);
SQL> select spid_type from john where upper(substr(spid_type,2,1)) = 'Y'
SQL> /

SPID_TYPE

Symphony
Symphony
Symphony
Symphony
Symphony
Symphony
Symphony
Symphony  

Execution Plan



0 SELECT STATEMENT Optimizer=CHOOSE
1 0 TABLE ACCESS (FULL) OF 'JOHN'   SQL> drop index john_idx1;
Index dropped.
SQL> create index john_idx1 on john(upper(substr(spid_type,2,1))); Index created.
SQL> analyze table john compute statistics; Table analyzed.  

SQL> select spid_type from john where upper(substr(spid_type,2,1)) = 'Y'; SPID_TYPE



Symphony
Symphony
Symphony
Symphony
Symphony
Symphony
Symphony
Symphony
8 rows selected.  

Execution Plan



0 SELECT STATEMENT Optimizer=FIRST_ROWS (Cost=7 Card=96 Bytes= 1344)
1 0 TABLE ACCESS (BY INDEX ROWID) OF 'JOHN' (Cost=7 Card=96 By
*************************FBI in use****************************
tes=1344)
2 1 INDEX (RANGE SCAN) OF 'JOHN_IDX1' (NON-UNIQUE) (Cost=1 C
*************************FBI in use****************************
ard=96)  

-----Original Message-----
Sent: 26 February 2002 20:51
To: Multiple recipients of list ORACLE-L

Hi, everyone,

This may seem very simple to you, but what's the best way to see if a fresh FBI (sorry!) is used during the execution? Are they reported in the same manner to the SQL trace as other ones?

Regards,

Sergey



This electronic message contains information from the mmO2 plc Group which may be privileged or confidential. The information is intended to be for the use of the individual(s) or entity named above. If you are not the intended recipient be aware that any disclosure, copying, distribution or use of the contents of this information is prohibited. If you have received this electronic message in error, please notify us by telephone or email
(to the numbers or address above) immediately.

-- 
Please see the official ORACLE-L FAQ: http://www.orafaq.com
-- 
Author: Hallas John
  INET: John.Hallas_at_btcellnet.net

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 Wed Feb 27 2002 - 02:53:18 CST

Original text of this message

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