메뉴 건너뛰기

Korea Oracle User Group

Guru's Articles

Quick tip on Function Based Indexes

명품관 2016.04.19 11:30 조회 수 : 191

Quick tip on Function Based Indexes

 

 

For “normal” indexes, USER_IND_COLUMNS will contain the column name(s) for an index, but things (appear to) go astray when looking at function-based indexes.

SQL> create table blah ( x varchar2(30));

Table created.

SQL> create index blah_ix on blah ( upper(x));

Index created.

SQL> select column_name from user_ind_columns
  2  where index_name = 'BLAH_IX'
  3  /

COLUMN_NAME
------------------------------
SYS_NC00002$

 

Don’t panic. Simply take a look at USER_IND_EXPRESSIONS to find the function that you used.

SQL> select column_expression from user_ind_expressions
  2  where index_name = 'BLAH_IX'
  3  /

COLUMN_EXPRESSION
--------------------------------------------------------------------------------
UPPER("X")


 

Easy peasy

 

출처 : https://connormcdonald.wordpress.com/2016/04/17/quick-tip-on-function-based-indexes/

번호 제목 글쓴이 날짜 조회 수
공지 Guru's Article 게시판 용도 ecrossoug 2015.11.18 607
23 Brief about Workload Management in Oracle RAC file ecrossoug 2015.11.18 514
22 11.1.0.6 부터 지원하는 Oracle Online Patching New Feature 명품관 2016.04.22 523
21 Different MOS Notes for xTTS PERL scripts – Use V4 scripts 명품관 2019.01.29 528
20 New Features in Oracle Database 19c 명품관 2019.02.02 544
19 Explain the Explain Plan: Cardinality Estimates 명품관 2021.02.09 617
18 New Features in Oracle Multitenant 19c 명품관 2019.02.07 744
17 Explain the Explain Plan: Join Methods 명품관 2021.02.10 747
16 Top 5 SQL Monitor Features file 명품관 2015.12.01 780
15 Parameter Recommendations for Oracle Database 12c - Part I 명품관 2016.03.07 844
14 New Features of Performance Tuning in Oracle Database 19c 명품관 2019.02.08 918
13 New Features of RAC & ASM in Oracle 19c 명품관 2019.02.08 953
12 Explain the Explain Plan: Access Methods 명품관 2021.02.10 959
11 Patch conflicts 명품관 2019.02.07 973
10 How to Recover Data (Without a Backup!) 명품관 2016.05.11 1355
9 DDL Logging - 12c (조나단 루이스) 명품관 2016.04.26 1498
8 New initialization parameters, data dictionary views & dynamic performance views in Oracle Database 19c 명품관 2019.02.08 1912
7 How to change the database name in 12c 명품관 2016.05.31 1994
6 New Features of Data Guard in Oracle Database 19c 명품관 2019.02.08 2004
5 Oracle 12c SQL – Using JSON 명품관 2015.12.29 2583
위로