Posts

Showing posts from March, 2013

Performance Query

Image
What are the queries that are running? select sesion.sid, sesion.username, optimizer_mode, hash_value, address, cpu_time, elapsed_time, sql_text from v$sqlarea sqlarea, v$session sesion where sesion.sql_hash_value = sqlarea.hash_value and sesion.sql_address = sqlarea.address and sesion.username is not null / Get the rows fetched, if there is difference it means processing is happening select b.name, a.value vlu from v$sesstat a, v$statname b where a.statistic# = b.statistic# and sid =&sid and a.value != 0 and b.name like '%row%' Get the sql_hash_value select sql_hash_value from v$session where sid='&sid'; SQL> select sql_hash_value from v$session where sid='&sid'; Enter value for sid: 1075 old 1: select sql_hash_value from v$session where sid='&sid' new 1: select sql_hash_value from v$session where sid='1075' SQL_HASH_VALUE -------------- 928832585 Get the sql_Text SQL> select sql_t...