经常在网上看到这样的语句,一直不是很理解,select tablespace_name, segment_type, owner, segment_name, partition_name FROM dba_extents WHERE file_id between block_id AND block_id + blocks – 1
这里blocks ,block_id从哪里来? 谢谢!!
这里blocks ,block_id从哪里来? 谢谢!!
是视图的字段 tablespace_name 表空间名称
segment_type segment类型
owner 所属用户
==
也是该视图的 字段 加上条件 blocks 应该是块吧
Name Type Nullable Default Comments
--------------- ------------ -------- ------- ---------------------------------------------------------
OWNER VARCHAR2(30) Y Owner of the segment associated with the extent
SEGMENT_NAME VARCHAR2(81) Y Name of the segment associated with the extent
PARTITION_NAME VARCHAR2(30) Y Partition/Subpartition Name, if any, of the segment
SEGMENT_TYPE VARCHAR2(18) Y Type of the segment
TABLESPACE_NAME VARCHAR2(30) Y Name of the tablespace containing the extent
EXTENT_ID NUMBER Y Extent number in the segment
FILE_ID NUMBER Y Name of the file containing the extent
BLOCK_ID NUMBER Y Starting block number of the extent
BYTES NUMBER Y Size of the extent in bytes
BLOCKS NUMBER Y Size of the extent in ORACLE blocks
RELATIVE_FNO NUMBER Y Relative number of the file containing the segment header
SQL>