SlideShare a Scribd company logo
1 of 3
Anar Godjaev
http://anargodjaev.wordpress.com/
Oracle Wait Interface (OWI)
Oracle wait interface is a group of views that you can use to monitorwaiting
events and sessions waiting them.
1- first thing is thinking system wide.
--- System wide event waits
-select* from v$system_eventorder by total_waitsdesc;
--select* from v$event_name;
2- and then session wide
-- Session wide events
--- you can see the SID and easily join with v$session
select* from v$session_eventorder by total_waitsdesc;
3- time to examine session waits currently
--- session wide waits
--- you can obtain P1, P2 and P3 parameter meanings in v$event_name
select* from v$session_waitorder by seconds_in_waitdesc;
NOTES
N1- P1, P2 and P3 columns are important in some types of waits. Forexample:
If (event_name IN
(„db file sequential read‟ , „db file scattered read‟))
then
P1 means file#
P2 means block#
P3 means blocks
End If;
--- lets find sessions waiting the files
-select
t1.event,
t1.state,
t1.wait_time,
t1.seconds_in_wait,
t2.username,
t3.name
from
v$session_wait t1,
v$session t2,
Anar Godjaev
http://anargodjaev.wordpress.com/
v$datafile t3
where
t1.sid = t2.sid and
t1.p1 = t3.file# and
t1.eventin ('db file sequential read','db file scattered read');
N2- There are two columns indicationg the waited time. “wait_time” and
“second_in_wait”. You can consider these values by reading “state” column.
If (“state” = WAITING) then
Consider “SECONDS_IN_WAIT”
Else If (“state” = WAITED_KNOWN_TIME) then
Consider “WAIT_TIME”
Else If (“state” = WAITED_UNKNOWN_TIME) then
Alter system set timed_statistics=TRUE -- 
End If
4- you can also examine system wide and session wide statistics
--- system statistics
-select* from v$sysstat;
--- session statistics
--- you cannot find statistics name in v$sesstat
-- so we have to join with v$statname
select
t1.sid,
t3.username,
t2.name,
t1.value
from
v$sesstat t1,
v$statname t2,
v$session t3
where
t1.statistic# = t2.statistic# and
t1.sid = t3.sid and
t3.usernameis not null;
---select* from v$statname;
List of views
v$system_event
System wide wait events.
Values are total waits until system startup.
Wait values are reset every system restart.
v$event_name
Properties of wait events.
v$session_event
Anar Godjaev
http://anargodjaev.wordpress.com/
Session wide wait events.
Has almost same properties with v$system_event.
There is one mor column for SID.
v$session_wait
Session wide waits, this view gives you the currents waits byuser and resets
every session kills itself.
v$latch
v$latchname
v$enqueue
v$sysstat
v$sesstat
v$filestat
v$tempstat
v$sgastat
v$pgastat
v$statname
parameters
timed_statistics
statistics_level
some of the important wait events (non idle wait events)
buffer busy waits
db file scattered read
db file sequential read
enqueue
free buffer waits
latch free
log file parallel write
log file sync
NOTES
These kind of events points:
Inefficient sql.
Inefficient system architecture.
Inproper instance confugiration.
Some of the idle events (can be ignored most of the times)
NULL
SQL*NET Message
Rdbmsipc message
Pmon timer
Pipe get
Smon timer
NOTES
Not an indiaction of performance problem.
Some of the important statistics
bytes received via SQL*Net from client
bytes sent via SQL*Net to client
consistent gets --consistent gets+db block gets =logical IO

More Related Content

What's hot (7)

Nouveau document texte
Nouveau document texteNouveau document texte
Nouveau document texte
 
Yy
YyYy
Yy
 
Stored procedures
Stored proceduresStored procedures
Stored procedures
 
Systemcall1
Systemcall1Systemcall1
Systemcall1
 
Sydney Oracle Meetup - execution plans
Sydney Oracle Meetup - execution plansSydney Oracle Meetup - execution plans
Sydney Oracle Meetup - execution plans
 
Linked lists
Linked listsLinked lists
Linked lists
 
C99.php
C99.phpC99.php
C99.php
 

Viewers also liked (12)

How to protect your sensitive data using oracle database vault / Creating and...
How to protect your sensitive data using oracle database vault / Creating and...How to protect your sensitive data using oracle database vault / Creating and...
How to protect your sensitive data using oracle database vault / Creating and...
 
Table Partitions
Table PartitionsTable Partitions
Table Partitions
 
Oracle GoldenGate
Oracle GoldenGateOracle GoldenGate
Oracle GoldenGate
 
Oracle Golden Gate
Oracle Golden GateOracle Golden Gate
Oracle Golden Gate
 
Conditional Control
Conditional ControlConditional Control
Conditional Control
 
Asm disk group migration from
Asm disk group migration from Asm disk group migration from
Asm disk group migration from
 
Tuning SGA
Tuning SGATuning SGA
Tuning SGA
 
Backup and Recovery
Backup and RecoveryBackup and Recovery
Backup and Recovery
 
Database Vault / Verinin Güvenliği
Database Vault /  Verinin GüvenliğiDatabase Vault /  Verinin Güvenliği
Database Vault / Verinin Güvenliği
 
Audit Mekani̇zmasi
Audit Mekani̇zmasiAudit Mekani̇zmasi
Audit Mekani̇zmasi
 
Backup and Recovery Procedure
Backup and Recovery ProcedureBackup and Recovery Procedure
Backup and Recovery Procedure
 
how to protect your sensitive data using oracle database vault
how to protect your sensitive data using oracle database vaulthow to protect your sensitive data using oracle database vault
how to protect your sensitive data using oracle database vault
 

Similar to Wait Interface

Wait Events 10g
Wait Events 10gWait Events 10g
Wait Events 10g
sagai
 
Intrusion Detection System using Snort
Intrusion Detection System using Snort Intrusion Detection System using Snort
Intrusion Detection System using Snort
webhostingguy
 
Intrusion Detection System using Snort
Intrusion Detection System using Snort Intrusion Detection System using Snort
Intrusion Detection System using Snort
webhostingguy
 
UKOUG, Oracle Transaction Locks
UKOUG, Oracle Transaction LocksUKOUG, Oracle Transaction Locks
UKOUG, Oracle Transaction Locks
Kyle Hailey
 
Perf stat windows
Perf stat windowsPerf stat windows
Perf stat windows
Accenture
 
OOUG: Oracle transaction locking
OOUG: Oracle transaction lockingOOUG: Oracle transaction locking
OOUG: Oracle transaction locking
Kyle Hailey
 
Fpga 06-data-types-system-tasks-compiler-directives
Fpga 06-data-types-system-tasks-compiler-directivesFpga 06-data-types-system-tasks-compiler-directives
Fpga 06-data-types-system-tasks-compiler-directives
Malik Tauqir Hasan
 

Similar to Wait Interface (20)

Wait events
Wait eventsWait events
Wait events
 
Wait Events 10g
Wait Events 10gWait Events 10g
Wait Events 10g
 
Your tuning arsenal: AWR, ADDM, ASH, Metrics and Advisors
Your tuning arsenal: AWR, ADDM, ASH, Metrics and AdvisorsYour tuning arsenal: AWR, ADDM, ASH, Metrics and Advisors
Your tuning arsenal: AWR, ADDM, ASH, Metrics and Advisors
 
Intrusion Detection System using Snort
Intrusion Detection System using Snort Intrusion Detection System using Snort
Intrusion Detection System using Snort
 
Intrusion Detection System using Snort
Intrusion Detection System using Snort Intrusion Detection System using Snort
Intrusion Detection System using Snort
 
Rac introduction
Rac introductionRac introduction
Rac introduction
 
C# and Borland StarTeam Connectivity
C# and Borland StarTeam ConnectivityC# and Borland StarTeam Connectivity
C# and Borland StarTeam Connectivity
 
The MySQL Performance Schema & New SYS Schema
The MySQL Performance Schema & New SYS SchemaThe MySQL Performance Schema & New SYS Schema
The MySQL Performance Schema & New SYS Schema
 
UKOUG, Oracle Transaction Locks
UKOUG, Oracle Transaction LocksUKOUG, Oracle Transaction Locks
UKOUG, Oracle Transaction Locks
 
Perf stat windows
Perf stat windowsPerf stat windows
Perf stat windows
 
Sap basis administrator user guide
Sap basis administrator   user guideSap basis administrator   user guide
Sap basis administrator user guide
 
Performance tuning a quick intoduction
Performance tuning   a quick intoductionPerformance tuning   a quick intoduction
Performance tuning a quick intoduction
 
OOUG: Oracle transaction locking
OOUG: Oracle transaction lockingOOUG: Oracle transaction locking
OOUG: Oracle transaction locking
 
"R & Text Analytics" (15 January 2013)
"R & Text Analytics" (15 January 2013)"R & Text Analytics" (15 January 2013)
"R & Text Analytics" (15 January 2013)
 
1.7 system calls
1.7 system calls1.7 system calls
1.7 system calls
 
Fpga 06-data-types-system-tasks-compiler-directives
Fpga 06-data-types-system-tasks-compiler-directivesFpga 06-data-types-system-tasks-compiler-directives
Fpga 06-data-types-system-tasks-compiler-directives
 
Lessons Learned: Running InfluxDB Cloud and Other Cloud Services at Scale | T...
Lessons Learned: Running InfluxDB Cloud and Other Cloud Services at Scale | T...Lessons Learned: Running InfluxDB Cloud and Other Cloud Services at Scale | T...
Lessons Learned: Running InfluxDB Cloud and Other Cloud Services at Scale | T...
 
PHP tips by a MYSQL DBA
PHP tips by a MYSQL DBAPHP tips by a MYSQL DBA
PHP tips by a MYSQL DBA
 
WSO2 Product Release Webinar: WSO2 Complex Event Processor 4.0
WSO2 Product Release Webinar: WSO2 Complex Event Processor 4.0WSO2 Product Release Webinar: WSO2 Complex Event Processor 4.0
WSO2 Product Release Webinar: WSO2 Complex Event Processor 4.0
 
Rmoug ashmaster
Rmoug ashmasterRmoug ashmaster
Rmoug ashmaster
 

More from Anar Godjaev

Oracle 10g Database Server Kurulum
Oracle 10g Database Server KurulumOracle 10g Database Server Kurulum
Oracle 10g Database Server Kurulum
Anar Godjaev
 
DataPump ile Single Parititon Export
DataPump ile Single Parititon ExportDataPump ile Single Parititon Export
DataPump ile Single Parititon Export
Anar Godjaev
 
Redologlar ve Yöneti̇mi̇
Redologlar ve Yöneti̇mi̇Redologlar ve Yöneti̇mi̇
Redologlar ve Yöneti̇mi̇
Anar Godjaev
 
Veri̇tabani ve Kullanici Yöneti̇mi̇
Veri̇tabani ve Kullanici Yöneti̇mi̇Veri̇tabani ve Kullanici Yöneti̇mi̇
Veri̇tabani ve Kullanici Yöneti̇mi̇
Anar Godjaev
 
Instance ve Media Bozukluklarını Inceleme
Instance ve Media Bozukluklarını IncelemeInstance ve Media Bozukluklarını Inceleme
Instance ve Media Bozukluklarını Inceleme
Anar Godjaev
 
Oracle Managed Files
Oracle Managed FilesOracle Managed Files
Oracle Managed Files
Anar Godjaev
 
Recovery Manager (RMAN)
Recovery Manager (RMAN)Recovery Manager (RMAN)
Recovery Manager (RMAN)
Anar Godjaev
 
Oracle Enterprise Linux 5
Oracle Enterprise Linux 5Oracle Enterprise Linux 5
Oracle Enterprise Linux 5
Anar Godjaev
 
Oracle Database 11g R2 Installation
Oracle Database 11g R2 InstallationOracle Database 11g R2 Installation
Oracle Database 11g R2 Installation
Anar Godjaev
 
Oracle Tablespace Yonetimi
Oracle Tablespace YonetimiOracle Tablespace Yonetimi
Oracle Tablespace Yonetimi
Anar Godjaev
 

More from Anar Godjaev (19)

Oracle 10g Database Server Kurulum
Oracle 10g Database Server KurulumOracle 10g Database Server Kurulum
Oracle 10g Database Server Kurulum
 
DataPump ile Single Parititon Export
DataPump ile Single Parititon ExportDataPump ile Single Parititon Export
DataPump ile Single Parititon Export
 
Redologlar ve Yöneti̇mi̇
Redologlar ve Yöneti̇mi̇Redologlar ve Yöneti̇mi̇
Redologlar ve Yöneti̇mi̇
 
Contraints
ContraintsContraints
Contraints
 
Oracle SQL
Oracle SQLOracle SQL
Oracle SQL
 
Veri̇tabani ve Kullanici Yöneti̇mi̇
Veri̇tabani ve Kullanici Yöneti̇mi̇Veri̇tabani ve Kullanici Yöneti̇mi̇
Veri̇tabani ve Kullanici Yöneti̇mi̇
 
Instance ve Media Bozukluklarını Inceleme
Instance ve Media Bozukluklarını IncelemeInstance ve Media Bozukluklarını Inceleme
Instance ve Media Bozukluklarını Inceleme
 
PL/SQL Blocks
PL/SQL BlocksPL/SQL Blocks
PL/SQL Blocks
 
Parallel Server
Parallel ServerParallel Server
Parallel Server
 
Memory Management
Memory ManagementMemory Management
Memory Management
 
LogMiner
LogMinerLogMiner
LogMiner
 
Undo Management
Undo ManagementUndo Management
Undo Management
 
ASM
ASMASM
ASM
 
Oracle Managed Files
Oracle Managed FilesOracle Managed Files
Oracle Managed Files
 
Recovery Manager (RMAN)
Recovery Manager (RMAN)Recovery Manager (RMAN)
Recovery Manager (RMAN)
 
Oracle Enterprise Linux 5
Oracle Enterprise Linux 5Oracle Enterprise Linux 5
Oracle Enterprise Linux 5
 
Oracle Database 11g R2 Installation
Oracle Database 11g R2 InstallationOracle Database 11g R2 Installation
Oracle Database 11g R2 Installation
 
Change DB Name
Change DB NameChange DB Name
Change DB Name
 
Oracle Tablespace Yonetimi
Oracle Tablespace YonetimiOracle Tablespace Yonetimi
Oracle Tablespace Yonetimi
 

Recently uploaded

+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
?#DUbAI#??##{{(☎️+971_581248768%)**%*]'#abortion pills for sale in dubai@
 

Recently uploaded (20)

Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)Powerful Google developer tools for immediate impact! (2023-24 C)
Powerful Google developer tools for immediate impact! (2023-24 C)
 
Ransomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdfRansomware_Q4_2023. The report. [EN].pdf
Ransomware_Q4_2023. The report. [EN].pdf
 
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
Web Form Automation for Bonterra Impact Management (fka Social Solutions Apri...
 
Boost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdfBoost Fertility New Invention Ups Success Rates.pdf
Boost Fertility New Invention Ups Success Rates.pdf
 
Corporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptxCorporate and higher education May webinar.pptx
Corporate and higher education May webinar.pptx
 
DBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor PresentationDBX First Quarter 2024 Investor Presentation
DBX First Quarter 2024 Investor Presentation
 
GenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdfGenAI Risks & Security Meetup 01052024.pdf
GenAI Risks & Security Meetup 01052024.pdf
 
Data Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt RobisonData Cloud, More than a CDP by Matt Robison
Data Cloud, More than a CDP by Matt Robison
 
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
+971581248768>> SAFE AND ORIGINAL ABORTION PILLS FOR SALE IN DUBAI AND ABUDHA...
 
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
Mastering MySQL Database Architecture: Deep Dive into MySQL Shell and MySQL R...
 
AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024AXA XL - Insurer Innovation Award Americas 2024
AXA XL - Insurer Innovation Award Americas 2024
 
Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...Apidays New York 2024 - The value of a flexible API Management solution for O...
Apidays New York 2024 - The value of a flexible API Management solution for O...
 
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law DevelopmentsTrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
TrustArc Webinar - Stay Ahead of US State Data Privacy Law Developments
 
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost SavingRepurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
Repurposing LNG terminals for Hydrogen Ammonia: Feasibility and Cost Saving
 
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemkeProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
ProductAnonymous-April2024-WinProductDiscovery-MelissaKlemke
 
2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...2024: Domino Containers - The Next Step. News from the Domino Container commu...
2024: Domino Containers - The Next Step. News from the Domino Container commu...
 
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
Strategies for Unlocking Knowledge Management in Microsoft 365 in the Copilot...
 
A Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source MilvusA Beginners Guide to Building a RAG App Using Open Source Milvus
A Beginners Guide to Building a RAG App Using Open Source Milvus
 
How to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected WorkerHow to Troubleshoot Apps for the Modern Connected Worker
How to Troubleshoot Apps for the Modern Connected Worker
 
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ..."I see eyes in my soup": How Delivery Hero implemented the safety system for ...
"I see eyes in my soup": How Delivery Hero implemented the safety system for ...
 

Wait Interface

  • 1. Anar Godjaev http://anargodjaev.wordpress.com/ Oracle Wait Interface (OWI) Oracle wait interface is a group of views that you can use to monitorwaiting events and sessions waiting them. 1- first thing is thinking system wide. --- System wide event waits -select* from v$system_eventorder by total_waitsdesc; --select* from v$event_name; 2- and then session wide -- Session wide events --- you can see the SID and easily join with v$session select* from v$session_eventorder by total_waitsdesc; 3- time to examine session waits currently --- session wide waits --- you can obtain P1, P2 and P3 parameter meanings in v$event_name select* from v$session_waitorder by seconds_in_waitdesc; NOTES N1- P1, P2 and P3 columns are important in some types of waits. Forexample: If (event_name IN („db file sequential read‟ , „db file scattered read‟)) then P1 means file# P2 means block# P3 means blocks End If; --- lets find sessions waiting the files -select t1.event, t1.state, t1.wait_time, t1.seconds_in_wait, t2.username, t3.name from v$session_wait t1, v$session t2,
  • 2. Anar Godjaev http://anargodjaev.wordpress.com/ v$datafile t3 where t1.sid = t2.sid and t1.p1 = t3.file# and t1.eventin ('db file sequential read','db file scattered read'); N2- There are two columns indicationg the waited time. “wait_time” and “second_in_wait”. You can consider these values by reading “state” column. If (“state” = WAITING) then Consider “SECONDS_IN_WAIT” Else If (“state” = WAITED_KNOWN_TIME) then Consider “WAIT_TIME” Else If (“state” = WAITED_UNKNOWN_TIME) then Alter system set timed_statistics=TRUE --  End If 4- you can also examine system wide and session wide statistics --- system statistics -select* from v$sysstat; --- session statistics --- you cannot find statistics name in v$sesstat -- so we have to join with v$statname select t1.sid, t3.username, t2.name, t1.value from v$sesstat t1, v$statname t2, v$session t3 where t1.statistic# = t2.statistic# and t1.sid = t3.sid and t3.usernameis not null; ---select* from v$statname; List of views v$system_event System wide wait events. Values are total waits until system startup. Wait values are reset every system restart. v$event_name Properties of wait events. v$session_event
  • 3. Anar Godjaev http://anargodjaev.wordpress.com/ Session wide wait events. Has almost same properties with v$system_event. There is one mor column for SID. v$session_wait Session wide waits, this view gives you the currents waits byuser and resets every session kills itself. v$latch v$latchname v$enqueue v$sysstat v$sesstat v$filestat v$tempstat v$sgastat v$pgastat v$statname parameters timed_statistics statistics_level some of the important wait events (non idle wait events) buffer busy waits db file scattered read db file sequential read enqueue free buffer waits latch free log file parallel write log file sync NOTES These kind of events points: Inefficient sql. Inefficient system architecture. Inproper instance confugiration. Some of the idle events (can be ignored most of the times) NULL SQL*NET Message Rdbmsipc message Pmon timer Pipe get Smon timer NOTES Not an indiaction of performance problem. Some of the important statistics bytes received via SQL*Net from client bytes sent via SQL*Net to client consistent gets --consistent gets+db block gets =logical IO