Oracle 中查看比较大的排序进程


  1. sys@DEX> select * from v$statname where name like '%sort%' ;  
  2.   
  3. STATISTIC# NAME                                          CLASS    STAT_ID  
  4. ---------- ---------------------------------------- ---------- ----------   
  5.        565 sorts (memory)                                   64 2091983730  
  6.        566 sorts (disk)                                     64 2533123502  
  7.        567 sorts (rows)                                     64 3757672740  
这里使用rows作为metric 
  1. sys@DEX> select s.sid "session id", st.value "sort(rows)" ,p.spid "process number"  
  2.   2    from v$session s , v$sesstat st , v$process p  
  3.   3   where s.sid=st.sid  
  4.   4     and s.paddr=p.addr  
  5.   5     and st.statistic#=567  
  6.   6     and s.username='DEX'  
  7.   7     order by st.value desc ;  
  8.   
  9.   
  10. session id sort(rows) process number  
  11. ---------- ---------- ------------------------------------------------------------------------   
  12.         30    1818678 2223  
  13.        155     909404 5573  

相关内容