Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

Free Oracle Tips

HTML Text

 Home
 E-mail Us
 Oracle Articles


 Oracle Training
 Oracle News

 Oracle Forum
 Class Catalog


 Our Staff
 Our Prices
 Help Wanted!

 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Analysis
 Design
 Implementation
 Oracle Support


 SQL Tuning
 Security

 UNIX
 Oracle UNIX
 Linux
 Oracle Linux
 Monitoring
 Remote help

 Remote plans
 Remote
services
 Oracle C++
 Oracle Java
 Apache
 JDeveloper
 App Server

 Applications
 Oracle Forms
 Oracle Portal
 11i Upgrades
 SQL Server
 Oracle Concepts
 HTML-DB Tips
 Software Help

 Remote Help  
 Development  

 Implementation


 Financials Training
 Oracle 11i
 Oracle Apps 11i
 Oracle Workflow
 Oracle AR 11i Class
 Oracle AP 11i class
 Oracle GL 11i class
 Oracle HR 11i class
 Oracle FA 11i class
 11i Project Mgt
 11i procurement
 11i collections


 Oracle Posters
 Oracle Books

 Oracle Tuning Book
 Oracle RAC Book
 Oracle Security
 Easy Oracle Books
 Oracle Scripts
 SQL Server DBA
 SQL Design Patterns
 Ion
 Excel-DB   


 BC Oracle News


 Rednecks!
 Dress code
 Arabian Stallion

 Burleson Arabians
 Guide Horses
 Don Burleson Blog
 Golf & Travel


 Privacy Policy
 

 

 

 
 

Dictionary query to display function-based index function

Oracle Tips by Burleson Consulting

 

Question: I had good working query while selecting from dba_indexes and dba_columns. But then it turns out that if I have a function based index, this column names do not appear properly - I get only their system generated names.


The names I need to pull are in dba_ind_expressions and I tried to join this view to my existing query but this column is a long type, and I get errors.  I tried to convert the long value to varchar, lob, etc, with no success.

 

How do I display the value of a function within a function-based index dictionary query?
 

 

Answer:  The Oracle script collection has dictionary queries to display the values of a function-based index, but I'm not allowed to display the whole dictionary script.

The dba_indexes view has a new column that makes this easier, the funcidx_status column. The funcidx_status column contains NULL if the index is not a function-based index, ENABLED if it is a function-based index and is ready for use, and DISABLED if it is a function-based index that is disabled and can’t be used. If the value in funcidx_status is not NULL, a join to the dba_ind_expressions view will provide the information on the expression used to create the function-based column in the index.

Note:  Once a function-based index is created, you need to create CBO statistics, but beware that there are numerous bugs and issues when analyzing a function-based index.  See these important notes on statistics and function-based indexes.

 

The script below demonstrates this type of report; an example of the output from this script follows.


COLUMN owner FORMAT a6 HEADING 'Owner'
COLUMN index_name FORMAT a14 HEADING 'Index'
COLUMN table_name FORMAT a20 HEADING 'Table'
COLUMN column_expression FORMAT a80 WORD_WRAPPED HEADING 'Expression'
SET LINES 130
ttitle 'Functional Index Report'
BREAK ON index_owner on index_name

SELECT
   index_owner,
   index_name,
   table_name,
   column_expression
FROM
   dba_ind_expressions,
SEE CODE DEPOT FOR FULL SCRIPT
ORDER BY
Index_owner,index_name,column_position;


Here is a sample listing.

Owner Index Table Expression
---------- ---------------- ----------------- ---------------------
TELE_DBA DEC_CLIENTSV8i CLIENTSV8i DECODE ("CREATION_SY_USER",1,'B
OSS',2,'Manager',3,'Clerk','Ev
eryone else')


 

 

  
 

 Oracle cruise
 
 
 
Oracle performance tuning software
 
 

Oracle performance tuning book

 

 
 
 
Oracle performance Tuning 10g reference poster
 
 
 
Oracle training in Linux commands
 
Oracle training Excel
 
Oracle training & performance tuning books
 

 

Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  and include the URL for the page.
 
 


Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

 

Remote DBA Services


 

Copyright © 1996 -  2009 by Burleson Enterprises, Inc. All rights reserved.

Oracle © is the registered trademark of Oracle Corporation.