Oracle 视图 V$SORT_SEGMENT 官方解释,作用,如何使用详细说明
本站中文解释
Oracle视图V$SORT_SEGMENT提供了排序操作的所有非缓存段的信息,它用于实时显示当前用户有多少正在排序操作的非缓存段。
这些视图的结构和字段如下:
OWNER 拥有此段的用户
SPACE 该段申请的总空间
MAX_SIZE 此段中可用最大排序空间大小,如果排序段在物理存储结构中最大大小为0表示此排序段是共享的
SEGMENT_TYPE 此段的类型,如果此段是专用的,则显示PRIVATE,如果此段是共享的,则显示SHARED
ALLOCATED_EXTENTS 该段已分配的扩展数
EXTENTS 该段可用的最大扩展数
SESSION_ID 有此非缓存段的会话ID
SEGMENT_ID 排序段ID
EXTENT# 如果此部分是专用的,则返回从0开始的扩展序号,如果此段是共享的,则返回-1.
BLOCK# 如果此部分是专用的,则返回扩展的起始块号,如果此段是共享的,则返回NULL.
BLOCKS 此段可利用的块数
STATUS 此段的状态
可以使用这个视图来查询如何使用存储空间不足的系统,因为它能够显示每一个正在排序操作的段,以及这些段已分配的空间大小。可以利用这个视图了解按用户或会话ID活动的排序操作。
例如,要查看某个用户排序操作当前请求的空间,可以使用以下查询:
SELECT SESSION_ID,Owner,Space FROM V$SORT_SEGMENT WHERE Owner = ;
官方英文解释
V$SORT_SEGMENT
displays information about every sort segment in a given instance. The view is only updated when the tablespace is of the TEMPORARY
type.
Column | Datatype | Description |
---|---|---|
|
|
Name of the tablespace |
|
|
File number of the first extent |
|
|
Block number of the first extent |
|
|
Extent size |
|
|
Number of active users of the segment |
|
|
Total number of extents in the segment |
|
|
Total number of blocks in the segment |
|
|
Extents allocated to active sorts |
|
|
Blocks allocated to active sorts |
|
|
Extents not allocated to any sort |
|
|
Blocks not allocated to any sort |
|
|
Number of extent allocations |
|
|
Number of times an unused extent was found in the pool |
|
|
Number of deallocated extents |
|
|
Number of requests to deallocate |
|
|
Maximum number of extents ever used |
|
|
Maximum number of blocks ever used |
|
|
Maximum number of extents used by all sorts |
|
|
Maximum number of blocks used by all sorts |
|
|
Maximum number of extents used by an individual sort |
|
|
Maximum number of blocks used by an individual sort |
|
|
Relative file number of the sort segment header |
|
|
Tablespace number |
|
|
The ID of the container to which the data pertains. Possible values include:
|
|
|
Indicates whether the sort segment is allocated from a local temporary tablespace ( |