DB 통계 수집에 영향을 주는 파라미터 확인 및 값을 변경
1. db 설정값 확인
SET LINESIZE 250
COLUMN autostats_target FORMAT A20
COLUMN cascade FORMAT A25
COLUMN degree FORMAT A10
COLUMN estimate_percent FORMAT A30
COLUMN method_opt FORMAT A25
COLUMN no_invalidate FORMAT A30
COLUMN granularity FORMAT A15
COLUMN publish FORMAT A10
COLUMN incremental FORMAT A15
COLUMN stale_percent FORMAT A15
SELECT DBMS_STATS.GET_PREFS('AUTOSTATS_TARGET') AS autostats_target, -- over 11g
DBMS_STATS.GET_PREFS('CASCADE') AS cascade,
DBMS_STATS.GET_PREFS('DEGREE') AS degree,
DBMS_STATS.GET_PREFS('ESTIMATE_PERCENT') AS estimate_percent,
DBMS_STATS.GET_PREFS('METHOD_OPT') AS method_opt,
DBMS_STATS.GET_PREFS('NO_INVALIDATE') AS no_invalidate,
DBMS_STATS.GET_PREFS('GRANULARITY') AS granularity,
DBMS_STATS.GET_PREFS('PUBLISH') AS publish,
DBMS_STATS.GET_PREFS('INCREMENTAL') AS incremental,
DBMS_STATS.GET_PREFS('STALE_PERCENT') AS stale_percent,
DBMS_STATS.GET_PREFS('APPROXIMATE_NDV_ALGORITHM') as approximate_dev, -- over 18c
DBMS_STATS.GET_PREFS('AUTO_STAT_EXTENSIONS') as auto_stat_extensions,
DBMS_STATS.GET_PREFS('GLOBAL_TEMP_TABLE_STATS') as global_temp_stats,
DBMS_STATS.GET_PREFS('INCREMENTAL_STALENESS') as incremental_staleness,
DBMS_STATS.GET_PREFS('INCREMENTAL_LEVEL') as incremental_level,
DBMS_STATS.GET_PREFS('OPTIONS') as options,
DBMS_STATS.GET_PREFS('PREFERENCE_OVERRIDES_PARAMETER') as preference,
DBMS_STATS.GET_PREFS('STAT_CATEGORY') as stat_category,
DBMS_STATS.GET_PREFS('TABLE_CACHED_BLOCKS') as table_cached_blocks
FROM dual;
2. 설정값 변경
exec DBMS_STATS.SET_GLOBAL_PREFS(pname=>'METHOD_OPT', pvalue=>'FOR ALL COLUMNS SIZE 1');
exec DBMS_STATS.SET_GLOBAL_PREFS(pname=>'INCREMENTAL', pvalue=> 'TRUE);
'RDB > Oracle' 카테고리의 다른 글
oracle 18c system 통계 정보 수집 (0) | 2019.09.20 |
---|---|
oracle system object 통계 수집 (0) | 2019.09.20 |
oracle gimr data 수집 (0) | 2019.09.04 |
oracle 18c health check (0) | 2019.09.04 |
오라클 결과물을 html로 출력 (0) | 2019.09.04 |