oracle -- 数据段(segment)

Posted sunziying

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了oracle -- 数据段(segment)相关的知识,希望对你有一定的参考价值。

基本关系:数据库---表空间---数据段---分区---数据块


数据段(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)的主要内容,如果未能解决你的问题,请参考以下文章

oracle -- 数据段(segment)

oracle中的表空间(tablespace)方案(schema)段(segment)区(extent)块(block)

Oracle数据库的表有多大呢?

无限序列 1, 3, 2, 3, 1

oracle 高水位线详解

oracle 高水位线详解