1. 程式人生 > >oracle -- (三)數據段(segment)

oracle -- (三)數據段(segment)

pre roc clu extent 用戶 res part spa enabled

基本關系:數據庫---表空間---數據段---分區---數據塊


數據段(segment)
段(segment)由一系列的extent組成。通常一張表是一個segment。

Oracle中的段可以分成4種類型:數據段、索引段、回滾段、臨時段。
數據段用來存儲用戶的數據,每個表都有一個對應的回滾段,其名稱和數據表的名字相同。索引段用來存儲系統、用戶的索引信息。回滾段用來存儲用戶數據修改前的值,回退段與事務是一對多的關系,一個事務只能使用一個回退段,而一個回退段可存放一個或多個事務的回退數據。臨時段用於order by語句的排序以及一些匯總。

SQL> desc dba_segments;
Name Type Nullable Default Comments
-------------------- ------------- -------- ------- --------------------------------------------------------------------------------------------------------------------------------------
OWNER VARCHAR2(128) Y Username of the segment owner
SEGMENT_NAME VARCHAR2(128) Y Name, if any, of the segment
PARTITION_NAME VARCHAR2(128) Y Partition/Subpartition Name, if any, of the segment
SEGMENT_TYPE VARCHAR2(18) Y Type of segment: "TABLE", "CLUSTER", "INDEX", "ROLLBACK","DEFERRED ROLLBACK",                                "TEMPORARY","SPACE HEADER", "TYPE2 UNDO" or "CACHE"
SEGMENT_SUBTYPE VARCHAR2(10) Y SubType of Lob segment: "SECUREFILE", "ASSM", "MSSM", NULL
TABLESPACE_NAME VARCHAR2(30) Y Name of the tablespace containing the segment
HEADER_FILE    NUMBER Y ID of the file containing the segment header
HEADER_BLOCK NUMBER Y ID of the block containing the segment header
BYTES    NUMBER Y Size, in bytes, of the segment
BLOCKS    NUMBER Y Size, in Oracle blocks, of the segment
EXTENTS    NUMBER Y Number of extents allocated to the segment
INITIAL_EXTENT NUMBER Y Size, in bytes, of the initial extent of the segment
NEXT_EXTENT NUMBER Y Size, in bytes, of the next extent to be allocated to the segment
MIN_EXTENTS NUMBER Y Minimum number of extents allowed in the segment
MAX_EXTENTS NUMBER Y Maximum number of extents allowed in the segment
MAX_SIZE    NUMBER Y Maximum number of blocks allowed in the segment
RETENTION    VARCHAR2(7) Y Retention option for SECUREFILE segment
MINRETENTION NUMBER Y Minimum Retention Duration for SECUREFILE segment
PCT_INCREASE NUMBER Y Percent by which to increase the size of the next extent to be allocated
FREELISTS    NUMBER Y Number of process freelists allocated in this segment
FREELIST_GROUPS NUMBER Y Number of freelist groups allocated in this segment
RELATIVE_FNO    NUMBER Y Relative number of the file containing the segment header
BUFFER_POOL    VARCHAR2(7) Y The default buffer pool to be used for segments blocks
FLASH_CACHE    VARCHAR2(7) Y
CELL_FLASH_CACHE    VARCHAR2(7) Y
INMEMORY     VARCHAR2(8) Y Whether in-memory is enabled or not
INMEMORY_PRIORITY VARCHAR2(8) Y User defined priority in which in-memory column store object is loaded
INMEMORY_DISTRIBUTE VARCHAR2(15) Y How the in-memory columnar store object is distributed
INMEMORY_DUPLICATE VARCHAR2(13) Y How the in-memory column store object is duplicated
INMEMORY_COMPRESSION VARCHAR2(17) Y Compression level for the in-memory column store option
CELLMEMORY VARCHAR2(24) Y Cell columnar cache


oracle -- (三)數據段(segment)