-
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?
funky...
"I Dont Want To Follow A Path, I would Rather Go Where There Is No Path And Leave A Trail."
"Ego is the worst thing many have, try to overcome it & you will be the best, if not good, person on this earth"
-
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?
funky...
"I Dont Want To Follow A Path, I would Rather Go Where There Is No Path And Leave A Trail."
"Ego is the worst thing many have, try to overcome it & you will be the best, if not good, person on this earth"
-
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
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|