2026-03-12 20:23:15
This commit is contained in:
19
tpt/ash/sample_drift.sql
Normal file
19
tpt/ash/sample_drift.sql
Normal file
@@ -0,0 +1,19 @@
|
||||
-- Copyright 2018 Tanel Poder. All rights reserved. More info at http://tanelpoder.com
|
||||
-- Licensed under the Apache License, Version 2.0. See LICENSE.txt for terms & conditions.
|
||||
|
||||
-- check if there's sample time drift in ASH (should be every 1 seconds)
|
||||
-- it makes sense to run this only on active systems where every sample there
|
||||
-- are some active sessions seen
|
||||
|
||||
select * from (
|
||||
select
|
||||
to_char(sample_time,'YYYYMMDD HH24:MI:SS')
|
||||
, sample_time-lag(sample_time) over(order by sample_time) delta
|
||||
from
|
||||
(select distinct sample_time from v$active_session_history)
|
||||
)
|
||||
where
|
||||
delta < numtodsinterval(2, 'second') -- eliminate ASH sample gaps without captured DB activity
|
||||
/
|
||||
|
||||
|
||||
Reference in New Issue
Block a user