Create Or Replace Force View Sys.Av_db_global_waits (Wait_class,
Total_waits,
Pct_waits,
Time_waited_secs,
Pct_time
)
As
Select Wait_class, Total_waits,
Round (100 * (Total_waits / Sum_waits), 2) Pct_waits,
Round ((Time_waited / 100), 2) Time_waited_secs,
Round (100 * (Time_waited / Sum_time), 2) Pct_time
From (Select Wait_class, Total_waits, Time_waited
From V$system_wait_class
Where Wait_class != 'Idle'),
(Select Sum (Total_waits) Sum_waits, Sum (Time_waited) Sum_time
From V$system_wait_class
Where Wait_class != 'Idle')
Order By 5 Desc;
Total_waits,
Pct_waits,
Time_waited_secs,
Pct_time
)
As
Select Wait_class, Total_waits,
Round (100 * (Total_waits / Sum_waits), 2) Pct_waits,
Round ((Time_waited / 100), 2) Time_waited_secs,
Round (100 * (Time_waited / Sum_time), 2) Pct_time
From (Select Wait_class, Total_waits, Time_waited
From V$system_wait_class
Where Wait_class != 'Idle'),
(Select Sum (Total_waits) Sum_waits, Sum (Time_waited) Sum_time
From V$system_wait_class
Where Wait_class != 'Idle')
Order By 5 Desc;
No comments:
Post a Comment