Oracle 视图 V$TEMP_EXTENT_MAP 官方解释,作用,如何使用详细说明

本站中文解释

Oracle视图V$TEMP_EXTENT_MAP可以用来查看临时表空间中每一个块一共有多少EXTENT,这有助于DBA诊断临时表空间I/O瓶颈问题。展示的列如下,其中EXTENT_ID为EXTENT顺序号:

FILE#:文件号

BLOCK#:块号

EXTENT_ID:EXTENT顺序号

STATUS:状态(分配/未分配)

SESSION_ID:SESSION ID

USERS:使用者ID

USER_OS_ID:使用者操作系统ID

TS#:表空间号

如何使用:

1、查看某一块正被使用的EXTENT数量:

SELECT COUNT(*) FROM V$TEMP_EXTENT_MAP
WHERE FILE# = 文件号
AND BLOCK# = 块号
AND STATUS = ‘ALLOCATED’;

2、查看某一个用户正在使用EXTENT的数量:

SELECT COUNT(*) FROM V$TEMP_EXTENT_MAP
WHERE USER_OS_ID= 用户操作系统ID
AND STATUS = ‘ALLOCATED’;

3、查看某一个用户正在使用文件号为n的EXTENT数量:

SELECT COUNT(*) FROM V$TEMP_EXTENT_MAP
WHERE FILE# = 文件号
AND USER_OS_ID= 用户操作系统ID
AND

官方英文解释

V$TEMP_EXTENT_MAP displays the status of each unit for all LOCALLY MANAGED temporary tablespaces.

Column Datatype NULL Description

TABLESPACE_NAME

VARCHAR2(30)

NOT NULL

Name of the tablespace this unit belongs to

FILE_ID

NUMBER

Absolute file number

BLOCK_ID

NUMBER

Begin block number for this unit

BYTES

NUMBER

Bytes in the extent

BLOCKS

NUMBER

Blocks in the extent

OWNER

NUMBER

Instance which owns this unit

RELATIVE_FNO

NUMBER

Relative file number

CON_ID

NUMBER

The ID of the container to which the data pertains. Possible values include:

  • 0: This value is used for rows containing data that pertain to the entire CDB. This value is also used for rows in non-CDBs.

  • 1: This value is used for rows containing data that pertain to only the root

  • n: Where n is the applicable container ID for the rows containing data


数据运维技术 » Oracle 视图 V$TEMP_EXTENT_MAP 官方解释,作用,如何使用详细说明