ITPub博客

首页 > Linux操作系统 > Linux操作系统 > V$TEMPSEG_USAGE

V$TEMPSEG_USAGE

原创 Linux操作系统 作者:oracle_ace 时间:2007-12-18 14:07:19 0 删除 编辑

研究了一下v$tempseg_usage的这个动态性能视图,发现其实他是一个同义词,而且是通过v_$sort_usage这个视图来创建的。

SQL> select object_type from dba_objects where object_name='V$TEMPSEG_USAGE';

OBJECT_TYPE
------------------
SYNONYM

SQL> select * from dba_synonyms
  2  where synonym_name='V$TEMPSEG_USAGE';

OWNER                          SYNONYM_NAME
------------------------------ ------------------------------
TABLE_OWNER                    TABLE_NAME
------------------------------ ------------------------------
DB_LINK
--------------------------------------------------------------------------------
PUBLIC                         V$TEMPSEG_USAGE
SYS                            V_$SORT_USAGE

 

SQL> select object_type from dba_objects where object_name='V_$SORT_USAGE';

OBJECT_TYPE
------------------
VIEW

SQL> select object_type from dba_objects where object_name='V$SORT_USAGE';

OBJECT_TYPE
------------------
SYNONYM

SQL> select view_definition from v$fixed_view_definition where view_name='V$SORT_USAGE';

VIEW_DEFINITION
--------------------------------------------------------------------------------
select  USERNAME , "USER" , SESSION_ADDR , SESSION_NUM , SQLADDR , SQLHASH , TAB
LESPACE , CONTENTS , SEGTYPE , SEGFILE# , SEGBLK# , EXTENTS , BLOCKS , SEGRFNO#
from GV$SORT_USAGE where inst_id = USERENV('Instance')


SQL> select view_definition from v$fixed_view_definition where view_name='GV$SORT_USAGE';

VIEW_DEFINITION
--------------------------------------------------------------------------------
select x$ktsso.inst_id, username, username, ktssoses, ktssosno, prev_sql_addr, p
rev_hash_value, ktssotsn, decode(ktssocnt, 0, 'PERMANENT', 1, 'TEMPORARY'), deco
de(ktssosegt, 1, 'SORT', 2, 'HASH', 3, 'DATA', 4, 'INDEX', 5, 'LOB_DATA', 6, 'LO
B_INDEX' , 'UNDEFINED'), ktssofno, ktssobno, ktssoexts, ktssoblks, ktssorfno fro
m x$ktsso, v$session where ktssoses = v$session.saddr and ktssosno = v$session.s
erial#

在v$tempseg_usage中有个字段叫segfile#,意思是file number initial extent,那么在这个视图中呢,其实这个字段来自x$ktsso表的ktssofno字段 .

也就是说这个字段实际上代表的是绝对文件号.

来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/12361284/viewspace-804/,如需转载,请注明出处,否则将追究法律责任。

请登录后发表评论 登录
全部评论

注册时间:2007-12-10

  • 博文量
    284
  • 访问量
    784775