메뉴 건너뛰기

Korea Oracle User Group

Guru's Articles

Quick tip on Function Based Indexes

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

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 49
38 New initialization parameters, data dictionary views & dynamic performance views in Oracle Database 19c 명품관 2019.02.08 23
37 More New Features in Oracle Database 19c 명품관 2019.02.08 26
36 New Features of Performance Tuning in Oracle Database 19c 명품관 2019.02.08 26
35 New Features of RAC & ASM in Oracle 19c 명품관 2019.02.08 28
34 New Features of Data Guard in Oracle Database 19c 명품관 2019.02.08 22
33 New Features of Security in Oracle Database 19c 명품관 2019.02.08 24
32 Patch conflicts 명품관 2019.02.07 17
31 New Features in Oracle Multitenant 19c 명품관 2019.02.07 14
30 New Features of Backup & Recovery in Oracle Database 19c 명품관 2019.02.07 17
29 New Features in Oracle Database 19c 명품관 2019.02.02 21
28 Different MOS Notes for xTTS PERL scripts – Use V4 scripts 명품관 2019.01.29 13
27 V$EVENT_NAME 뷰의 Name 컬럼에 정의된 event name에서 오는 오해 명품관 2017.03.08 107
26 Can I apply a BP on top of a PSU? Or vice versa? 명품관 2016.06.01 170
25 How to change the database name in 12c 명품관 2016.05.31 100
24 How to Recover Data (Without a Backup!) 명품관 2016.05.11 152
23 On ROWNUM and Limiting Results (오라클 매거진 : AskTom) 명품관 2016.04.28 182
22 DDL Logging - 12c (조나단 루이스) 명품관 2016.04.26 1245
21 11.1.0.6 부터 지원하는 Oracle Online Patching New Feature 명품관 2016.04.22 239
» Quick tip on Function Based Indexes 명품관 2016.04.19 105
19 Oracle Linux 6.7 with Oracle 11.2.0.4 RAC 명품관 2016.04.15 1600
위로