=> 모든 컬럼, 모든 Index대상 컬럼, 개별컬럼, Hidden컬럼들에 대해서, Bucket Size를 정할 수 있는 여러가지 옵션(skewonly, auto, 숫자)을 주어 히스토그램을 생성할 수 있다.
h3.(예제) Function Based Index에 의해 생성된 Hidden Column 정보확인 및 Histogram 생성법
SQL> create or replace type obj_type as object(c1 int, c2 int);
2 /
SQL> create table t1(c1 int, c2 obj_type);
SQL> create index t1_n1 on t1(c1+1);
------------------
02. column stats
------------------
TABLE_NAME : T1
COLUMN_NAME : C1
NUM_DISTINCT :
NUM_NULLS :
DENSITY :
LOW_VALUE :
HIGH_VALUE :
HISTOGRAM : NONE
-----------------
TABLE_NAME : T1
COLUMN_NAME : C2
NUM_DISTINCT :
NUM_NULLS :
DENSITY :
LOW_VALUE :
HIGH_VALUE :
HISTOGRAM : NONE
-----------------
TABLE_NAME : T1
COLUMN_NAME : SYS_NC00003$
NUM_DISTINCT :
NUM_NULLS :
DENSITY :
LOW_VALUE :
HIGH_VALUE :
HISTOGRAM : NONE
-----------------
TABLE_NAME : T1
COLUMN_NAME : SYS_NC00004$
NUM_DISTINCT :
NUM_NULLS :
DENSITY :
LOW_VALUE :
HIGH_VALUE :
HISTOGRAM : NONE
-----------------
TABLE_NAME : T1
COLUMN_NAME : SYS_NC00005$
NUM_DISTINCT :
NUM_NULLS :
DENSITY :
LOW_VALUE :
HIGH_VALUE :
HISTOGRAM : NONE
-----------------
SQL> exec dbms_stats.gather_table_stats(user, 't1', method_opt=>'for all hidden columns size skewonly');
SQL> exec dbms_stats.gather_table_stats(user, 't1', method_opt=>'for columns SYS_NC00003$ size skewonly');
상황
문제제기
T1이 T2와 같이 되려면?