SQL> SELECT dbms_stats.CREATE_EXTENDED_STATS(ownname => user,
2 tabname => 'T',
3 extension => '(upper(pad))') AS ext1,
4 dbms_stats.CREATE_EXTENDED_STATS(ownname => user,
5 tabname => 'T',
6 extension => '(val2,val3)') AS ext2
7 FROM dual;
EXT1
----------------------------
EXT2
----------------------------
SYS_STU0KSQX64#I01CKJ5FPGFK3W9
SYS_STUPS77EFBJCOTDFMHM8CHP7Q1
SQL> SELECT extension_name, extension
2 FROM USER_STAT_EXTENSIONS
3 WHERE table_name = 'T';
EXTENSION_NAME EXTENSION
------------------------------ ---------------
SYS_STU0KSQX64#I01CKJ5FPGFK3W9 (UPPER("PAD"))
SYS_STUPS77EFBJCOTDFMHM8CHP7Q1 ("VAL2","VAL3")
SQL> SELECT column_name, data_type, hidden_column, data_default
2 FROM USER_TAB_COLS
3 WHERE table_name = 'T'
4 ORDER BY column_id;
COLUMN_NAME DATA_TYPE HIDDEN
------------------------------ --------- ------
DATA_DEFAULT
--------------------------------------------------------------------------------
ID NUMBER NO
VAL1 NUMBER NO
VAL2 NUMBER NO
VAL3 NUMBER NO
PAD VARCHAR2 NO
SYS_STU0KSQX64#I01CKJ5FPGFK3W9 VARCHAR2 YES
UPPER("PAD")
SYS_STUPS77EFBJCOTDFMHM8CHP7Q1 NUMBER YES
SYS_OP_COMBINED_HASH("VAL2","VAL3")
SQL> BEGIN
2 dbms_stats.drop_extended_stats(ownname => 'JIGI',
3 tabname => 'T',
4 extension => '(upper(pad))');
5 dbms_stats.drop_extended_stats(ownname => 'JIGI',
6 tabname => 'T',
7 extension => '(val2,val3)');
8 END;
9 /
SQL> BEGIN
2 dbms_stats.seed_col_usage(sqlset_name => NULL,
3 owner_name => NULL,
4 time_limit => 30);
5 END;
6 /
SQL>
SQL> SELECT dbms_stats.create_extended_stats(ownname => user, tabname => 't')
2 FROM dual;
DBMS_STATS.CREATE_EXTENDED_STATS(OWNNAME=>USER,TABNAME=>'T')
--------------------------------------------------------------------------------
###############################################################################
SQL>
SQL> PAUSE
SQL>
SQL> SELECT column_name, data_type, hidden_column, data_default
2 FROM user_tab_cols
3 WHERE table_name = 'T'
4 ORDER BY column_id;
COLUMN_NAME DATA_TYPE HIDDEN DATA_DEFAULT
------------------------------ --------- ------ -----------------------------------
VAL1 NUMBER NO
VAL2 NUMBER NO
VAL3 NUMBER NO
VAL4 NUMBER NO
SYS_STU4K1K3JNH1Z9#_L_V93K3DT4 NUMBER YES SYS_OP_COMBINED_HASH("VAL1","VAL2")
SYS_STUPS77EFBJCOTDFMHM8CHP7Q1 NUMBER YES SYS_OP_COMBINED_HASH("VAL2","VAL3")
SYS_STUSS3AZ43WO3NKM#66PIG2JYW NUMBER YES SYS_OP_COMBINED_HASH("VAL3","VAL4")
SYS_STUS574STTDWYBF6PGQN#XHGGJ NUMBER YES SYS_OP_COMBINED_HASH("VAL1","VAL3")
SQL> CREATE TABLE persons (
2 name VARCHAR2(100),
3 name_upper AS (upper(name))
4 );
SQL>
SQL> INSERT INTO persons (name) VALUES ('Michelle');
SQL>
SQL> SELECT name
2 FROM persons
3 WHERE name_upper = 'MICHELLE';
NAME
----------
Michelle
- 강좌 URL : http://www.gurubee.net/lecture/4378
- 구루비 강좌는 개인의 학습용으로만 사용 할 수 있으며, 다른 웹 페이지에 게재할 경우에는 출처를 꼭 밝혀 주시면 고맙겠습니다.~^^
- 구루비 강좌는 서비스 제공을 위한 목적이나, 학원 홍보, 수익을 얻기 위한 용도로 사용 할 수 없습니다.