11.Oracle杂记——数据字典dba_segments

11.Oracle杂记——数据字典dba_segments

视图dba_segments:所有数据库段分段的存储空间  

视图描述如下:

sys@PDB1> desc dba_segments;

Name                                                                                                       Null?         Type

 ------------------------------------------------------------- ------------------------------------

 OWNER                                                                                                                                                VARCHAR2(128)

 SEGMENT_NAME                                                                                                                            VARCHAR2(128)

 PARTITION_NAME                                                                                                      VARCHAR2(128)

 SEGMENT_TYPE                                                                                                                               VARCHAR2(18)

 SEGMENT_SUBTYPE                                                                                                     VARCHAR2(10)

 TABLESPACE_NAME                                                                                                     VARCHAR2(30)

 HEADER_FILE                                                                                                                  NUMBER

 HEADER_BLOCK                                                                                                              NUMBER

 BYTES                                                                                                                                 NUMBER

 BLOCKS                                                                                                                            NUMBER

 EXTENTS                                                                                                                            NUMBER

 INITIAL_EXTENT                                                                                                           NUMBER

 NEXT_EXTENT                                                                                                                 NUMBER

 MIN_EXTENTS                                                                                                                NUMBER

 MAX_EXTENTS                                                                                                               NUMBER

 MAX_SIZE                                                                                                                        NUMBER

 RETENTION                                                                                                                      VARCHAR2(7)

 MINRETENTION                                                                                                             NUMBER

 PCT_INCREASE                                                                                                                NUMBER

 FREELISTS                                                                                                                         NUMBER

 FREELIST_GROUPS                                                                                                        NUMBER

 RELATIVE_FNO                                                                                                               NUMBER

 BUFFER_POOL                                                                                                                VARCHAR2(7)

 FLASH_CACHE                                                                                                                 VARCHAR2(7)

 CELL_FLASH_CACHE                                                                                                     VARCHAR2(7)

 INMEMORY                                                                                                                     VARCHAR2(8)

 INMEMORY_PRIORITY                                                                                                VARCHAR2(8)

 INMEMORY_DISTRIBUTE                                                                                                             VARCHAR2(15)

 INMEMORY_DUPLICATE                                                                                            VARCHAR2(13)

 INMEMORY_COMPRESSION                                                                                                      VARCHAR2(17)

列描述如下:

OWNER:段拥有者的名字

 SEGMENT_NAME:段的名字

 PARTITION_NAME:对象分区名字(如果没有分区对象,则设置为NULL)

 SEGMENT_TYPE:段类型。

                                    可以如下:

■ NESTED TABLE
■ TABLE
■ TABLE PARTITION
■ CLUSTER
■ LOBINDEX
■ INDEX
■ INDEX PARTITION
■ LOBSEGMENT
■ TABLE SUBPARTITION
■ INDEX SUBPARTITION
■ LOB PARTITION
■ LOB SUBPARTITION
■ ROLLBACK
■ TYPE2 UNDO
■ DEFERRED ROLLBACK
■ TEMPORARY
■ CACHE
■ SPACE HEADER
■ UNDEFINED

 

 SEGMENT_SUBTYPE:LOB段的子类型

 TABLESPACE_NAME:包含段的表空间

 HEADER_FILE      :包含段头的文件ID

 HEADER_BLOCK  :包含段头的BLOCKID

 BYTES   :段的大小

 BLOCKS:段的块数量

 EXTENTS:块的分区数量

 INITIAL_EXTENT                 :段在创建时候的区初始化大小

 NEXT_EXTENT:下一个分区的大小

 MIN_EXTENTS:最小分区数量

 MAX_EXTENTS:最大分区数量

 MAX_SIZE:段中允许的最大块数量

 RETENTION:SECUREFILE段的保留选项

 MINRETENTION :SECUREFILE段的最小保留时间

 PCT_INCREASE    :下一个分区的增加比例

 FREELISTS: 分配到这个段的自由进程列表数量

 FREELIST_GROUPS:分配到这个段的自由列表组

 RELATIVE_FNO:段头的相对文件号

 BUFFER_POOL:用于段块的BUFFER POOL类型(DEFAULT,KEEP,RECYCLE)

 FLASH_CACHE:用于SAMRT FLASH CACHE提示的方式

 CELL_FLASH_CACHE           :用于Cell flash cache提示的方式

 INMEMORY         :是否使用In-Memory列存储

 INMEMORY_PRIORITY      :In-Memory列存储的优先级

 INMEMORY_DISTRIBUTE                   :IM列存储是否使用分布式

 INMEMORY_DUPLICATE:在RAC环境中是否为IM列存储使用duplicate设置

 INMEMORY_COMPRESSION            :在IM列存储中压缩等级。

注意:这些内存相关,如果没有使用IN-MEMORY的话,那么就是空的了。

执行如下:

sys@PDB1> select * from dba_segments where rownum<= 1;

 

OWNER

----------------------------------------------------------------------------------------------------

SEGMENT_NAME

----------------------------------------------------------------------------------------------------

PARTITION_NAME

----------------------------------------------------------------------------------------------------

SEGMENT_TYPE      SEGMENT_SUTABLESPACE_NAME                                   HEADER_FILE HEADER_BLOCK                    BYTES

------------------ ---------------------------------------- ----------- ------------ ----------

   BLOCKS    EXTENTS INITIAL_EXTENTNEXT_EXTENT MIN_EXTENTS MAX_EXTENTS  MAX_SIZE RETENTI

---------- ---------- ------------------------- ----------- ----------- ---------- -------

MINRETENTION PCT_INCREASE  FREELISTS FREELIST_GROUPS RELATIVE_FNOBUFFER_ FLASH_C CELL_FL INMEMORY

------------ ------------ ------------------------- ------------ ------- ------- ------- --------

INMEMORY INMEMORY_DISTRI INMEMORY_DUPL INMEMORY_COMPRESS

-------- --------------- ------------------------------

SYS

SYS_LOB0000012926C00016$$

SYS_LOB_P595

LOB PARTITION        SECUREFILE SYSAUX                                                                   9                64185       131072

                  16                1            106496      1048576                   1 2147483645 2147483645 DEFAULT

                     0                         

 

 

 

 

 

 

 

你可能感兴趣的:(Oracle)