Skip to content
pvmehta.com

pvmehta.com

  • Home
  • About Me
  • Toggle search form
  • Nice notes on wait events Oracle
  • alter database backup controlfile to trace Oracle
  • CTAS with LONG Column for 9i and higher Oracle
  • chk_space_SID.ksh Linux/Unix
  • T-SQL Vs PL/SQL Syntax SQL Server
  • Building Our Own Namespaces with “Create Context” Oracle
  • send email from unix mailx with attachment. Linux/Unix
  • Single character replacement in Unix Linux/Unix
  • kill all processes from specific user in solaris. Linux/Unix
  • SQL_PLAN.sql for checking real execution plan Oracle
  • 276434.1 Modifying the VIP or VIP Hostname of a 10g or 11g Oracle Clusterware Node Oracle
  • find_du.ksh to find # of files, their sizes in current folder and its subdolder Linux/Unix
  • Passing from Unix to PLSQL using bind variables Linux/Unix
  • SQL Tracker by SID sqltrackerbysid.sql Oracle
  • findx.sql /* Find Indexes on specified USER.TABLE_NAME */ Oracle

Wait time tuning research

Posted on 02-Aug-2005 By Admin No Comments on Wait time tuning research

http://www.dba-oracle.com/art_otn_waits.htm

v$session.paddr = v$process.addr

v$session.sid = v$session_wait.sid

v$session.sql_address = v$sqlarea.address

v$session.sql_hash_value = v$sqlarea.hash_value

v$session.sql_id = v$sqlares.sql_id

v$session.server shows Dedicated or MTS configuration.

The fields module and action of v$session can be set with dbms_application_info.set_module.

The field client_info can be set with dbms_application_info.set_client_info

Join sid with v$sesstat if you want to get some statistical information for a particular sesssion.

A record in v$session contains sid and serial#. These numbers can be used kill a session (alter system kill session).

What a session is waiting for can be queried with v$session_wait. However, with Oracle 10g, this is not nessessary anymore,

as v$session_wait’s information will be exposed within v$session as well.

P1 refers sometimes to the datafile number. If this number is greater than db_files, it refers to a temp file.

********************************

V$SESSION_WAIT – Unlike the previous view, this view does not contain aggregated statistics; it contains statistics on the event the session

is waiting on at the moment. The P(n) columns are an important piece of information used to help determine where the problem exists.

———————–

SID – Session ID.

SEQ# – Sequence number that uniquely identifies the wait event. This sequence is incremented with each wait event completion.

EVENT – Name of wait event.

P1TEXT – A description of what the P1 value is used for. Not reliable, use PARAMETER(n) value from V$EVENT_NAME to determine.

P1 – This value definition is dependent on the event. Use PARAMETER1 value from V$EVENT_NAME to describe what this value is used for.

P1RAW – Same value as P1 except in hexadecimal format.

P2TEXT – A description of what the P2 value is used for. Not reliable, use PARAMETER(n) value from V$EVENT_NAME to determine.

P2 – This value definition is dependent on the event. Use PARAMETER2 value from V$EVENT_NAME to describe what this value is used for.

P2RAW – Same value as P2 except in hexadecimal format.

P3TEXT – A description of what the P3 value is used for. Not reliable, use PARAMETER(n) value from V$EVENT_NAME to determine.

P3 – This value definition is dependent on the event. Use PARAMETER3 value from V$EVENT_NAME to describe what this value is used for.

P3RAW – Same value as P3 except in hexadecimal format.

WAIT_CLASS_ID – ID of the wait class. Column is in 10g.

WAIT_CLASS# – Number of the class. Column is in 10g.

WAIT_CLASS – The name of the wait class (Idle, Network, System I/O, etc.). Column is in 10g.

WAIT_TIME – The last amount of time that the session waited for an event. A 0 value means the session is currently waiting on the event.

This value of 0 will not increase until the session completes the wait event. Time is in centiseconds.

SECONDS_IN_WAIT – If WAIT_TIME equals 0, then this is the number of seconds spent waiting on the event so far. This can give you complicated

results when a timeout occurs like with enqueues because it will reset to 0, but this is beyond the scope of this article.

STATE – State of the wait event: WAIT_TIME=0 – WAITING, the process is in the state of waiting on an event. WAIT_TIME=-1 – WAITED SHORT TIME, wait time

completed in less than a centisecond. WAIT_TIME=-2 – WAITED UNKOWN TIME, duration of wait is unknown because TIME_STATISTICS was set to false.

WAIT_TIME>0 – WAITED KNOWN TIME, wait completed. WAIT_TIME is the duration of the wait event in centiseconds.

Oracle, SQL scripts

Post navigation

Previous Post: crtgr.sql /* For creating trigger from data dictionary */
Next Post: sesswait.sql

Related Posts

  • When to rebuld B-tree index Oracle
  • Export Oracle data and Compress at same time Oracle
  • shr1.sql for MTS or Shared server configuration Oracle
  • CPU Core related projections AWS
  • Convert multiple rows to single column Oracle
  • Drop specific SQL plan baseline – spm Oracle

Leave a Reply Cancel reply

Your email address will not be published. Required fields are marked *

Categories

  • Ansible (0)
  • AWS (2)
  • Azure (1)
  • Linux/Unix (149)
  • MYSQL (5)
  • Oracle (392)
  • PHP/MYSQL/Wordpress (10)
  • POSTGRESQL (0)
  • Power-BI (0)
  • Python/PySpark (7)
  • RAC (17)
  • rman-dataguard (26)
  • shell (149)
  • SQL scripts (341)
  • SQL Server (6)
  • Uncategorized (0)
  • Videos (0)

Recent Posts

  • SQL Server Vs Oracle Architecture difference25-Jul-2025
  • SQL Server: How to see historical transactions25-Jul-2025
  • SQL Server: How to see current transactions or requests25-Jul-2025
  • T-SQL Vs PL/SQL Syntax25-Jul-2025
  • Check SQL Server edition25-Jul-2025
  • Checking SQL Server Version25-Jul-2025
  • Oracle vs MYSQL Architecture differences (For DBAs)24-Jul-2025
  • V$INSTANCE of Oracle in MYSQL24-Jul-2025
  • Day to day MYSQL DBA operations (Compared with Oracle DBA)24-Jul-2025
  • MYSQL and Oracle Comparison for Oracle DBA24-Jul-2025

Archives

  • 2025
  • 2024
  • 2023
  • 2010
  • 2009
  • 2008
  • 2007
  • 2006
  • 2005
  • catting.sh Linux/Unix
  • To find all disk io ( EMC as well as local) Linux/Unix
  • Linux CPU info. Linux/Unix
  • Adding addidional hard drive and attach it to a linux box. Linux/Unix
  • Vivek’s egrep commands to trace problem. (on linux x86-64) Linux/Unix
  • How to connect to Oracle Database with Wallet with Python. Oracle
  • setting prompt display with .profile Linux/Unix
  • AWR license Oracle

Copyright © 2025 pvmehta.com.

Powered by PressBook News WordPress theme