You are on page 1of 12

ADDM Report for Task 'TASK_180739'

---------------------------------Analysis Period
--------------AWR snapshot range from 59825 to 59829.
Time period starts at 06-NOV-15 04.30.43 PM
Time period ends at 06-NOV-15 05.30.07 PM
Analysis Target
--------------Database 'MABDB' with DB ID 1027027449.
Database version 11.2.0.3.0.
ADDM performed an analysis of instance mabdb2, numbered 2 and hosted at
db02-rac02.
Activity During the Analysis Period
----------------------------------Total database time was 10305 seconds.
The average number of active sessions was 2.89.
Summary of Findings
------------------Description
s

Active Sessions

Recommendation

Percent of Activity
---------------------------------------- ------------------- -------------1
2
3
4
5

Top SQL Statements


1.29 | 44.75
"User I/O" wait Class
.53 | 18.21
Top Segments by "User I/O" and "Cluster" .29 | 10.19
Global Cache Messaging
.28 | 9.64
PL/SQL Execution
.14 | 4.67

5
0
2
1
1

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Findings and Recommendations
---------------------------Finding 1: Top SQL Statements
Impact is 1.29 active sessions, 44.75% of total activity.
--------------------------------------------------------SQL statements consuming significant database time were found. These
statements offer a good opportunity for performance improvement.
Recommendation 1: SQL Tuning
Estimated benefit is .45 active sessions, 15.47% of total activity.
------------------------------------------------------------------Action
Run SQL Tuning Advisor on the SELECT statement with SQL_ID
"ca7xydktw0a0v".
Related Object
SQL statement with SQL_ID ca7xydktw0a0v.
SELECT --Refund
TRNREF.*,
TRN.*,NVL(COIN.COIN,:"SYS_B_00") AS RCOIN
FROM (

SELECT EXTERNAL_REF_NO, TILL_ID, AC_NO, CUST_GL, TRN_DESC FROM


Acvws_all_acentries_desc A
INNER JOIN BIV_TILL_DENO B
ON A.EXTERNAL_REF_NO = B.XREF
WHERE substr(trn_ref_no,:"SYS_B_01",:"SYS_B_02") in
(SELECT PRODUCTCODE FROM BI_CASHPOSTING_PRD_TRN)
AND TRN_CODE IN (SELECT TRN_CODE FROM BI_CASHPOSTING_PRD_TRN)
and event <> :"SYS_B_03"
and AC_CCY =:"SYS_B_04"
and trn_code <> :"SYS_B_05"
and b.TILL_ID in (:P_TillID)
and ac_entry_sr_no not in
( select ac_entry_sr_no from Acvws_all_acentries_desc where
substr(trn_ref_no,:"SYS_B_06",:"SYS_B_07") in
(:"SYS_B_08",:"SYS_B_09",:"SYS_B_10") and trn_code in
(:"SYS_B_11",:"SYS_B_12",:"SYS_B_13")
)
and DRCR_IND = :"SYS_B_14"
and ac_no not in (select gl_code from biv_cashcode)
and AC_ENTRY_SR_NO NOT IN (SELECT AC_ENTRY_SR_NO FROM
Acvws_all_acentries_desc trans WHERE AC_NO IN
(:"SYS_B_15",:"SYS_B_16") AND TRN_CODE=:"SYS_B_17")
and TRN_DT =:P_Date and AC_Branch = :P_BranchCode
and external_ref_no not in
(Select external_ref_no from Acvws_all_acentries_desc where
event=:"SYS_B_18"
and AC_CCY =:"SYS_B_19" and A.external_ref_no=external_ref_no
and TRN_DT=:P_Date and AC_Branch = :P_BranchCode group by
external_ref_no) GROUP BY EXTERNAL_REF_NO, TILL_ID, AC_NO, CUST_GL,
TRN_DESC
) TRNREF
LEFT JOIN
(
select * from (
SELECT A.XREF, NVL(A.INFLOW,:"SYS_B_20") AS INFLOW, B.DENM_ID
FROM (SELECT * FROM BIV_TILL_DENO WHERE BRANCHCODE = :P_BranchCode
AND POSTINGDATE = :P_Date AND CCYCODE = :"SYS_B_21"
and inflow <>:"SYS_B_22"
and TILL_ID in (:P_TillID)
) A
RIGHT JOIN CSTMS_DENM_DETAILS B ON A.DENOMCODE = B.DENM_ID AND
A.CCYCODE = B.DENM_CCY WHERE B.DENM_CCY = :"SYS_B_23" and B.Type =
:"SYS_B_24"
)
pivot (sum(INFLOW) for denm_id in (:"SYS_B_25" as
"R10000In",:"SYS_B_26" as "R5000In",:"SYS_B_27" as "R1000In"
,:"SYS_B_28" as "R500In",
:"SYS_B_29" as "R200In",:"SYS_B_30" as "R100In",:"SYS_B_31" as
"R50In",:"SYS_B_32" as "R20In",:"SYS_B_33" as "R10In",:"SYS_B_34" as
"R5In",:"SYS_B_35" as "R1In"))
)
TRN
ON TRNREF.EXTERNAL_REF_NO = TRN.XREF
LEFT JOIN
(
SELECT SUM(INFLOW*B.denm_value) AS COIN, XREF, TILL_ID FROM
BIV_TILL_DENO A INNER JOIN CSTMS_DENM_DETAILS B ON
A.DENOMCODE = B.DENM_ID AND A.CCYCODE = B.DENM_CCY
WHERE B.TYPE = :"SYS_B_36" AND A.CCYCODE = :"SYS_B_37" AND
POSTINGDATE = :P_Date

and TILL_ID in (:P_TillID)


GROUP BY XREF, TILL_ID
) COIN
ON TRNREF.EXTERNAL_REF_NO = COIN.XREF
where trn.xref is not null
Rationale
The SQL spent 100% of its database time on CPU, I/O and Cluster waits.
This part of database time may be improved by the SQL Tuning Advisor.
Rationale
Database time for this SQL was divided as follows: 100% for SQL
execution, 0% for parsing, 0% for PL/SQL execution and 0% for Java
execution.
Rationale
SQL statement with SQL_ID "ca7xydktw0a0v" was executed 12 times and had
an average elapsed time of 135 seconds.
Rationale
At least 2 distinct execution plans were utilized for this SQL statement
during the analysis period.
Recommendation 2: SQL Tuning
Estimated benefit is .41 active sessions, 14.3% of total activity.
-----------------------------------------------------------------Action
Run SQL Tuning Advisor on the SELECT statement with SQL_ID
"1bdsm0jq3vjt8".
Related Object
SQL statement with SQL_ID 1bdsm0jq3vjt8.
select-- Cash Payment
A.till_ID,
nvl(sum(Cur_Amt),:"SYS_B_000") as Cur_Amt,
nvl(sum(A.Sav_Amt),:"SYS_B_001") as Sav_Amt,
nvl(sum(A.Fix_Amt),:"SYS_B_002") as Fix_Amt,
nvl(sum(A.SP_Amt),:"SYS_B_003") as SP_Amt,
nvl(sum(A.CP_Amt),:"SYS_B_004") as CP_Amt,
nvl(sum(A.Domes_Amt),:"SYS_B_005") as Domes_Amt,
nvl(sum(FCur_Amt),:"SYS_B_006") as FCur_Amt,
nvl(sum(A.FSav_Amt),:"SYS_B_007") as FSav_Amt,
nvl(sum(A.FFix_Amt),:"SYS_B_008") as FFix_Amt,
nvl(sum(A.FSP_Amt),:"SYS_B_009") as FSP_Amt,
nvl(sum(A.FCP_Amt),:"SYS_B_010") as FCP_Amt,
nvl(sum(A.FDomes_Amt),:"SYS_B_011") as FDomes_Amt,:"SYS_B_012" as
Type from (
select
distinct TRNREF.Till_ID,
nvl (sum(TRNREF.Cur_Amt),:"SYS_B_013") as Cur_Amt,
nvl (sum(TRNREF.Sav_Amt),:"SYS_B_014") as Sav_Amt,
nvl (sum(TRNREF.Fix_Amt),:"SYS_B_015") as Fix_Amt,
nvl (sum(TRNREF.SP_Amt),:"SYS_B_016") as SP_Amt,
nvl (sum(TRNREF.CP_Amt),:"SYS_B_017") as CP_Amt,
nvl(sum(TRNREF.Domes_Amt),:"SYS_B_018") as Domes_Amt,
nvl(sum(TRNREF.FCur_Amt),:"SYS_B_019") as FCur_Amt,
nvl(sum(TRNREF.FSav_Amt),:"SYS_B_020") as FSav_Amt,
nvl(sum(TRNREF.FFix_Amt),:"SYS_B_021") as FFix_Amt,
nvl(sum(TRNREF.FSP_Amt),:"SYS_B_022") as FSP_Amt,
nvl(sum(TRNREF.FCP_Amt),:"SYS_B_023") as FCP_Amt,
nvl(sum(TRNREF.FDomes_Amt),:"SYS_B_024") as FDomes_Amt from
(
SELECT distinct EXTERNAL_REF_NO, TILL_ID, AC_NO,
(CASE WHEN length(ac_no)!=:"SYS_B_025" and
(substr(ac_no,:"SYS_B_026",:"SYS_B_027") like :"SYS_B_028" or

substr(ac_no,:"SYS_B_029",:"SYS_B_030") like :"SYS_B_031" or


substr(ac_no,:"SYS_B_032",:"SYS_B_033") like :"SYS_B_034") then
(lcy_amount) end) as Cur_Amt,
(CASE WHEN length(ac_no)!=:"SYS_B_035" and
substr(ac_no,:"SYS_B_036",:"SYS_B_037") like :"SYS_B_038" then
(lcy_amount) end) as Sav_Amt,
(CASE WHEN length(ac_no)!=:"SYS_B_039" and
substr(ac_no,:"SYS_B_040",:"SYS_B_041") like :"SYS_B_042" then
(lcy_amount) end) as Fix_Amt,
(CASE WHEN length(ac_no)!=:"SYS_B_043" and
substr(ac_no,:"SYS_B_044",:"SYS_B_045") like :"SYS_B_046" then
(lcy_amount) end) as SP_Amt,
(CASE WHEN length(ac_no)!=:"SYS_B_047" and
substr(ac_no,:"SYS_B_048",:"SYS_B_049") like :"SYS_B_050" then
(lcy_amount) end) as CP_Amt,
(CASE WHEN length(ac_no)=:"SYS_B_051" then (lcy_amount) end) as
Domes_Amt,
(CASE WHEN length(ac_no)!=:"SYS_B_052" and
(substr(ac_no,:"SYS_B_053",:"SYS_B_054") like :"SYS_B_055" or
substr(ac_no,:"SYS_B_056",:"SYS_B_057") like :"SYS_B_058" or
substr(ac_no,:"SYS_B_059",:"SYS_B_060") like :"SYS_B_061") then
(fcy_amount) end) as FCur_Amt,
(CASE WHEN length(ac_no)!=:"SYS_B_062" and
substr(ac_no,:"SYS_B_063",:"SYS_B_064") like :"SYS_B_065" then
(fcy_amount) end) as FSav_Amt,
(CASE WHEN length(ac_no)!=:"SYS_B_066" and
substr(ac_no,:"SYS_B_067",:"SYS_B_068") like :"SYS_B_069" then
(fcy_amount) end) as FFix_Amt,
(CASE WHEN length(ac_no)!=:"SYS_B_070" and
substr(ac_no,:"SYS_B_071",:"SYS_B_072") like :"SYS_B_073" then
(fcy_amount) end) as FSP_Amt,
(CASE WHEN length(ac_no)!=:"SYS_B_074" and
substr(ac_no,:"SYS_B_075",:"SYS_B_076") like :"SYS_B_077" then
(fcy_amount) end) as FCP_Amt,
(CASE WHEN length(ac_no)=:"SYS_B_078" then (fcy_amount) end) as
FDomes_Amt,
CUST_GL, USER_ID
FROM ACVWs_ALL_AC_ENTRIES A
INNER JOIN BIV_TILL_DENO B
ON A.EXTERNAL_REF_NO = B.XREF and A.ac_branch = B.branchcode
WHERE substr(trn_ref_no,:"SYS_B_079",:"SYS_B_080") in (SELECT
PRODUCTCODE FROM BI_CASHPOSTING_PRD_TRN)
AND TRN_CODE IN (SELECT TRN_CODE FROM BI_CASHPOSTING_PRD_TRN)
and A.event <> :"SYS_B_081"
and A.AC_CCY =:P_Currency
--and A.trn_code <> 'COM'
and A.DRCR_IND = :"SYS_B_082"
and A.trn_dt = :P_Date
and A.AC_Branch =:P_BranchCode
and B.BRANCHCODE =:P_BranchCode
--and b.TILL_ID in (:P_TillID)
and ac_no not in (select gl_code from biv_cashcode)
and ac_entry_sr_no not in (select ac_entry_sr_no from
acvws_all_ac_entries where
substr(trn_ref_no,:"SYS_B_083",:"SYS_B_084")
in (:"SYS_B_085",:"SYS_B_086",:"SYS_B_087") and trn_code in
(:"SYS_B_088",:"SYS_B_089",:"SYS_B_090",:"SYS_B_091"))
and AC_ENTRY_SR_NO NOT IN (SELECT AC_ENTRY_SR_NO FROM
acvws_all_ac_entries trans
WHERE AC_NO IN (:"SYS_B_092",:"SYS_B_093") AND TRN_CODE=:"SYS_B_094")

and trn_ref_no not in (Select trn_ref_no from acvws_all_ac_entries


where event=:"SYS_B_095"
and AC_CCY =:P_Currency and trn_dt=:P_Date and
AC_Branch=:P_BranchCode group by trn_ref_no)
)TRNREF
group by Till_ID )A
group by Till_ID
------------union all
select -- Cash Receive
A.till_ID,
nvl(sum(Cur_Amt),:"SYS_B_096") as Cur_Amt,
nvl(sum(A.Sav_Amt),:"SYS_B_097") as Sav_Amt,
nvl(sum(A.Fix_Amt),:"SYS_B_098") as Fix_Amt,
nvl(sum(A.SP_Amt),:"SYS_B_099") as SP_Amt,
nvl(sum(A.CP_Amt),:"SYS_B_100") as CP_Amt,
nvl(sum(A.Domes_Amt),:"SYS_B_101") as Domes_Amt,
nvl(sum(FCur_Amt),:"SYS_B_102") as FCur_Amt,
nvl(sum(A.FSav_Amt),:"SYS_B_103") as FSav_Amt,
nvl(sum(A.FFix_Amt),:"SYS_B_104") as FFix_Amt,
nvl(sum(A.FSP_Amt),:"SYS_B_105") as FSP_Amt,
nvl(sum(A.FCP_Amt),:"SYS_B_106") as FCP_Amt,
nvl(sum(A.FDomes_Amt),:"SYS_B_107") as FDomes_Amt,:"SYS_B_108"as Type
from (
SELECT distinct EXTERNAL_REF_NO, TRN_REF_NO,TILL_ID, AC_NO,
(CASE WHEN length(ac_no)!=:"SYS_B_109" and
(substr(ac_no,:"SYS_B_110",:"SYS_B_111") like :"SYS_B_112" or
substr(ac_no,:"SYS_B_113",:"SYS_B_114") like :"SYS_B_115" or
substr(ac_no,:"SYS_B_116",:"SYS_B_117") like :"SYS_B_118") then
(lcy_amount) end) as Cur_Amt,
(CASE WHEN length(ac_no)!=:"SYS_B_119" and
substr(ac_no,:"SYS_B_120",:"SYS_B_121") like :"SYS_B_122" then
(lcy_amount) end) as Sav_Amt,
(CASE WHEN length(ac_no)!=:"SYS_B_123" and
substr(ac_no,:"SYS_B_124",:"SYS_B_125") like :"SYS_B_126" then
(lcy_amount) end) as Fix_Amt,
(CASE WHEN length(ac_no)!=:"SYS_B_127" and
substr(ac_no,:"SYS_B_128",:"SYS_B_129") like :"SYS_B_130" then
(lcy_amount) end) as SP_Amt,
(CASE WHEN length(ac_no)!=:"SYS_B_131" and
substr(ac_no,:"SYS_B_132",:"SYS_B_133") like :"SYS_B_134" then
(lcy_amount) end) as CP_Amt,
(CASE WHEN length(ac_no)=:"SYS_B_135" then (lcy_amount) end) as
Domes_Amt,
(CASE WHEN length(ac_no)!=:"SYS_B_136" and
(substr(ac_no,:"SYS_B_137",:"SYS_B_138") like :"SYS_B_139" or
substr(ac_no,:"SYS_B_140",:"SYS_B_141") like :"SYS_B_142" or
substr(ac_no,:"SYS_B_143",:"SYS_B_144") like :"SYS_B_145") then
(fcy_amount) end) as FCur_Amt,
(CASE WHEN length(ac_no)!=:"SYS_B_146" and
substr(ac_no,:"SYS_B_147",:"SYS_B_148") like :"SYS_B_149" then
(fcy_amount) end) as FSav_Amt,
(CASE WHEN length(ac_no)!=:"SYS_B_150" and
substr(ac_no,:"SYS_B_151",:"SYS_B_152") like :"SYS_B_153" then
(fcy_amount) end) as FFix_Amt,
(CASE WHEN length(ac_no)!=:"SYS_B_154" and
substr(ac_no,:"SYS_B_155",:"SYS_B_156") like :"SYS_B_157" then
(fcy_amount) end) as FSP_Amt,
(CASE WHEN length(ac_no)!=:"SYS_B_158" and
substr(ac_no,:"SYS_B_159",:"SYS_B_160") like :"SYS_B_161" then

(fcy_amount) end) as FCP_Amt,


(CASE WHEN length(ac_no)=:"SYS_B_162" then (fcy_amount) end) as
FDomes_Amt,
CUST_GL, USER_ID
FROM acvws_ALL_AC_ENTRIES A
INNER JOIN BIV_TILL_DENO B
ON A.EXTERNAL_REF_NO = B.XREF and A.ac_branch = B.branchcode
WHERE substr(trn_ref_no,:"SYS_B_163",:"SYS_B_164") in (SELECT
PRODUCTCODE FROM BI_CASHPOSTING_PRD_TRN)
AND TRN_CODE IN (SELECT TRN_CODE FROM BI_CASHPOSTING_PRD_TRN)
--and event <> 'CYPO'
and AC_CCY =:P_Currency
and TRN_DT=:P_Date
and AC_Branch =:P_BranchCode
--and trn_code<>'COM'
and DRCR_IND = :"SYS_B_165"
--and b.TILL_ID in (:P_TillID)
and ac_no not in (select gl_code from biv_cashcode)
and AC_NO not IN (:"SYS_B_166",:"SYS_B_167")
and AC_ENTRY_SR_NO NOT IN
(SELECT AC_ENTRY_SR_NO FROM acvws_all_ac_entries trans WHERE AC_NO IN
(:"SYS_B_168",:"SYS_B_169") AND TRN_CODE=:"SYS_B_170")
and ac_entry_sr_no not in
(select ac_entry_sr_no from acvws_all_ac_entries where
substr(trn_ref_no,:"SYS_B_171",:"SYS_B_172") in
(:"SYS_B_173",:"SYS_B_174",:"SYS_B_175") and trn_code in
(:"SYS_B_176",:"SYS_B_177",:"SYS_B_178",:"SYS_B_179"))
and external_ref_no not in
(Select external_ref_no from acvws_all_ac_entries where
event=:"SYS_B_180"
and AC_CCY =:P_Currency and external_ref_no is not null
and trn_dt =:P_Date and AC_Branch = :P_BranchCode group by
external_ref_no)
union all
SELECT
EXTERNAL_REF_NO,TRN_REF_NO,
TILL_ID,
(case
when related_account is null then
ac_no
else
related_account
end) as ac_no,
Cur_Amt,
Sav_Amt,
Fix_Amt,
SP_Amt,
CP_Amt,
Domes_Amt,
FCur_Amt,
FSav_Amt,
FFix_Amt,
FSP_Amt,
FCP_Amt,
FDomes_Amt,
CUST_GL,
USER_ID
from (select distinct A.TRN_REF_NO,
B.XREF as EXTERNAL_REF_NO,
B.TILL_ID,

Cur_Amt,
Sav_Amt,
Fix_Amt,
SP_Amt,
CP_Amt,
Domes_Amt,
FCur_Amt,
FSav_Amt,
FFix_Amt,
FSP_Amt,
FCP_Amt,
FDomes_Amt,
Cust_gl,
trn_desc,
user_id,
related_account
from (
select A.trn_ref_no,
XREFID,
A.ac_no,
(CASE WHEN length(ac_no)!=:"SYS_B_181" and
(substr(ac_no,:"SYS_B_182",:"SYS_B_183") like :"SYS_B_184" or
substr(ac_no,:"SYS_B_185",:"SYS_B_186") like :"SYS_B_187" or
substr(ac_no,:"SYS_B_188",:"SYS_B_189") like :"SYS_B_190") then
(lcy_amount) end) as Cur_Amt,
(CASE WHEN length(ac_no)!=:"SYS_B_191" and
substr(ac_no,:"SYS_B_192",:"SYS_B_193") like :"SYS_B_194" then
(lcy_amount) end) as Sav_Amt,
(CASE WHEN length(ac_no)!=:"SYS_B_195" and
substr(ac_no,:"SYS_B_196",:"SYS_B_197") like :"SYS_B_198" then
(lcy_amount) end) as Fix_Amt,
(CASE WHEN length(ac_no)!=:"SYS_B_199" and
substr(ac_no,:"SYS_B_200",:"SYS_B_201") like :"SYS_B_202" then
(lcy_amount) end) as SP_Amt,
(CASE WHEN length(ac_no)!=:"SYS_B_203" and
substr(ac_no,:"SYS_B_204",:"SYS_B_205") like :"SYS_B_206" then
(lcy_amount) end) as CP_Amt,
(CASE WHEN length(ac_no)=:"SYS_B_207" then (lcy_amount) end) as
Domes_Amt,
(CASE WHEN length(ac_no)!=:"SYS_B_208" and
(substr(ac_no,:"SYS_B_209",:"SYS_B_210") like :"SYS_B_211" or
substr(ac_no,:"SYS_B_212",:"SYS_B_213") like :"SYS_B_214" or
substr(ac_no,:"SYS_B_215",:"SYS_B_216") like :"SYS_B_217") then
(fcy_amount) end) as FCur_Amt,
(CASE WHEN length(ac_no)!=:"SYS_B_218" and
substr(ac_no,:"SYS_B_219",:"SYS_B_220") like :"SYS_B_221" then
(fcy_amount) end) as FSav_Amt,
(CASE WHEN length(ac_no)!=:"SYS_B_222" and
substr(ac_no,:"SYS_B_223",:"SYS_B_224") like :"SYS_B_225" then
(fcy_amount) end) as FFix_Amt,
(CASE WHEN length(ac_no)!=:"SYS_B_226" and
substr(ac_no,:"SYS_B_227",:"SYS_B_228") like :"SYS_B_229" then
(fcy_amount) end) as FSP_Amt,
(CASE WHEN length(ac_no)!=:"SYS_B_230" and
substr(ac_no,:"SYS_B_231",:"SYS_B_232") like :"SYS_B_233" then
(fcy_amount) end) as FCP_Amt,
(CASE WHEN length(ac_no)=:"SYS_B_234" then (fcy_amount) end) as
FDomes_Amt,
A.trn_desc,
A.CUST_GL,

user_id,
related_account
from fbtb_txnlog_master M, acvws_all_acentries_desc A
where
A.trn_ref_no in (select reference_no from ictms_tdpayin_details where
multimode_payopt = :"SYS_B_235")
and txnactdet = A.ac_no
and A.AC_BRANCH = M.Branchcode
and M.Postingdate = A.TRN_DT
and txnccydet =:P_Currency
and A.TRN_DT =:P_Date
and ac_branch =:P_BranchCode
and DRCR_IND = :"SYS_B_236"
and ac_no not in (select gl_code from biv_cashcode)
and AC_NO not IN (:"SYS_B_237",:"SYS_B_238")
and M.Xrefid not in
(select external_ref_no from acvws_all_ac_entries
where ac_no in (select ac_no from acvws_all_ac_entries where event =
:"SYS_B_239" and TRN_DT = :P_Date)
and TRN_DT =:P_Date
and trn_code IN(:"SYS_B_240",:"SYS_B_241"))
and ac_entry_sr_no not in
(select ac_entry_sr_no
from acvws_all_acentries_desc
where substr(trn_ref_no, :"SYS_B_242", :"SYS_B_243") in
(:"SYS_B_244", :"SYS_B_245", :"SYS_B_246") and trn_code in
(:"SYS_B_247", :"SYS_B_248", :"SYS_B_249",:"SYS_B_250"))
and AC_ENTRY_SR_NO NOT IN
(SELECT AC_ENTRY_SR_NO
FROM acvws_all_acentries_desc trans WHERE AC_NO IN
(:"SYS_B_251",:"SYS_B_252") AND TRN_CODE = :"SYS_B_253")
and external_ref_no not in
(Select external_ref_no from acvws_all_ac_entries b where
event=:"SYS_B_254"
and AC_CCY =:P_Currency and b.external_ref_no is not null
and TRN_DT=:P_Date and AC_Branch =:P_BranchCode)) A
inner join BIV_TILL_DENO B on A.xrefid = B.XREF
--where b.TILL_ID in (:P_TillID)
) Depo
left join istms_instr_txn txn on depo.trn_ref_no =
txn.contract_ref_no)A
group by Till_ID
order by Till_ID
Rationale
The SQL spent 100% of its database time on CPU, I/O and Cluster waits.
This part of database time may be improved by the SQL Tuning Advisor.
Rationale
Database time for this SQL was divided as follows: 100% for SQL
execution, 0% for parsing, 0% for PL/SQL execution and 0% for Java
execution.
Rationale
SQL statement with SQL_ID "1bdsm0jq3vjt8" was executed 1 times and had
an average elapsed time of 1494 seconds.
Rationale
At least 2 distinct execution plans were utilized for this SQL statement
during the analysis period.
Recommendation 3: SQL Tuning
Estimated benefit is .3 active sessions, 10.41% of total activity.
------------------------------------------------------------------

Action
Run SQL Tuning Advisor on the SELECT statement with SQL_ID
"gb8dbmdrxwy9q".
Related Object
SQL statement with SQL_ID gb8dbmdrxwy9q.
Select trn_ref_no,AC_ENTRY_SR_NO,VALUE_DT as TRN_DT,TRN_CODE, AC_No,
(maturity_date-int_start_date) as Days, Case When
DRCR_IND=:"SYS_B_00" then DRCR_MNT * (-:"SYS_B_01") end WDL,Case
When DRCR_IND=:"SYS_B_02" then DRCR_MNT end DEP, Running_Bal, AC_NO
from (select ac.trn_ref_no,ac.AC_NO,ac.ac_ccy,ac.VALUE_DT,ac.AC_BRANC
H,ac.DRCR_IND,ac.LCY_AMOUNT,ac.FCY_AMOUNT,ac.AC_ENTRY_SR_NO,ac.extern
al_ref_no,ac.cust_gl,ac.TRN_CODE,ac.AMOUNT_TAG,ac.RELATED_ACCOUNT,ac.
event,sum(decode(ac.DRCR_IND,:"SYS_B_03",ac.LCY_AMOUNT,:"SYS_B_04",-(
ac.LCY_AMOUNT))) over ( partition by
substr(ac.AC_NO,:"SYS_B_05",:"SYS_B_06") order by ac.AC_ENTRY_SR_NO
range between unbounded preceding and current row )
running_bal,decode(ac.DRCR_IND,:"SYS_B_07",ac.LCY_AMOUNT,:"SYS_B_08",
-(ac.LCY_AMOUNT)) drcr_mnt from Acvws_All_Ac_Entries ac where
substr(ac_no,:"SYS_B_09",:"SYS_B_10") = :"SYS_B_11" and
substr(ac_no,:"SYS_B_12",:"SYS_B_13") = :"SYS_B_14" and
substr(ac_no,:"SYS_B_15",:"SYS_B_16")=:"SYS_B_17" and
ac.AC_ENTRY_SR_NO > :"SYS_B_18" group by ac.AC_NO, ac.VALUE_DT,
ac.ac_ccy, ac.AC_BRANCH, ac.DRCR_IND,ac.LCY_AMOUNT, ac.FCY_AMOUNT,
ac.trn_ref_no, ac.cust_gl, ac.AMOUNT_TAG, ac.event,
ac.RELATED_ACCOUNT, ac.TRN_CODE,ac.AC_ENTRY_SR_NO,ac.external_ref_no
order by ac.AC_ENTRY_SR_NO) INNER JOIN ictm_acc ON AC_No= ACC Where
AC_ENTRY_SR_NO >= :"SYS_B_19" and trn_ref_no not in (select
trn_ref_no from acvws_all_ac_entries where event=:"SYS_B_20") order
by AC_ENTRY_SR_NO
Rationale
The SQL spent 100% of its database time on CPU, I/O and Cluster waits.
This part of database time may be improved by the SQL Tuning Advisor.
Rationale
Database time for this SQL was divided as follows: 100% for SQL
execution, 0% for parsing, 0% for PL/SQL execution and 0% for Java
execution.
Rationale
SQL statement with SQL_ID "gb8dbmdrxwy9q" was executed 19 times and had
an average elapsed time of 56 seconds.
Recommendation 4: SQL Tuning
Estimated benefit is .07 active sessions, 2.43% of total activity.
-----------------------------------------------------------------Action
Investigate the PL/SQL statement with SQL_ID "a54b1ppyyhv9u" for
possible performance improvements. You can supplement the information
given here with an ASH report for this SQL_ID.
Related Object
SQL statement with SQL_ID a54b1ppyyhv9u.
BEGIN GWPKSS_SERVICE_ROUTER.PR_PROCESS_REQ_MSG(:1 ,:2 ,:3 ,:4 ); END;
Rationale
The SQL Tuning Advisor cannot operate on PL/SQL statements.
Rationale
Database time for this SQL was divided as follows: 16% for SQL
execution, 0% for parsing, 72% for PL/SQL execution and 12% for Java
execution.
Rationale
SQL statement with SQL_ID "a54b1ppyyhv9u" was executed 2038 times and
had an average elapsed time of 0.95 seconds.

Recommendation 5: SQL Tuning


Estimated benefit is .06 active sessions, 2.14% of total activity.
-----------------------------------------------------------------Action
Run SQL Tuning Advisor on the DELETE statement with SQL_ID
"96ka72ubs9bx8".
Related Object
SQL statement with SQL_ID 96ka72ubs9bx8.
DELETE FROM fbtb_txnlog_details WHERE BRANCHCODE = :"SYS_B_0" and
trunc(timestamp) < TO_DATE(:"SYS_B_1", :"SYS_B_2")
Rationale
The SQL spent 100% of its database time on CPU, I/O and Cluster waits.
This part of database time may be improved by the SQL Tuning Advisor.
Rationale
Database time for this SQL was divided as follows: 100% for SQL
execution, 0% for parsing, 0% for PL/SQL execution and 0% for Java
execution.
Rationale
SQL statement with SQL_ID "96ka72ubs9bx8" was executed 3 times and had
an average elapsed time of 76 seconds.
Finding 2: "User I/O" wait Class
Impact is .53 active sessions, 18.21% of total activity.
-------------------------------------------------------Wait class "User I/O" was consuming significant database time.
The throughput of the I/O subsystem was not significantly lower than expected.
The Oracle instance memory (SGA and PGA) was adequately sized.
No recommendations are available.
Finding 3: Top Segments by "User I/O" and "Cluster"
Impact is .29 active sessions, 10.19% of total activity.
-------------------------------------------------------Individual database segments responsible for significant "User I/O" and
"Cluster" waits were found.
Recommendation 1: Segment Tuning
Estimated benefit is .18 active sessions, 6.14% of total activity.
-----------------------------------------------------------------Action
Investigate application logic involving I/O on TABLE
"FCUBSPROD.ACTB_HISTORY" with object ID 508444.
Related Object
Database object with ID 508444.
Action
Look at the "Top SQL Statements" finding for SQL statements consuming
significant I/O on this segment. For example, the SELECT statement with
SQL_ID "ca7xydktw0a0v" is responsible for 100% of "User I/O" and
"Cluster" waits for this segment.
Rationale
The I/O usage statistics for the object are: 35 full object scans, 9175
physical reads, 0 physical writes and 0 direct reads.
Recommendation 2: Segment Tuning
Estimated benefit is .12 active sessions, 4.06% of total activity.
-----------------------------------------------------------------Action
Run "Segment Advisor" on TABLE "FCUBSPROD.FBTB_TXNLOG_DETAILS" with

object ID 514447.
Related Object
Database object with ID 514447.
Action
Investigate application logic involving I/O on TABLE
"FCUBSPROD.FBTB_TXNLOG_DETAILS" with object ID 514447.
Related Object
Database object with ID 514447.
Action
Look at the "Top SQL Statements" finding for SQL statements consuming
significant I/O on this segment. For example, the DELETE statement with
SQL_ID "96ka72ubs9bx8" is responsible for 52% of "User I/O" and
"Cluster" waits for this segment.
Rationale
The I/O usage statistics for the object are: 6 full object scans,
2335373 physical reads, 1720 physical writes and 0 direct reads.
Symptoms That Led to the Finding:
--------------------------------Wait class "User I/O" was consuming significant database time.
Impact is .53 active sessions, 18.21% of total activity.
Finding 4: Global Cache Messaging
Impact is .28 active sessions, 9.64% of total activity.
------------------------------------------------------Inter-instance messaging was consuming significant database time on this
instance.
Recommendation 1: Application Analysis
Estimated benefit is .28 active sessions, 9.64% of total activity.
-----------------------------------------------------------------Action
Look at the "Top SQL Statements" finding for SQL statements consuming
significant time on Cluster waits. For example, the SELECT statement
with SQL_ID "gb8dbmdrxwy9q" is responsible for 32% of Cluster wait
during the analysis period.
Symptoms That Led to the Finding:
--------------------------------Wait class "Cluster" was consuming significant database time.
Impact is .28 active sessions, 9.64% of total activity.
Finding 5: PL/SQL Execution
Impact is .14 active sessions, 4.67% of total activity.
------------------------------------------------------PL/SQL execution consumed significant database time.
Recommendation 1: SQL Tuning
Estimated benefit is .14 active sessions, 4.67% of total activity.
-----------------------------------------------------------------Action
Tune the entry point PL/SQL
"FCUBSPROD.GWPKS_SERVICE_ROUTER.PR_PROCESS_REQ_MSG#1" of type "PACKAGE"
and ID 518654. Refer to the PL/SQL documentation for addition
information.
Rationale
110 seconds spent in executing PL/SQL
"FCUBSPROD.CSPKS_REQ_UTILS.FN_GET_AMENDABLE_DETAILS" of type "PACKAGE"

and ID 516512.
Rationale
60 seconds spent in executing PL/SQL "FCUBSPROD.DEBUG.PR_DEBUG" of type
"PACKAGE" and ID 253326.

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Additional Information
---------------------Miscellaneous Information
------------------------Wait class "Application" was not consuming significant database time.
Wait class "Commit" was not consuming significant database time.
Wait class "Concurrency" was not consuming significant database time.
Wait class "Configuration" was not consuming significant database time.
CPU was not a bottleneck for the instance.
Wait class "Network" was not consuming significant database time.
The network latency of the cluster interconnect was within acceptable limits
of 1 milliseconds.
Session connect and disconnect calls were not consuming significant database
time.
Hard parsing of SQL statements was not consuming significant database time.