-
statspack doubt
Hi
I need to know what all sql's ran during certain period of time.
Assuming my statspacksnapshot is of 15 minute interval.I write this script
Code:
select
to_char(snap_time,'mm/dd/yyyy hh24:mi:ss') ,
rows_processed num_rows,
sql_text
from
perfstat.stats$sql_summary sql_summary,
perfstat.stats$snapshot snap
where
sql_summary.snap_id in
(select snap_id
from perfstat.stats$snapshot
where snap_time between to_date('12/09/2006 19:00:00','MM/DD/YYYY HH24:MI:SS')
and to_date('12/09/2006 19:41:00','MM/DD/YYYY HH24:MI:SS')
)
and
sql_summary.snap_id = snap.snap_id
Will this script give me the correct answer for all the sql's that ran during the period of time ?
Is my script right ?
regards
Hrishy
-
why do u want to do that in first place?.. i mean purpose?
-
Hi
abhay thanks for taking time out and having a look at this i appreciate very much.
I want to see what are all the sql statements that ran in a database during certain interval of time.
regards
Hrishy
-
use v$sql.. why do u take pain to join snaps?
-
Hi Abhay
The problem is i will not look into v$sql at that point of time.As this happens during the night or times when i am not at the desk.
regards
Hrishy