DBA_SEGMENTS - 查看数据库对象所分配的物理存储空间

  1. SELECT SEGMENT_NAME,SEGMENT_TYPE,<code>TABLESPACE_NAME</code>,EXTENTS,BLOCKS,BYTES/1024/1024/1024  GB  
  2. FROM DBA_SEGMENTS   
  3. WHERE SEGMENT_NAME = Upper('MTL_MATERIAL_TRANSACTIONS');  

 

Oracle逻辑结构全景结构图

Oracle 逻辑结构的相关数据字典:

  1. SELECT * FROM DBA_TABLESPACES -- 记录各个表空间的详细信息  
  2. SELECT * FROM DBA_TABLESPACE_USAGE_METRICS -- 记录各个表空间的使用状况  
  3. SELECT * FROM DBA_DATA_FILES -- 记录各个数据文件的详细信息  
  4. SELECT * FROM DBA_SEGMENTS -- 记录各个段的详细信息,与 DBA_TABLES,DBA_INDEXES,DBA_LOBS,DBA_PART_TABLES,DBA_PART_INDEXES,DBA_PART_LOBS,DBA_OBJECTS 搭配使用  
  5. SELECT * FROM DBA_LOBS    --BLOB 字段所对应的字段名称  
  6. SELECT * FROM DBA_INDEXES -- 分区索引需要通过 DBA_INDEXS 来找到对应的表名  
  7. SELECT * FROM DBA_EXTENTS -- 记录各个区间对象的详细信息   

Question:  What is the difference between dba_segments and dba_tables?
Answer:  The dba_tables view describes a "logical" structure while dba_segments describes the "physical" data segment, like a data file.
Also, columns like "blocks" are different between dba_tables and dba_segments.  In dba_tables, the "blocks" are calculated when you run dbms_stats, while in dba_segments, "blocks" is the actual number of blocks used by the object on disk.

 

Reference:http://baoqiangwang.blog.51cto.com/1554549/312705

http://dba-oracle.com/t_difference_dba_tables_dba_segments.htm

 

posted @ 2018-01-07 21:24  lclc  阅读(2979)  评论(0编辑  收藏  举报