Need to edge out the competition for your dream job? Train for certifications today.
An intuitive utility to help find the CSS path to UI elements on a webpage. These paths are used frequently in a variety of front-end development and QA automation tasks.
One of a set of tools we're offering as a way of saying thank you for being a part of the community.
--getting dbid and instance number
select distinct dbid, instance_number from stats$database_instance where db_name='$DB';
--getting the snapshot IDs for start/end (we did 9-10am, seconds always vary so that's why there's the %)
select s.snap_id snap_id, to_char(snap_time, 'YYYY-MM-DD HH24:MI:SS') snapdate
from stats\$snapshot s, stats$database_instance di
where s.dbid = $dbid
and di.dbid = $dbid
and s.instance_number = $instnum
and di.instance_number = $instnum
and di.dbid = s.dbid
and di.instance_number = s.instance_number
and di.startup_time = s.startup_time
and (to_char(s.snap_time, 'YYYY-MM-DD HH24:MI:SS') like '$today 09:00:%'
or to_char(s.snap_time, 'YYYY-MM-DD HH24:MI:SS') like '$today 10:00:%')
order by snap_id asc;
--getting the actual data from the snapshots and the text of the queries, limited to the top 50
--this is specific to buffered gets, but there's several others you can order by if you switch those out or include them all at once
select /*+ orderd use_nl (topn st) */ st.SQL_ID, delta_buffer_gets, delta_executions, nvl(topn.module, 'null'), dbms_lob.substr(st.sql_fulltext,3500,1)
from ( select *
from ( select *
order by delta_buffer_gets desc
where rownum <= 50
, v$sqlarea st
where st.old_hash_value(+) = topn.old_hash_value
order by topn.delta_buffer_gets desc, topn.old_hash_value
Open in new window
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment
From novice to tech pro — start learning today.
Premium members can enroll in this course at no extra cost.