반응형

RDBMS 16

아카이브 로그(Archive log) 관련 SQL

- 매일 적재량 select trunc(COMPLETION_TIME) TIME, SUM(BLOCKS * BLOCK_SIZE)/1024/1024 size_MB from v$ARCHIVED_LOG group by trunc(completion_time); - 로그파일 사이즈 select a.group#, a.thread#, a.sequence#, a.archived, a.status, b.member as relog_file_name, a.bytes/1024/1024 as size_mb from v$log a inner join v$logfile b on a.group#=b.group# order by a.group# asc; - 파일사이즈 조정 alter system checkpoint; alter dat..

RDBMS/Oracle 2021.01.14

Gather statistics about objects(통계정보 생성)

- Gather(통계수집 실행 ) -> ALL(전체) : DBMS_UTILITY.[ANALYZE_DATABASE / ANALYZE_SCHEMA] -> By table(테이블별) : DBMS_STATS.gather_table_stats (ex) exec dbms_stats.gather_table_stats(ownname=> 'HR', tabname => 'DEPT', cascade => TRUE, block_sample=>false , method_opt=>'for all columns size 1', granularity=>'GLOBAL', no_invalidate=> FALSE, estimate_percent => 0.01, degree=>16); - 확인 -> Table : select table_n..

RDBMS/Oracle 2020.12.18
반응형