SQL Performance (MOSC)

MOSC Banner

Values of P1 and P2 columns in dba_hist_active_sess_history view if value of P1TEXT column equal "fi

edited Oct 2, 2018 5:01AM in SQL Performance (MOSC) 2 commentsAnswered

I would decode values of P1 and P2 columns in dba_hist_active_sess_history table for next records:

11:59:14 >select sample_time, sql_id

11:59:14   2   , P1TEXT, P1

11:59:14   3   , P2TEXT, P2

11:59:14   4   , P3TEXT, P3

11:59:14   5   , wait_class||' | '||EVENT||' | '||P1TEXT||'='||ltrim(to_char(P1,'999999999999'))

11:59:14   6       ||decode(P2,0,'',P1,'=P1',' | '||P2TEXT||'='||ltrim(to_char(P2,'999999999999')))

11:59:14   7       ||decode(P3,0,'',' | '||P3TEXT||'='||ltrim(to_char(P3,'999999999999'))) "WaitClass/Event/P1/P2/P3"

11:59:14   8  from dba_hist_active_sess_history

11:59:14   9  where to_char((sample_time),'YYYY.MM.DD HH24:MI')='2018.09.05 05:07' and sql_id='1ch61x0pzgpzu';

Howdy, Stranger!

Log In

To view full details, sign in to My Oracle Support Community.

Register

Don't have a My Oracle Support Community account? Click here to get started.

Category Leaderboard

Top contributors this month

New to My Oracle Support Community? Visit our Welcome Center

MOSC Help Center