常用动态性能视图

1、v$session_longops    记录操作时常超过6秒的动作

View Code
SQL> desc v$session_longops;
 Name                                      Null?    Type
 ----------------------------------------- -------- ----------------------------
 SID                                                NUMBER
 SERIAL#                                            NUMBER
 OPNAME                                             VARCHAR2(64)
 TARGET                                             VARCHAR2(64)
 TARGET_DESC                                        VARCHAR2(32)
 SOFAR                                              NUMBER
 TOTALWORK                                          NUMBER
 UNITS                                              VARCHAR2(32)
 START_TIME                                         DATE
 LAST_UPDATE_TIME                                   DATE
 TIMESTAMP                                          DATE
 TIME_REMAINING                                     NUMBER
 ELAPSED_SECONDS                                    NUMBER
 CONTEXT                                            NUMBER
 MESSAGE                                            VARCHAR2(512)
 USERNAME                                           VARCHAR2(30)
 SQL_ADDRESS                                        RAW(8)
 SQL_HASH_VALUE                                     NUMBER
 SQL_ID                                             VARCHAR2(13)
 SQL_PLAN_HASH_VALUE                                NUMBER
 SQL_EXEC_START                                     DATE
 SQL_EXEC_ID                                        NUMBER
 SQL_PLAN_LINE_ID                                   NUMBER
 SQL_PLAN_OPERATION                                 VARCHAR2(30)
 SQL_PLAN_OPTIONS                                   VARCHAR2(30)
 QCSID                                              NUMBER
View Code
SQL> select sid,sofar,totalwork from v$session_longops;

       SID      SOFAR  TOTALWORK
---------- ---------- ----------
        11     212480     212480
        11     140111     140111
        73      70400      70400
        73      52644      52644
        11      88320      88320
        11      76125      76125
        11      92800      92800
        11      77047      77047
        73      81280      81280
        73      52897      52897
        11      12800      12800

       SID      SOFAR  TOTALWORK
---------- ---------- ----------
        11       8904       8904
        11      12800      12800
        11      12801      12801
        11     212480     212480
        11     139185     139185
        11     212480     212480
        11     139202     139202
        11     212480     212480
        11     139238     139238
       131     293285     293285
       131     140111     140111

       SID      SOFAR  TOTALWORK
---------- ---------- ----------
       131     140111     140111
       131     212480     212480
       132      53760      53760
       132      11452      11452
       131     212480     212480
       132      10284      10284
       132      53760      53760
       131     139053     139053
       131     212480     212480
       132      38400      38400
       132       9050       9050

       SID      SOFAR  TOTALWORK
---------- ---------- ----------
       131     138994     138994
       131      12800      12800
       131       8904       8904
       131      12800      12800
       131      12801      12801
       131     212480     212480
       131     139185     139185
       131     212480     212480
       131     139202     139202
       131     212480     212480
       131     139238     139238

       SID      SOFAR  TOTALWORK
---------- ---------- ----------
       193     140111     140111
       193      11452      11452
       193     139053     139053
       193     138994     138994
       193       8904       8904
       193      12801      12801
       193     139185     139185
       193     139202     139202
       193     139238     139238

53 rows selected.

 column:sofar表示当前执行了多长时间,totalwork表示总共需要多长时间.

posted @ 2013-03-25 13:04  ArcerZhang  阅读(334)  评论(0编辑  收藏  举报