對組合列創建統計信息
--檢查表結構
select * from scott.emp where 1=2;
--創建虛擬列 會輸出虛擬列名
select dbms_stats.create_extended_stats('scott','emp','(empno,JOB)') from dual;
select * from dba_tab_cols where column_name like 'SYS_STU%';
--查看列名
select * from dba_tab_cols a where a.column_name='SYS_STU9D8L7V4NR#823O9R1EKCA6C';
--查看列組合的統計信息
select * from dba_stat_extensions where extension_name='SYS_STU9D8L7V4NR#823O9R1EKCA6C';
--對組合列收集直方圖,則可以如下所示:
exec dbms_stats.gather_table_stats('scott','emp',method_opt=>'for columns (empno,JOB) size AUTO');