DBA Data[Home] [Help]

VIEW: SYS.SYS_UNCOMPRESSED_SEGS

Source

View Text - Preformatted

select
  uncmp.owner, uncmp.segment_name, uncmp.partition_name,
  uncmp.tablespace_name, uncmp.tablespace_id,
  decode(bitand(segment_flags, 131072), 131072, blocks,
         (decode(bitand(segment_flags,1),1,
         dbms_space_admin.segment_number_blocks(tablespace_id, header_file,
         header_block, segment_type_id, buffer_pool_id, segment_flags,
         segment_objd, blocks), blocks)))*blocksize,
  uncmp.segment_objd, uncmp.segment_objn,
  uncmp.segment_type,
  count(i.obj#)
from sys_uncompressed_segs_base uncmp, ind$ i
where
  uncmp.segment_objn = i.bo#
group by
  uncmp.owner, uncmp.segment_name, uncmp.partition_name,
  uncmp.tablespacE_name, uncmp.tablespace_id,
  decode(bitand(segment_flags, 131072), 131072, blocks,
         (decode(bitand(segment_flags,1),1,
         dbms_space_admin.segment_number_blocks(tablespace_id, header_file,
         header_block, segment_type_id, buffer_pool_id, segment_flags,
         segment_objd, blocks), blocks)))*blocksize,
  uncmp.segment_objd, uncmp.segment_objn, uncmp.segment_type
View Text - HTML Formatted

SELECT UNCMP.OWNER
, UNCMP.SEGMENT_NAME
, UNCMP.PARTITION_NAME
, UNCMP.TABLESPACE_NAME
, UNCMP.TABLESPACE_ID
, DECODE(BITAND(SEGMENT_FLAGS
, 131072)
, 131072
, BLOCKS
, (DECODE(BITAND(SEGMENT_FLAGS
, 1)
, 1
, DBMS_SPACE_ADMIN.SEGMENT_NUMBER_BLOCKS(TABLESPACE_ID
, HEADER_FILE
, HEADER_BLOCK
, SEGMENT_TYPE_ID
, BUFFER_POOL_ID
, SEGMENT_FLAGS
, SEGMENT_OBJD
, BLOCKS)
, BLOCKS)))*BLOCKSIZE
, UNCMP.SEGMENT_OBJD
, UNCMP.SEGMENT_OBJN
, UNCMP.SEGMENT_TYPE
, COUNT(I.OBJ#) FROM SYS_UNCOMPRESSED_SEGS_BASE UNCMP
, IND$ I WHERE UNCMP.SEGMENT_OBJN = I.BO# GROUP BY UNCMP.OWNER
, UNCMP.SEGMENT_NAME
, UNCMP.PARTITION_NAME
, UNCMP.TABLESPACE_NAME
, UNCMP.TABLESPACE_ID
, DECODE(BITAND(SEGMENT_FLAGS
, 131072)
, 131072
, BLOCKS
, (DECODE(BITAND(SEGMENT_FLAGS
, 1)
, 1
, DBMS_SPACE_ADMIN.SEGMENT_NUMBER_BLOCKS(TABLESPACE_ID
, HEADER_FILE
, HEADER_BLOCK
, SEGMENT_TYPE_ID
, BUFFER_POOL_ID
, SEGMENT_FLAGS
, SEGMENT_OBJD
, BLOCKS)
, BLOCKS)))*BLOCKSIZE
, UNCMP.SEGMENT_OBJD
, UNCMP.SEGMENT_OBJN
, UNCMP.SEGMENT_TYPE