행위

오라클 세그먼트

DB CAFE

Dbcafe (토론 | 기여)님의 2019년 5월 15일 (수) 23:43 판 (새 문서: select decode( segment_type, 'TABLE', segment_name, table_name ) order_col1, decode( segment_type, 'TABLE',...)
(차이) ← 이전 판 | 최신판 (차이) | 다음 판 → (차이)
thumb_up 추천메뉴 바로가기


select decode( segment_type, 'TABLE',

                                                    segment_name, table_name ) order_col1, 
                    decode( segment_type, 'TABLE', 1, 2 ) order_col2, 
                    'alter ' || segment_type || ' ' || segment_name || 
                    decode( segment_type, 'TABLE', ' move ', ' rebuild ' ) || 
                    chr(10) || 
                    ' HONEY_DATASPACE ' || chr(10) || 
                    ' storage ( initial ' || initial_extent || ' next ' || 
                    next_extent || chr(10) || 
                    ' minextents ' || min_extents || ' maxextents ' || 
                    max_extents || chr(10) || 
                    ' pctincrease ' || pct_increase || ' freelists ' || 
                    freelists || ');' 
      from user_segments, 
                    (select table_name, index_name from user_indexes ) 
      where segment_type in ( 'TABLE', 'INDEX' ) 
      and segment_name = index_name (+) 
      order by 1, 2