forked from xtender/xt_scripts
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ashtop.sql
28 lines (27 loc) · 1.11 KB
/
ashtop.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
doc
--------------------------------------------------------------------------------
--
-- Script for calling Tanel Poder's ashtop/dashtop:
--------------------------------------------------------------------------------
--
-- Purpose: Display top ASH time (count of ASH samples) grouped by your
-- specified dimensions
--
-- Author: Tanel Poder
-- Copyright: (c) http://blog.tanelpoder.com
--
-- Usage:
-- @ashtop <grouping_cols> <filters> <fromtime> <totime>
--
-- Examples:
-- @ashtop username,sql_id session_type='FOREGROUND' sysdate-1/24 sysdate
-- @ash/dashtop session_state,event 1=1 "TIMESTAMP'2013-09-09 21:00:00'" "TIMESTAMP'2013-09-09 22:00:00'"
--
-- -----------------------------------------------------------------------------
#
accept grouping_cols prompt "Grouping cols: ";
accept filters prompt "Filters : ";
accept fromtime prompt "From time : ";
accept totime prompt "To time : ";
accept call_prefix prompt "Enter 'd' for dashtop: ";
@tpt/ash/&call_prefix.ashtop "&grouping_cols" "&filters" "&fromtime" "&totime"