Advice me on this tkprof file

Hi All
Please advice me on my Tkprof out and query
SELECT DECODE(COUNT(cr.deposit_date), 0, 0, ROUND(SUM(cr.deposit_date - ps.trx_date) / COUNT(cr.deposit_date))) avgdays
,DECODE(COUNT(cr.deposit_date), 0, 0, ROUND(SUM(cr.deposit_date - ps.due_date) / COUNT(cr.deposit_date))) avgdayslate
,NVL(SUM(DECODE(SIGN(cr.deposit_date - ps.due_date),1, 1, 0)), 0) newlate
,NVL(SUM( DECODE(SIGN(cr.deposit_date - ps.due_date),1, 0, 1)), 0) newontime
INTO v_avg_elapsed
,v_days_late
,v_number_late
,v_number_on_time
FROM ar_receivable_applications_all ra
,ar_cash_receipts_all cr
,ar_payment_schedules_all ps
WHERE ra.cash_receipt_id = cr.cash_receipt_id
AND ra.applied_payment_schedule_id = ps.payment_schedule_id
AND ps.customer_id = v_customer_id
AND ra.apply_date BETWEEN ADD_MONTHS(SYSDATE, -12) AND SYSDATE
AND ra.status = 'APP'
AND ra.display = 'Y'
AND NVL(ps.receipt_confirmed_flag,'Y') = 'Y';
===================
call count cpu elapsed disk query current rows
Parse 1 0.00 0.00 0 0 0 0
Execute 100 0.00 0.01 0 0 0 0
Fetch 100 3.90 254.23 29786 99032 0 100
total 201 3.90 254.25 29786 99032 0 100
Misses in library cache during parse: 0
Optimizer goal: CHOOSE
Parsing user id: 173 (recursive depth: 1)
Rows Row Source Operation
100 SORT AGGREGATE
800 FILTER
800 NESTED LOOPS
843 NESTED LOOPS
26721 TABLE ACCESS BY INDEX ROWID AR_PAYMENT_SCHEDULES_ALL
26721 INDEX RANGE SCAN AR_PAYMENT_SCHEDULES_N6 (object id 28824)
843 TABLE ACCESS BY INDEX ROWID AR_RECEIVABLE_APPLICATIONS_ALL
19319 INDEX RANGE SCAN AR_RECEIVABLE_APPLICATIONS_N8 (object id 29014)
800 TABLE ACCESS BY INDEX ROWID AR_CASH_RECEIPTS_ALL
800 INDEX UNIQUE SCAN AR_CASH_RECEIPTS_U1 (object id 28734)
Thanks in advance
Anu.

Thanks for reply Rob
please find the below my code
CREATE OR REPLACE PACKAGE BODY ar_customer_summary_pkg
Name : AR_CUSTOMER_SUMMARY_PKG.pkb
Created Date : 23-March-2009
Created By : Ashok Theegala
Description : Package Body for Interchange System Balance Report for ALACUS,AAL,AHI and ALH
Change History :
Version Date Changed By Comments
1.0 23/03/2009 Ashok Theegala Initial Version
Procedures/Functions
used in this Package
ics_alacus_reporting : Main Procedure for ALACUS Balance Reporting.
alacus_report_stag : Procedure for ALACUS Report staging.
AS
PROCEDURE Update_customer_summary
(p_errbuf OUT VARCHAR2,
p_retcode OUT VARCHAR2)
IS
v_customer_id NUMBER := NULL;
pymt_count NUMBER := 0;
rec_count NUMBER := 0;
v_number_late NUMBER;
v_number_on_time NUMBER;
v_days_late NUMBER;
v_avg_elapsed NUMBER;
v_avg_elapsed_us NUMBER;
v_percent_prompt NUMBER;
v_percent_late NUMBER;
v_number_open NUMBER;
v_last_payment_amount NUMBER;
v_last_payment_date DATE;
v_prev_payment_amount NUMBER;
v_prev_payment_date DATE;
v_last_sale_amount NUMBER;
v_last_sale_date DATE;
v_mtd_sales NUMBER;
v_ytd_sales NUMBER;
v_prev_year_sales NUMBER;
v_prev_receipt_num VARCHAR2(30);
v_last_sale VARCHAR2(50);
c_current_year VARCHAR2(4);
c_previous_year VARCHAR2(4);
c_current_month VARCHAR2(8);
/* ====================================================================== */
/* CURSOR Customer Cursor (Main Customer) LOOP */
/* ====================================================================== */
CURSOR customer_cursor IS
SELECT cst.customer_id customer_id,
cst.customer_number customer_number,
cst.org_id org_id
FROM zz_ar_customer_summary_all cst;
/* ====================================================================== */
/* CURSOR Payments Cursor LOOP */
/* Note: This logic is taken from the Customer Credit Snapshot */
/* Report - ARXCCS */
/* ====================================================================== */
CURSOR payments_cursor(p_customer_id NUMBER) IS
SELECT cr.receipt_number receipt_num,
Nvl(cr.amount,0) amount,
crh.gl_date gl_date
FROM ar_lookups,
ar_cash_receipts_all cr,
ar_cash_receipt_history_all crh
WHERE Nvl(cr.TYPE,'CASH') = ar_lookups.lookup_code
AND ar_lookups.lookup_type = 'PAYMENT_CATEGORY_TYPE'
AND cr.pay_from_customer = p_customer_id
AND cr.cash_receipt_id = crh.cash_receipt_id
AND crh.first_posted_record_flag = 'Y'
ORDER BY cr.creation_date DESC,
cr.cash_receipt_id DESC;
BEGIN
p_errbuf := NULL;
p_retcode := 0;
c_current_year := To_char(SYSDATE,'YYYY');
c_current_month := To_char(SYSDATE,'YYYYMM');
c_previous_year := To_char(To_number(c_current_year) - 1);
FOR customer_record IN customer_cursor LOOP
/* Get Days Late and Average Elapsed Days */
v_customer_id := customer_record.customer_id;
BEGIN
BEGIN
SELECT Decode(Count(cr.deposit_date),0,0,
Round(Sum(cr.deposit_date - ps.trx_date) / Count(cr.deposit_date))) avgdays,
Decode(Count(cr.deposit_date),0,0,
Round(Sum(cr.deposit_date - ps.due_date) / Count(cr.deposit_date))) avgdayslate,
Nvl(Sum(Decode(Sign(cr.deposit_date - ps.due_date),1,1,
0)),
0) newlate,
Nvl(Sum(Decode(Sign(cr.deposit_date - ps.due_date),1,0,
1)),
0) newontime
INTO v_avg_elapsed,v_days_late,v_number_late,v_number_on_time
FROM ar_receivable_applications_all ra,
ar_cash_receipts_all cr,
ar_payment_schedules_all ps
WHERE cr.pay_from_customer = v_customer_id
AND ra.cash_receipt_id = cr.cash_receipt_id
AND ra.apply_date BETWEEN Add_months(SYSDATE,-12) AND SYSDATE
AND ra.status = 'APP'
AND ra.display = 'Y'
AND ra.applied_payment_schedule_id = ps.payment_schedule_id
-- AND ps.customer_id = v_customer_id
AND Nvl(ps.receipt_confirmed_flag,'Y') = 'Y';
EXCEPTION
WHEN no_data_found THEN
v_days_late := NULL;
v_number_late := NULL;
v_avg_elapsed := NULL;
v_number_on_time := NULL;
END;
IF (v_number_on_time + v_number_late) > 0 THEN
v_percent_prompt := Round(v_number_on_time / (v_number_on_time + v_number_late),
2) * 100;
v_percent_late := Round(v_number_late / (v_number_on_time + v_number_late),
2) * 100;
ELSE
v_percent_prompt := 0;
v_percent_late := 0;
END IF;
/* C2# 49827 */
/* Get new average elapsed days for US use only */
v_avg_elapsed_us := NULL;
IF Nvl(customer_record.org_id,-999) = 114 THEN
v_avg_elapsed_us := 0;
BEGIN
SELECT Round(Sum(Nvl(ra.amount_applied,0) * (cr.deposit_date - ps.trx_date)) / Decode(Sum(Nvl(ra.amount_applied,0)),0,1,
Sum(Nvl(ra.amount_applied,0)))) avg_elapsed_us
INTO v_avg_elapsed_us
FROM ar_receivable_applications_all ra,
ar_cash_receipts_all cr,
ar_payment_schedules_all ps
WHERE ra.cash_receipt_id = cr.cash_receipt_id
AND ra.applied_payment_schedule_id = ps.payment_schedule_id
AND ps.customer_id = v_customer_id
AND ra.apply_date BETWEEN Add_months(SYSDATE,-06) AND SYSDATE
AND ps.status = 'CL'
AND ra.status = 'APP'
AND ra.display = 'Y'
AND Nvl(ps.receipt_confirmed_flag,'Y') = 'Y'
AND ra.amount_applied <> 0;
v_avg_elapsed_us := Nvl(v_avg_elapsed_us,0);
EXCEPTION
WHEN no_data_found THEN
v_avg_elapsed_us := NULL;
END;
END IF;
END;
/* Get MTD, YTD, Prev Year Sales */
/* Note: This logic is taken from the Customer Credit Snapshot */
/* Report - ARXCCS */
BEGIN
SELECT Nvl(Sum(Decode(To_char(ps.trx_date,'YYYYMM'),c_current_month,amount_due_original,
0)),
0) mtd_sales,
Nvl(Sum(Decode(To_char(ps.trx_date,'YYYY'),c_current_year,amount_due_original,
0)),
0) ytd_sales,
Nvl(Sum(Decode(To_char(ps.trx_date,'YYYY'),c_previous_year,amount_due_original,
0)),
0) prev_sales,
Sum(Decode(ps.status,'OP',(Decode(Sign(amount_due_original),1,1,
0)),
0)) number_open
INTO v_mtd_sales,v_ytd_sales,v_prev_year_sales,v_number_open
FROM ar_payment_schedules_all ps
WHERE ps.customer_id = v_customer_id
AND ps.class != 'PMT';
EXCEPTION
WHEN no_data_found THEN
v_mtd_sales := NULL;
v_ytd_sales := NULL;
v_prev_year_sales := NULL;
END;
/* Get Last and Previous Payments */
pymt_count := 0;
v_last_payment_date := NULL;
v_prev_payment_date := NULL;
v_last_payment_amount := NULL;
v_prev_payment_amount := NULL;
v_prev_receipt_num := NULL;
FOR payments_record IN payments_cursor(p_customer_id => v_customer_id) LOOP
BEGIN
IF payments_record.receipt_num = v_prev_receipt_num THEN
NULL;
ELSIF pymt_count = 0 THEN
v_last_payment_date := payments_record.gl_date;
v_last_payment_amount := payments_record.amount;
pymt_count := pymt_count + 1;
v_prev_receipt_num := payments_record.receipt_num;
ELSIF pymt_count = 1 THEN
v_prev_payment_date := payments_record.gl_date;
v_prev_payment_amount := payments_record.amount;
EXIT;
ELSE
EXIT;
END IF;
END;
END LOOP;
-->
BEGIN
SELECT Max(ct.trx_date),
Max(ps.amount_due_original)
KEEP ( DENSE_RANK LAST ORDER BY ct.trx_date )
INTO v_last_sale_date,v_last_sale_amount
FROM ar_payment_schedules_all ps,
ra_customer_trx_all ct
WHERE ct.bill_to_customer_id = v_customer_id
AND ps.customer_trx_id = ct.customer_trx_id
AND ps.class = 'INV';
EXCEPTION
WHEN no_data_found THEN
v_last_sale_date := NULL;
v_last_sale_amount := NULL;
END;
/* Update Values into ZZ_AR_CUSTOMER_SUMMARY_ALL */
BEGIN
UPDATE zz_ar_customer_summary_all
SET sales_last_year = v_prev_year_sales,
sales_ytd = v_ytd_sales,
sales_mtd = v_mtd_sales,
last_sale_date = v_last_sale_date,
last_sale_amount = v_last_sale_amount,
last_payment_date = v_last_payment_date,
last_payment_amount = v_last_payment_amount,
previous_payment_date = v_prev_payment_date,
previous_payment_amount = v_prev_payment_amount,
prompt = v_percent_prompt,
late = v_percent_late,
avg_elapsed_days = v_avg_elapsed,
avg_elapsed_days_us = v_avg_elapsed_us -- C2# 49827
days_late = v_days_late,
number_open = v_number_open
WHERE customer_id = customer_record.customer_id;
EXCEPTION
WHEN program_error THEN
NULL;
WHEN dup_val_on_index THEN
NULL;
WHEN storage_error THEN
NULL;
WHEN OTHERS THEN
NULL;
END;
rec_count := rec_count + 1;
IF rec_count = 1000 THEN
COMMIT;
rec_count := 0;
fnd_file.Put_line(fnd_file.output,'Commit at customer_id = '
||To_char(customer_record.customer_id)
||' '
||To_char(SYSDATE,'DD-MON-YYYY HH24:MI:SS'));
fnd_file.New_line(fnd_file.output,1);
END IF;
END LOOP;
COMMIT;
--> Bulk update the customer summary table
/* UPDATE zz_ar_customer_summary_all a
SET (LAST_SALE_DATE ,
LAST_SALE_AMOUNT) = (SELECT max (ct.trx_date),
max (ps.amount_due_original) keep (dense_rank last order by ct.trx_date)
FROM ar_payment_schedules_all ps, ra_customer_trx_all ct
WHERE ct.bill_to_customer_id = a.customer_id
AND ps.customer_trx_id = ct.customer_trx_id
AND ps.class = 'INV')
,(sales_mtd
,sales_ytd
,sales_last_year
,number_open) = (SELECT NVL(SUM(DECODE(TO_CHAR(ps.trx_date,'YYYYMM'),TO_CHAR(SYSDATE,'YYYYMM'),amount_due_original,0)),0)
,NVL(SUM(DECODE(TO_CHAR(ps.trx_date,'YYYY'),TO_CHAR(SYSDATE,'YYYY'),amount_due_original,0)),0)
,NVL(SUM(DECODE(TO_CHAR(ps.trx_date,'YYYY'),TO_CHAR(TO_NUMBER(TO_CHAR(SYSDATE,'YYYY')) - 1),amount_due_original,0)),0)
,SUM(DECODE(ps.status,'OP',(DECODE(SIGN(amount_due_original),1,1,0)),0))
from ar_payment_schedules_all ps
where ps.customer_id = a.customer_id
and ps.class != 'PMT' )
,avg_elapsed_days_us = decode (a.org_id ,114 ,(SELECT nvl(ROUND(SUM(NVL(ra.amount_applied,0) * (cr.deposit_date - ps.trx_date)) / DECODE(SUM(NVL(ra.amount_applied,0)),0,1,SUM(NVL(ra.amount_applied,0)))),0)
FROM ar_receivable_applications_all ra
,ar_cash_receipts_all cr
,ar_payment_schedules_all ps
WHERE ra.cash_receipt_id = cr.cash_receipt_id
AND ra.applied_payment_schedule_id = ps.payment_schedule_id
AND ps.customer_id = a.customer_id
AND ra.apply_date BETWEEN ADD_MONTHS(SYSDATE, -06) AND SYSDATE
AND ps.status = 'CL'
AND ra.status = 'APP'
AND ra.display = 'Y'
AND nvl(ps.receipt_confirmed_flag,'Y') = 'Y'
AND ra.amount_applied <> 0 ) ,null);
COMMIT; */
EXCEPTION
WHEN OTHERS THEN
ROLLBACK;
p_retcode := 2;
p_errbuf := SQLERRM;
fnd_file.Put_line(fnd_file.LOG,'Errors at Customer update summary:'
||'-'
||p_errbuf);
END update_customer_summary;
END ar_customer_summary_pkg;
/

Similar Messages

  • Please advice on adding 3D-animation files into a PDF with Acrobat Pro DC.

    Hello,
    Where is the button animation in Acrobat Pro DC?
    Can you give me advice on adding 3D-animation files into a PDF with Acrobat Pro DC.
    I have Acrobat PRO DC .
    Thank you.

    Hi George,
    I just tried adding the files as attachments; however I didn't like doing that because it increased the file size of my PDF document quite a bit. 
    I'm not sure if you're familiar with the "Insert Object" command in MS Word, but I want to do the same thing in my PDF document...but the key is, anyone must to be able to open the embedded file from any location.
    I created an MS Word document with several embedded objects.  I was later asked to PDF the Word document, but since embedded MS Word objects do not migrate to the PDF, I am now trying to embed the same files I embedded into my Word document into my PDF document over top of the icon image.  The file types I'm trying to embed include MS Word, Excel, PowerPoint, and Adobe PDF.  Does this make more sense?  I want to create a hyperlink over top the icon image that was PDF'd from the MS Word document which allows any user to click on the link and open the separate file.

  • Can generate the TKPROF file without the SQL is not running completed ?

    Dear all:
    I want to generate the TKPROF file from the trace file, Can generate the TKPROF file without the SQL is not running completed ? Is it the TKPROF file can be used? because the report is too large. My environment is ORACLE 11.5.9
    Regards
    Terry

    When you can wait for completion, then that's the easiest route.
    When you can't wait, you'll have to use a different method. I suggest to watch the v$ views for what your session is doing. Views like v$session, v$session_wait, v$sess_io and the views starting with v$sql. Also worth mentioning is Tanel Poder's site, which contains some very useful scripts for diagnosing performance problems this way: http://tech.e2sn.com/.
    Regards,
    Rob.

  • INVOKING TKPROF file

    Hi,
    Can u tell me how to Invoke this TKPROF file

    tkprof - is not a file. it is utility to format oracle trace file to more redable output. to invoke tkprof
    tkprof trace_file_name.trc output.txt
    I will suggest you using
    tkprof trace_file_name.trc output.txt SYS=NO - if you would like not to include recursive sql in teh output (sql queries to data dictionary)
    best regards
    Krystian Zieja / mob

  • Help to read TKPROF file in correct way

    Hi,
    I need help to understand what is going wrong.
    I have one query executed with different bind variables values.
    Case 1: Execution time is about 7.5 hours when :v6=:v3=:v4 (these are date bind variables values)
    Case 2: Execution time is about 2 minuteswhen :v6 differs from :v3 and :v4, but :v3=:v4 (these are date bind variables values)
    You can see TKPROF files below
    Case1
    SELECT EK.SECIK AS EK_SECIK,S.SECIK AS S_SECIK,EK.EQKEY1 AS EK_EQKEY1,EK.FROMDATE AS EK_FROMDATE,S.SECSHORT AS S_SECSHORT,S.SECNAME AS S_SECNAME,C.CDY AS C_CDY,C.CSTD AS C_CSTD,P.PAR AS P_PAR,P.PARIK AS P_PARIK,PH.ACCOUNTING_FRAMEWORK AS PH_ACC_FW,NVL(PH.BAL_NOMINAL_NUMBER,0) AS PH_BAL_NOM_NUM,PH.FROM_DATE AS PH_FROM_DATE,PH.POR AS PH_POR,PH.SEC_SHORT_NAME AS PH_SEC_SHORT_NAME,PH.TO_DATE AS PH_TO_DATE,PH.CUSTODY_SHORT_NAME AS PH_CUST_SHORT_NAME,T.TC_CSTD AS T_CSTD,SUM(T.TH_BAL_NOM_NUM) AS T_BAL_NOM_NUM,T.TH_SEC_SHORT_NAME AS T_SEC_SHORT_NAME,PH.POR_REF AS PH_POR_REF,PORT.PORIK AS PORT_PORIK,PORT.PORGRPIK AS PORT_PORGRPIK,PG.PORGRPIK AS PG_PORGRPIK,PG.PORGRPTYPEIK AS PG_PORGRPTYPEIK,PGT.PORGRPTYPEIK AS PGT_PORGRPTYPEIK FROM SCDAT.CUSTODIES C,SCDAT.EQUITYKEYS EK,SCDAT.PARTNERS P,SCDAT.PORTGROUPS PG,SCDAT.PORTGROUPTYPES PGT,(
    SELECT  HOLKEYS.PORIK As POR_REF,
    ACCDEF.ACC As ACCOUNTING_FRAMEWORK,
    NVL(HOLDINGS.BALNOMVAL,0) As BAL_NOMINAL_NUMBER,
    CUSTODIES.CDY As CUSTODY_SHORT_NAME,
    DECODE(HOLDINGS.FINBOOKED,0,'No',1,'Yes',' ') As FINALLY_BOOKED,
    HOLDINGS.FROMDATE As FROM_DATE,
    PORTFOLIOS.POR As POR,
    SECURITIES.SECSHORT As SEC_SHORT_NAME,
    HOLDINGS.TODATE As TO_DATE,
    HOLDINGS.FINBOOKED As X_FINALLY_BOOKED
    FROM HOLDINGS,HOLKEYS,ACCDEF,CUSTODIES,PORTFOLIOS,SECURITIES WHERE HOLDINGS.HOLKEYIK = HOLKEYS.HOLKEYIK AND HOLDINGS.ACCIK = ACCDEF.ACCIK AND HOLKEYS.CDYIK = CUSTODIES.CDYIK AND HOLKEYS.PORIK = PORTFOLIOS.PORIK AND HOLKEYS.SECIK = SECURITIES.SECIK) PH,SCDAT.PORTFOLIOS PORT,SCDAT.SECURITIES S,(SELECT TC.CDY AS TC_CDY,TC.CSTD AS TC_CSTD,SUM(NVL(TH.BAL_NOMINAL_NUMBER,0)) AS TH_BAL_NOM_NUM,TH.FROM_DATE AS TH_FROM_DATE,TH.TO_DATE AS TH_TO_DATE,TH.SEC_SHORT_NAME AS TH_SEC_SHORT_NAME,TH.CUSTODY_SHORT_NAME AS TH_CUST_SHORT_NAME,TP.PAR AS TP_PAR,TP.PARIK AS TP_PARIK FROM SCDAT.CUSTODIES TC,(
    SELECT  ACCDEF.ACC As ACCOUNTING_FRAMEWORK,
    NVL(HOLDINGS.BALNOMVAL,0) As BAL_NOMINAL_NUMBER,
    CUSTODIES.CDY As CUSTODY_SHORT_NAME,
    DECODE(HOLDINGS.FINBOOKED,0,'No',1,'Yes',' ') As FINALLY_BOOKED,
    HOLDINGS.FROMDATE As FROM_DATE,
    SECURITIES.SECSHORT As SEC_SHORT_NAME,
    HOLDINGS.TODATE As TO_DATE,
    HOLDINGS.FINBOOKED As X_FINALLY_BOOKED
    FROM HOLDINGS,HOLKEYS,ACCDEF,CUSTODIES,SECURITIES WHERE HOLDINGS.ACCIK = ACCDEF.ACCIK AND HOLDINGS.HOLKEYIK = HOLKEYS.HOLKEYIK AND HOLKEYS.CDYIK = CUSTODIES.CDYIK AND HOLKEYS.SECIK = SECURITIES.SECIK) TH,SCDAT.PARTNERS TP WHERE TH.CUSTODY_SHORT_NAME = TC.CDY AND TC.CSTD = TP.PARIK AND TH.ACCOUNTING_FRAMEWORK = :v1  AND NOT (NVL(TH.BAL_NOMINAL_NUMBER,0) = :v2 )  AND TH.FROM_DATE <= :v3  AND TH.TO_DATE >= :v4  AND TH.FINALLY_BOOKED = :v5  GROUP BY TC.CDY,TC.CSTD,TH.FROM_DATE,TH.TO_DATE,TH.SEC_SHORT_NAME,TH.CUSTODY_SHORT_NAME,TP.PAR,TP.PARIK) T WHERE EK.SECIK = S.SECIK AND PORT.PORGRPIK = PG.PORGRPIK AND PG.PORGRPTYPEIK = PGT.PORGRPTYPEIK AND S.SECSHORT = PH.SEC_SHORT_NAME AND PH.SEC_SHORT_NAME = T.TH_SEC_SHORT_NAME AND PH.POR_REF = PORT.PORIK AND PH.CUSTODY_SHORT_NAME = C.CDY AND EK.FROMDATE = :v6  AND NOT (EK.EQKEY1 = :v7 )  AND P.PAR = :v8  AND NOT (PGT.PORGRPTYPE IN (:v9 ,:v10  ))  AND PH.ACCOUNTING_FRAMEWORK = :v11   AND NOT (NVL(PH.BAL_NOMINAL_NUMBER,0) = :v12  )  AND PH.FINALLY_BOOKED = :v13   AND EK.FROMDATE >= PH.FROM_DATE AND EK.FROMDATE <= PH.TO_DATE AND C.CSTD = P.PARIK AND C.CSTD = T.TC_CSTD GROUP BY EK.SECIK,S.SECIK,EK.EQKEY1,EK.FROMDATE,S.SECSHORT,S.SECNAME,C.CDY,C.CSTD,P.PAR,P.PARIK,PH.ACCOUNTING_FRAMEWORK,NVL(PH.BAL_NOMINAL_NUMBER,0),PH.FROM_DATE,PH.POR,PH.SEC_SHORT_NAME,PH.TO_DATE,PH.CUSTODY_SHORT_NAME,T.TC_CSTD,T.TH_SEC_SHORT_NAME,PH.POR_REF,PORT.PORIK,PORT.PORGRPIK,PG.PORGRPIK,PG.PORGRPTYPEIK,PGT.PORGRPTYPEIK
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute      1      2.31       2.31          0          0          0           0
    Fetch        1  27398.48   27473.33      11124  250891597          0           0
    total        3  27400.79   27475.65      11124  250891597          0           0
    Misses in library cache during parse: 1
    Misses in library cache during execute: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 171  (SCDAT)
    Number of plan statistics captured: 1
    Rows (1st) Rows (avg) Rows (max)  Row Source Operation
             0          0          0  HASH GROUP BY (cr=0 pr=0 pw=0 time=55 us cost=1976 size=251 card=1)
           123        123        123   NESTED LOOPS  (cr=250890161 pr=11086 pw=0 time=35602462 us)
         38622      38622      38622    NESTED LOOPS  (cr=250858945 pr=8664 pw=0 time=4221237335 us cost=1975 size=251 card=1)
          3945       3945       3945     NESTED LOOPS  (cr=250850948 pr=7835 pw=0 time=1967017649 us cost=1937 size=199 card=1)
          3833       3833       3833      HASH JOIN  (cr=42840 pr=6196 pw=0 time=4910380 us cost=1559 size=1956 card=12)
          8667       8667       8667       NESTED LOOPS  (cr=42834 pr=6192 pw=0 time=4254867 us)
          8667       8667       8667        NESTED LOOPS  (cr=34167 pr=6192 pw=0 time=4232686 us cost=1556 size=2156 card=14)
          8667       8667       8667         NESTED LOOPS  (cr=26520 pr=6192 pw=0 time=4206426 us cost=1542 size=2058 card=14)
          8667       8667       8667          NESTED LOOPS  (cr=16041 pr=6192 pw=0 time=4161555 us cost=1528 size=1806 card=14)
         18060      18060      18060           NESTED LOOPS  (cr=16037 pr=6191 pw=0 time=4575478 us cost=1527 size=36504 card=312)
           177        177        177            NESTED LOOPS  (cr=6846 pr=6091 pw=0 time=3909468 us cost=1350 size=1500 card=15)
           177        177        177             NESTED LOOPS  (cr=6490 pr=6091 pw=0 time=3907157 us cost=1320 size=1245 card=15)
           177        177        177              NESTED LOOPS  (cr=6133 pr=6091 pw=0 time=3905733 us cost=1305 size=585 card=15)
             1          1          1               NESTED LOOPS  (cr=5 pr=2 pw=0 time=17096 us cost=2 size=23 card=1)
             1          1          1                TABLE ACCESS BY INDEX ROWID ACCDEF (cr=2 pr=2 pw=0 time=17079 us cost=1 size=12 card=1)
             1          1          1                 INDEX UNIQUE SCAN ACCDEF_IX1 (cr=1 pr=1 pw=0 time=6675 us cost=0 size=0 card=1)(object id 103661)
             1          1          1                TABLE ACCESS BY INDEX ROWID PARTNERS (cr=3 pr=0 pw=0 time=14 us cost=1 size=11 card=1)
             1          1          1                 INDEX UNIQUE SCAN PARTNERS_IX1 (cr=2 pr=0 pw=0 time=9 us cost=0 size=0 card=1)(object id 91563)
           177        177        177               TABLE ACCESS FULL EQUITYKEYS (cr=6128 pr=6089 pw=0 time=3888376 us cost=1303 size=240 card=15)
           177        177        177              TABLE ACCESS BY INDEX ROWID SECURITIES (cr=357 pr=0 pw=0 time=1127 us cost=1 size=44 card=1)
           177        177        177               INDEX UNIQUE SCAN P_SECURITIES (cr=180 pr=0 pw=0 time=563 us cost=0 size=0 card=1)(object id 93819)
           177        177        177             TABLE ACCESS BY INDEX ROWID SECURITIES (cr=356 pr=0 pw=0 time=2027 us cost=2 size=17 card=1)
           177        177        177              INDEX RANGE SCAN SECURITIES_IX2 (cr=180 pr=0 pw=0 time=1166 us cost=1 size=0 card=1)(object id 93809)
         18060      18060      18060            TABLE ACCESS BY INDEX ROWID HOLKEYS (cr=9191 pr=100 pw=0 time=716100 us cost=13 size=340 card=20)
         18060      18060      18060             INDEX RANGE SCAN I_HOLKEYS_SECPOR (cr=421 pr=100 pw=0 time=689634 us cost=2 size=0 card=23)(object id 98864)
          8667       8667       8667           TABLE ACCESS BY INDEX ROWID CUSTODIES (cr=4 pr=1 pw=0 time=131716 us cost=1 size=12 card=1)
         36120      36120      36120            INDEX RANGE SCAN R_CUSTODIES_CSTD (cr=3 pr=1 pw=0 time=53659 us cost=0 size=0 card=3)(object id 101437)
          8667       8667       8667          TABLE ACCESS BY INDEX ROWID PORTFOLIOS (cr=10479 pr=0 pw=0 time=36782 us cost=1 size=18 card=1)
          8667       8667       8667           INDEX UNIQUE SCAN P_PORTFOLIOS (cr=1812 pr=0 pw=0 time=14722 us cost=0 size=0 card=1)(object id 91399)
          8667       8667       8667         INDEX UNIQUE SCAN P_PORTGROUPS (cr=7647 pr=0 pw=0 time=20935 us cost=0 size=0 card=1)(object id 95885)
          8667       8667       8667        TABLE ACCESS BY INDEX ROWID PORTGROUPS (cr=8667 pr=0 pw=0 time=15075 us cost=1 size=7 card=1)
             3          3          3       VIEW  index$_join$_005 (cr=6 pr=4 pw=0 time=17822 us cost=3 size=45 card=5)
             3          3          3        HASH JOIN  (cr=6 pr=4 pw=0 time=17816 us)
             5          5          5         INDEX FAST FULL SCAN PORTGROUPTYPES_IX1 (cr=3 pr=2 pw=0 time=10731 us cost=1 size=45 card=5)(object id 95857)
             3          3          3         INDEX FAST FULL SCAN P_PORTGROUPTYPES (cr=3 pr=2 pw=0 time=6182 us cost=1 size=45 card=5)(object id 95858)
          3945       3945       3945      VIEW PUSHED PREDICATE  (cr=250808108 pr=1639 pw=0 time=1615801762 us cost=32 size=36 card=1)
          3945       3945       3945       SORT GROUP BY (cr=250808108 pr=1639 pw=0 time=1615792437 us cost=32 size=86 card=1)
          8052       8052       8052        NESTED LOOPS  (cr=250808108 pr=1639 pw=0 time=3245096176 us cost=31 size=86 card=1)
       6879822    6879822    6879822         NESTED LOOPS  (cr=14142041 pr=0 pw=0 time=93287445 us cost=18 size=53 card=1)
          7665       7665       7665          MERGE JOIN CARTESIAN (cr=3980 pr=0 pw=0 time=214689 us cost=5 size=40 card=1)
          7665       7665       7665           NESTED LOOPS  (cr=3846 pr=0 pw=0 time=75334 us cost=3 size=23 card=1)
          3833       3833       3833            TABLE ACCESS BY INDEX ROWID PARTNERS (cr=3842 pr=0 pw=0 time=38447 us cost=2 size=11 card=1)
          3833       3833       3833             INDEX UNIQUE SCAN P_PARTNERS (cr=9 pr=0 pw=0 time=13355 us cost=1 size=0 card=1)(object id 91507)
          7665       7665       7665            TABLE ACCESS BY INDEX ROWID CUSTODIES (cr=4 pr=0 pw=0 time=34661 us cost=1 size=12 card=1)
          7665       7665       7665             INDEX RANGE SCAN R_CUSTODIES_CSTD (cr=3 pr=0 pw=0 time=23093 us cost=0 size=0 card=1)(object id 101437)
          7665       7665       7665           BUFFER SORT (cr=134 pr=0 pw=0 time=128191 us cost=4 size=17 card=1)
          7665       7665       7665            TABLE ACCESS BY INDEX ROWID SECURITIES (cr=134 pr=0 pw=0 time=44771 us cost=2 size=17 card=1)
          7665       7665       7665             INDEX RANGE SCAN SECURITIES_IX2 (cr=109 pr=0 pw=0 time=32098 us cost=1 size=0 card=1)(object id 93809)
       6879822    6879822    6879822          TABLE ACCESS BY INDEX ROWID HOLKEYS (cr=14138061 pr=0 pw=0 time=99798296 us cost=13 size=13 card=1)
      27845684   27845684   27845684           INDEX RANGE SCAN I_HOLKEYS_SECPOR (cr=92999 pr=0 pw=0 time=21161648 us cost=2 size=0 card=23)(object id 98864)
          8052       8052       8052         VIEW PUSHED PREDICATE  VW_GBC_22 (cr=236667503 pr=1677 pw=0 time=1559090990 us cost=13 size=33 card=1)
          8052       8052       8052          SORT GROUP BY (cr=236667503 pr=1677 pw=0 time=1552356479 us cost=13 size=64 card=1)
          8052       8052       8052           HASH JOIN  (cr=236667503 pr=1677 pw=0 time=1518269306 us cost=12 size=64 card=1)
       6879822    6879822    6879822            TABLE ACCESS BY INDEX ROWID ACCDEF (cr=13759644 pr=0 pw=0 time=58085525 us cost=1 size=12 card=1)
       6879822    6879822    6879822             INDEX UNIQUE SCAN ACCDEF_IX1 (cr=6879822 pr=0 pw=0 time=37383556 us cost=0 size=0 card=1)(object id 103661)
         16077      16077      16077            TABLE ACCESS BY INDEX ROWID HOLDINGS (cr=222907859 pr=1677 pw=0 time=1109306657 us cost=10 size=52 card=1)
      13212301   13212301   13212301             INDEX SKIP SCAN P_HOLDINGS (cr=211196455 pr=431 pw=0 time=734718877 us cost=6 size=0 card=3)(object id 2173392)
         38622      38622      38622     INDEX RANGE SCAN R_HOLDINGS_HOLKEYIK (cr=7997 pr=829 pw=0 time=9653175 us cost=2 size=0 card=42)(object id 2173885)
           123        123        123    TABLE ACCESS BY INDEX ROWID HOLDINGS (cr=31216 pr=2422 pw=0 time=40223697 us cost=38 size=52 card=1)
    Case2
    SELECT EK.SECIK AS EK_SECIK,S.SECIK AS S_SECIK,EK.EQKEY1 AS EK_EQKEY1,EK.FROMDATE AS EK_FROMDATE,S.SECSHORT AS S_SECSHORT,S.SECNAME AS S_SECNAME,C.CDY AS C_CDY,C.CSTD AS C_CSTD,P.PAR AS P_PAR,P.PARIK AS P_PARIK,PH.ACCOUNTING_FRAMEWORK AS PH_ACC_FW,NVL(PH.BAL_NOMINAL_NUMBER,0) AS PH_BAL_NOM_NUM,PH.FROM_DATE AS PH_FROM_DATE,PH.POR AS PH_POR,PH.SEC_SHORT_NAME AS PH_SEC_SHORT_NAME,PH.TO_DATE AS PH_TO_DATE,PH.CUSTODY_SHORT_NAME AS PH_CUST_SHORT_NAME,T.TC_CSTD AS T_CSTD,SUM(T.TH_BAL_NOM_NUM) AS T_BAL_NOM_NUM,T.TH_SEC_SHORT_NAME AS T_SEC_SHORT_NAME,PH.POR_REF AS PH_POR_REF,PORT.PORIK AS PORT_PORIK,PORT.PORGRPIK AS PORT_PORGRPIK,PG.PORGRPIK AS PG_PORGRPIK,PG.PORGRPTYPEIK AS PG_PORGRPTYPEIK,PGT.PORGRPTYPEIK AS PGT_PORGRPTYPEIK FROM SCDAT.CUSTODIES C,SCDAT.EQUITYKEYS EK,SCDAT.PARTNERS P,SCDAT.PORTGROUPS PG,SCDAT.PORTGROUPTYPES PGT,(
    SELECT  HOLKEYS.PORIK As POR_REF,
    ACCDEF.ACC As ACCOUNTING_FRAMEWORK,
    NVL(HOLDINGS.BALNOMVAL,0) As BAL_NOMINAL_NUMBER,
    CUSTODIES.CDY As CUSTODY_SHORT_NAME,
    DECODE(HOLDINGS.FINBOOKED,0,'No',1,'Yes',' ') As FINALLY_BOOKED,
    HOLDINGS.FROMDATE As FROM_DATE,
    PORTFOLIOS.POR As POR,
    SECURITIES.SECSHORT As SEC_SHORT_NAME,
    HOLDINGS.TODATE As TO_DATE,
    HOLDINGS.FINBOOKED As X_FINALLY_BOOKED
    FROM HOLDINGS,HOLKEYS,ACCDEF,CUSTODIES,PORTFOLIOS,SECURITIES WHERE HOLDINGS.HOLKEYIK = HOLKEYS.HOLKEYIK AND HOLDINGS.ACCIK = ACCDEF.ACCIK AND HOLKEYS.CDYIK = CUSTODIES.CDYIK AND HOLKEYS.PORIK = PORTFOLIOS.PORIK AND HOLKEYS.SECIK = SECURITIES.SECIK) PH,SCDAT.PORTFOLIOS PORT,SCDAT.SECURITIES S,(SELECT TC.CDY AS TC_CDY,TC.CSTD AS TC_CSTD,SUM(NVL(TH.BAL_NOMINAL_NUMBER,0)) AS TH_BAL_NOM_NUM,TH.FROM_DATE AS TH_FROM_DATE,TH.TO_DATE AS TH_TO_DATE,TH.SEC_SHORT_NAME AS TH_SEC_SHORT_NAME,TH.CUSTODY_SHORT_NAME AS TH_CUST_SHORT_NAME,TP.PAR AS TP_PAR,TP.PARIK AS TP_PARIK FROM SCDAT.CUSTODIES TC,(
    SELECT  ACCDEF.ACC As ACCOUNTING_FRAMEWORK,
    NVL(HOLDINGS.BALNOMVAL,0) As BAL_NOMINAL_NUMBER,
    CUSTODIES.CDY As CUSTODY_SHORT_NAME,
    DECODE(HOLDINGS.FINBOOKED,0,'No',1,'Yes',' ') As FINALLY_BOOKED,
    HOLDINGS.FROMDATE As FROM_DATE,
    SECURITIES.SECSHORT As SEC_SHORT_NAME,
    HOLDINGS.TODATE As TO_DATE,
    HOLDINGS.FINBOOKED As X_FINALLY_BOOKED
    FROM HOLDINGS,HOLKEYS,ACCDEF,CUSTODIES,SECURITIES WHERE HOLDINGS.ACCIK = ACCDEF.ACCIK AND HOLDINGS.HOLKEYIK = HOLKEYS.HOLKEYIK AND HOLKEYS.CDYIK = CUSTODIES.CDYIK AND HOLKEYS.SECIK = SECURITIES.SECIK) TH,SCDAT.PARTNERS TP WHERE TH.CUSTODY_SHORT_NAME = TC.CDY AND TC.CSTD = TP.PARIK AND TH.ACCOUNTING_FRAMEWORK = :v1  AND NOT (NVL(TH.BAL_NOMINAL_NUMBER,0) = :v2 )  AND TH.FROM_DATE <= :v3  AND TH.TO_DATE >= :v4  AND TH.FINALLY_BOOKED = :v5  GROUP BY TC.CDY,TC.CSTD,TH.FROM_DATE,TH.TO_DATE,TH.SEC_SHORT_NAME,TH.CUSTODY_SHORT_NAME,TP.PAR,TP.PARIK) T WHERE EK.SECIK = S.SECIK AND PORT.PORGRPIK = PG.PORGRPIK AND PG.PORGRPTYPEIK = PGT.PORGRPTYPEIK AND S.SECSHORT = PH.SEC_SHORT_NAME AND PH.SEC_SHORT_NAME = T.TH_SEC_SHORT_NAME AND PH.POR_REF = PORT.PORIK AND PH.CUSTODY_SHORT_NAME = C.CDY AND EK.FROMDATE = :v6  AND NOT (EK.EQKEY1 = :v7 )  AND P.PAR = :v8  AND NOT (PGT.PORGRPTYPE IN (:v9 ,:v10  ))  AND PH.ACCOUNTING_FRAMEWORK = :v11   AND NOT (NVL(PH.BAL_NOMINAL_NUMBER,0) = :v12  )  AND PH.FINALLY_BOOKED = :v13   AND EK.FROMDATE >= PH.FROM_DATE AND EK.FROMDATE <= PH.TO_DATE AND C.CSTD = P.PARIK AND C.CSTD = T.TC_CSTD GROUP BY EK.SECIK,S.SECIK,EK.EQKEY1,EK.FROMDATE,S.SECSHORT,S.SECNAME,C.CDY,C.CSTD,P.PAR,P.PARIK,PH.ACCOUNTING_FRAMEWORK,NVL(PH.BAL_NOMINAL_NUMBER,0),PH.FROM_DATE,PH.POR,PH.SEC_SHORT_NAME,PH.TO_DATE,PH.CUSTODY_SHORT_NAME,T.TC_CSTD,T.TH_SEC_SHORT_NAME,PH.POR_REF,PORT.PORIK,PORT.PORGRPIK,PG.PORGRPIK,PG.PORGRPTYPEIK,PGT.PORGRPTYPEIK
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute      1      2.34       2.34          0          0          0           0
    Fetch        2     39.31     131.53      17885   17489238          0        2039
    total        4     41.66     133.88      17885   17489238          0        2039
    Misses in library cache during parse: 1
    Misses in library cache during execute: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 171  (SCDAT)
    Number of plan statistics captured: 1
    Rows (1st) Rows (avg) Rows (max)  Row Source Operation
          2039       2039       2039  HASH GROUP BY (cr=17489238 pr=17885 pw=0 time=131529969 us cost=2062 size=251 card=1)
        166827     166827     166827   NESTED LOOPS  (cr=17489238 pr=17885 pw=0 time=157379020 us cost=2061 size=251 card=1)
          2043       2043       2043    NESTED LOOPS  (cr=143626 pr=5419 pw=0 time=19393083 us cost=2003 size=215 card=1)
         11156      11156      11156     HASH JOIN  (cr=53391 pr=2600 pw=0 time=4865614 us cost=1559 size=1956 card=12)
         11156      11156      11156      NESTED LOOPS  (cr=53385 pr=2600 pw=0 time=4585085 us)
         11156      11156      11156       NESTED LOOPS  (cr=42229 pr=2600 pw=0 time=4563404 us cost=1555 size=2156 card=14)
         11156      11156      11156        NESTED LOOPS  (cr=32467 pr=2600 pw=0 time=4543117 us cost=1541 size=2058 card=14)
         11156      11156      11156         NESTED LOOPS  (cr=19234 pr=2600 pw=0 time=4506220 us cost=1527 size=1806 card=14)
         24211      24211      24211          NESTED LOOPS  (cr=19230 pr=2600 pw=0 time=4417211 us cost=1526 size=36504 card=312)
           193        193        193           NESTED LOOPS  (cr=6926 pr=2556 pw=0 time=4371848 us cost=1350 size=1500 card=15)
           193        193        193            NESTED LOOPS  (cr=6537 pr=2556 pw=0 time=4370289 us cost=1320 size=1245 card=15)
           193        193        193             NESTED LOOPS  (cr=6148 pr=2556 pw=0 time=4369122 us cost=1305 size=585 card=15)
             1          1          1              NESTED LOOPS  (cr=5 pr=1 pw=0 time=6568 us cost=2 size=23 card=1)
             1          1          1               TABLE ACCESS BY INDEX ROWID ACCDEF (cr=2 pr=1 pw=0 time=6556 us cost=1 size=12 card=1)
             1          1          1                INDEX UNIQUE SCAN ACCDEF_IX1 (cr=1 pr=1 pw=0 time=6551 us cost=0 size=0 card=1)(object id 103661)
             1          1          1               TABLE ACCESS BY INDEX ROWID PARTNERS (cr=3 pr=0 pw=0 time=10 us cost=1 size=11 card=1)
             1          1          1                INDEX UNIQUE SCAN PARTNERS_IX1 (cr=2 pr=0 pw=0 time=6 us cost=0 size=0 card=1)(object id 91563)
           193        193        193              TABLE ACCESS FULL EQUITYKEYS (cr=6143 pr=2555 pw=0 time=4362460 us cost=1303 size=240 card=15)
           193        193        193             TABLE ACCESS BY INDEX ROWID SECURITIES (cr=389 pr=0 pw=0 time=1000 us cost=1 size=44 card=1)
           193        193        193              INDEX UNIQUE SCAN P_SECURITIES (cr=196 pr=0 pw=0 time=498 us cost=0 size=0 card=1)(object id 93819)
           193        193        193            TABLE ACCESS BY INDEX ROWID SECURITIES (cr=389 pr=0 pw=0 time=1486 us cost=2 size=17 card=1)
           193        193        193             INDEX RANGE SCAN SECURITIES_IX2 (cr=197 pr=0 pw=0 time=899 us cost=1 size=0 card=1)(object id 93809)
         24211      24211      24211           TABLE ACCESS BY INDEX ROWID HOLKEYS (cr=12304 pr=44 pw=0 time=38145 us cost=13 size=340 card=20)
         24211      24211      24211            INDEX RANGE SCAN I_HOLKEYS_SECPOR (cr=475 pr=44 pw=0 time=13253 us cost=2 size=0 card=23)(object id 98864)
         11156      11156      11156          TABLE ACCESS BY INDEX ROWID CUSTODIES (cr=4 pr=0 pw=0 time=93056 us cost=1 size=12 card=1)
         48422      48422      48422           INDEX RANGE SCAN R_CUSTODIES_CSTD (cr=3 pr=0 pw=0 time=35831 us cost=0 size=0 card=3)(object id 101437)
         11156      11156      11156         TABLE ACCESS BY INDEX ROWID PORTFOLIOS (cr=13233 pr=0 pw=0 time=31391 us cost=1 size=18 card=1)
         11156      11156      11156          INDEX UNIQUE SCAN P_PORTFOLIOS (cr=2077 pr=0 pw=0 time=12494 us cost=0 size=0 card=1)(object id 91399)
         11156      11156      11156        INDEX UNIQUE SCAN P_PORTGROUPS (cr=9762 pr=0 pw=0 time=15817 us cost=0 size=0 card=1)(object id 95885)
         11156      11156      11156       TABLE ACCESS BY INDEX ROWID PORTGROUPS (cr=11156 pr=0 pw=0 time=15160 us cost=1 size=7 card=1)
             5          5          5      VIEW  index$_join$_005 (cr=6 pr=0 pw=0 time=656 us cost=3 size=45 card=5)
             5          5          5       HASH JOIN  (cr=6 pr=0 pw=0 time=648 us)
             5          5          5        INDEX FAST FULL SCAN PORTGROUPTYPES_IX1 (cr=3 pr=0 pw=0 time=26 us cost=1 size=45 card=5)(object id 95857)
             7          7          7        INDEX FAST FULL SCAN P_PORTGROUPTYPES (cr=3 pr=0 pw=0 time=15 us cost=1 size=45 card=5)(object id 95858)
          2043       2043       2043     TABLE ACCESS BY INDEX ROWID HOLDINGS (cr=90235 pr=2819 pw=0 time=19041512 us cost=38 size=52 card=1)
         92362      92362      92362      INDEX RANGE SCAN R_HOLDINGS_HOLKEYIK (cr=22368 pr=436 pw=0 time=2663719 us cost=2 size=0 card=42)(object id 2173885)
        166827     166827     166827    VIEW PUSHED PREDICATE  (cr=17345612 pr=12466 pw=0 time=107441684 us cost=58 size=36 card=1)
        166827     166827     166827     SORT GROUP BY (cr=17345612 pr=12466 pw=0 time=107408172 us cost=58 size=117 card=1)
       1911217    1911217    1911217      NESTED LOOPS  (cr=17345612 pr=12466 pw=0 time=1296620056 us)
      10575944   10575944   10575944       NESTED LOOPS  (cr=9800492 pr=1140 pw=0 time=22104782 us cost=57 size=117 card=1)
       2292837    2292837    2292837        NESTED LOOPS  (cr=5195338 pr=0 pw=0 time=9516177 us cost=19 size=65 card=1)
          4086       4086       4086         MERGE JOIN CARTESIAN (cr=4885 pr=0 pw=0 time=93451 us cost=6 size=52 card=1)
          4086       4086       4086          NESTED LOOPS  (cr=4103 pr=0 pw=0 time=29074 us cost=4 size=35 card=1)
          2043       2043       2043           NESTED LOOPS  (cr=4099 pr=0 pw=0 time=20146 us cost=3 size=23 card=1)
          2043       2043       2043            TABLE ACCESS BY INDEX ROWID PARTNERS (cr=2052 pr=0 pw=0 time=10371 us cost=2 size=11 card=1)
          2043       2043       2043             INDEX UNIQUE SCAN P_PARTNERS (cr=9 pr=0 pw=0 time=4583 us cost=1 size=0 card=1)(object id 91507)
          2043       2043       2043            TABLE ACCESS BY INDEX ROWID ACCDEF (cr=2047 pr=0 pw=0 time=7133 us cost=1 size=12 card=1)
          2043       2043       2043             INDEX UNIQUE SCAN ACCDEF_IX1 (cr=4 pr=0 pw=0 time=3680 us cost=0 size=0 card=1)(object id 103661)
          4086       4086       4086           TABLE ACCESS BY INDEX ROWID CUSTODIES (cr=4 pr=0 pw=0 time=10204 us cost=1 size=12 card=1)
          4086       4086       4086            INDEX RANGE SCAN R_CUSTODIES_CSTD (cr=3 pr=0 pw=0 time=6320 us cost=0 size=0 card=1)(object id 101437)
          4086       4086       4086          BUFFER SORT (cr=782 pr=0 pw=0 time=60735 us cost=5 size=17 card=1)
          4086       4086       4086           TABLE ACCESS BY INDEX ROWID SECURITIES (cr=782 pr=0 pw=0 time=27892 us cost=2 size=17 card=1)
          4086       4086       4086            INDEX RANGE SCAN SECURITIES_IX2 (cr=590 pr=0 pw=0 time=13746 us cost=1 size=0 card=1)(object id 93809)
       2292837    2292837    2292837         TABLE ACCESS BY INDEX ROWID HOLKEYS (cr=5190453 pr=0 pw=0 time=12329304 us cost=13 size=13 card=1)
      10116948   10116948   10116948          INDEX RANGE SCAN I_HOLKEYS_SECPOR (cr=41387 pr=0 pw=0 time=2136775 us cost=2 size=0 card=23)(object id 98864)
      10575944   10575944   10575944        INDEX RANGE SCAN R_HOLDINGS_HOLKEYIK (cr=4605154 pr=1140 pw=0 time=14152971 us cost=2 size=0 card=42)(object id 2173885)
       1911217    1911217    1911217       TABLE ACCESS BY INDEX ROWID HOLDINGS (cr=7545120 pr=11326 pw=0 time=78999228 us cost=38 size=52 card=1)
    Rows     Execution Plan
          0  SELECT STATEMENT   MODE: ALL_ROWS
       2039   HASH (GROUP BY)
    166827    NESTED LOOPS
       2043     NESTED LOOPS
      11156      HASH JOIN
      11156       VIEW OF 'index$_join$_005' (VIEW)
      11156        HASH JOIN
      11156         INDEX   MODE: ANALYZED (FAST FULL SCAN) OF
                        'PORTGROUPTYPES_IX1' (INDEX (UNIQUE))
      11156         INDEX   MODE: ANALYZED (FAST FULL SCAN) OF
                        'P_PORTGROUPTYPES' (INDEX (UNIQUE))
      24211       HASH JOIN
        193        VIEW OF 'index$_join$_004' (VIEW)
        193         HASH JOIN
        193          INDEX   MODE: ANALYZED (FAST FULL SCAN) OF
                         'P_PORTGROUPS' (INDEX (UNIQUE))
          1          INDEX   MODE: ANALYZED (FAST FULL SCAN) OF
                         'R_PORTGROUPS_PORGRPTYPEIK' (INDEX)
          1        HASH JOIN
          1         HASH JOIN
          1          TABLE ACCESS   MODE: ANALYZED (FULL) OF
                         'EQUITYKEYS' (TABLE)
          1          HASH JOIN
        193           TABLE ACCESS   MODE: ANALYZED (FULL) OF
                          'SECURITIES' (TABLE)
        193           HASH JOIN
        193            VIEW OF 'index$_join$_012' (VIEW)
        193             HASH JOIN
        193              INDEX   MODE: ANALYZED (FAST FULL SCAN) OF
                             'P_SECURITIES' (INDEX (UNIQUE))
      24211              INDEX   MODE: ANALYZED (FAST FULL SCAN) OF
                             'SECURITIES_IX2' (INDEX (UNIQUE))
      24211            NESTED LOOPS
      11156             NESTED LOOPS
      48422              NESTED LOOPS
      11156               NESTED LOOPS
      11156                TABLE ACCESS   MODE: ANALYZED (BY
                               INDEX ROWID) OF 'ACCDEF' (TABLE)
      11156                 INDEX   MODE: ANALYZED (UNIQUE SCAN)
                                OF 'ACCDEF_IX1' (INDEX (UNIQUE))
      11156                TABLE ACCESS   MODE: ANALYZED (BY
                               INDEX ROWID) OF 'PARTNERS' (TABLE)
          5                 INDEX   MODE: ANALYZED (UNIQUE SCAN)
                                OF 'PARTNERS_IX1' (INDEX (UNIQUE))
          5               TABLE ACCESS   MODE: ANALYZED (BY INDEX
                              ROWID) OF 'CUSTODIES' (TABLE)
          5                INDEX   MODE: ANALYZED (RANGE SCAN) OF
                               'R_CUSTODIES_CSTD' (INDEX)
          7              INDEX   MODE: ANALYZED (RANGE SCAN) OF
                             'R_HOLKEYS_CDYIK' (INDEX)
       2043             TABLE ACCESS   MODE: ANALYZED (BY INDEX
                            ROWID) OF 'HOLKEYS' (TABLE)
      92362         VIEW OF 'index$_join$_013' (VIEW)
    166827          HASH JOIN
    166827           INDEX   MODE: ANALYZED (FAST FULL SCAN) OF
                          'P_PORTFOLIOS' (INDEX (UNIQUE))
    1911217           INDEX   MODE: ANALYZED (FAST FULL SCAN) OF
                          'PORTFOLIOS_IX1' (INDEX (UNIQUE))
    10575944      TABLE ACCESS   MODE: ANALYZED (BY INDEX ROWID) OF
                     'HOLDINGS' (TABLE)
    2292837       INDEX   MODE: ANALYZED (RANGE SCAN) OF
                      'R_HOLDINGS_HOLKEYIK' (INDEX)
       4086     VIEW PUSHED PREDICATE
       4086      SORT (GROUP BY)
       2043       NESTED LOOPS
       2043        NESTED LOOPS
       2043         MERGE JOIN (CARTESIAN)
       2043          NESTED LOOPS
       2043           TABLE ACCESS   MODE: ANALYZED (BY INDEX ROWID)
                          OF 'PARTNERS' (TABLE)
       4086            INDEX   MODE: ANALYZED (UNIQUE SCAN) OF
                           'P_PARTNERS' (INDEX (UNIQUE))
       4086           TABLE ACCESS   MODE: ANALYZED (BY INDEX ROWID)
                          OF 'CUSTODIES' (TABLE)
       4086            INDEX   MODE: ANALYZED (RANGE SCAN) OF
                           'R_CUSTODIES_CSTD' (INDEX)
       4086          BUFFER (SORT)
       4086           TABLE ACCESS   MODE: ANALYZED (BY INDEX ROWID)
                          OF 'SECURITIES' (TABLE)
    2292837            INDEX   MODE: ANALYZED (RANGE SCAN) OF
                           'SECURITIES_IX2' (INDEX (UNIQUE))
    10116948         TABLE ACCESS   MODE: ANALYZED (BY INDEX ROWID) OF
                        'HOLKEYS' (TABLE)
    10575944          INDEX   MODE: ANALYZED (RANGE SCAN) OF
                         'I_HOLKEYS_SECPOR' (INDEX)
    1911217        VIEW PUSHED PREDICATE OF 'VW_GBC_22' (VIEW)
          0         SORT (GROUP BY)
          0          NESTED LOOPS
          0           TABLE ACCESS   MODE: ANALYZED (BY INDEX ROWID)
                          OF 'ACCDEF' (TABLE)
          0            INDEX   MODE: ANALYZED (UNIQUE SCAN) OF
                           'ACCDEF_IX1' (INDEX (UNIQUE))
          0           TABLE ACCESS   MODE: ANALYZED (BY INDEX ROWID)
                          OF 'HOLDINGS' (TABLE)
          0            INDEX   MODE: ANALYZED (RANGE SCAN) OF
                           'R_HOLDINGS_HOLKEYIK' (INDEX)
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      SQL*Net message to client                       2        0.00          0.00
      db file sequential read                     16176        0.17         90.98
      db file scattered read                        590        0.01          1.94
      Disk file operations I/O                       15        0.00          0.00
      SQL*Net message from client                     2        0.04          0.04
      SQL*Net more data to client                    33        0.00          0.00

    the plans show that your first query has to do much more work than the second query (250M vs. 17M consistent gets). The queries use different plans and the second plan seems to be the better choice - since the first query does not return any rows. The plans also tell us where the time is spent - and there are some nested loops with extreme execution counts and a lot of expansive index access operations (especially the skip scan on P_HOLDINGS), but I would prefer to use a a plan with rowsource statistics to find the errors in the optimizers cardinality estimations.

  • I cannot open this PDF file in Acrobat 8 Pro or in Acrobat Reader on Windows 7 64-bit

    I have a PDF file that I could open on my Windows XP 32-bit laptop in Acrobat 8 Pro or in Acrobat Reader.  I then upgraded to a Windows 7 64-bit laptop.  But now in Win7-64, I cannot open this same file using the same apps (Acrobat 8 Pro & Acrobat Reader XI). 
    When I try to open it in Acrobat 8, it does not load and instead a popup windows appears saying -
    Adobe Updater
    Some components needed to complete this operation are missing but information about them may be available on the Adobe website. Would you like to search the Adobe website for the missing components? 
    And I can choose either the OK or Quit buttons.  When I click OK, a web browser starts and goes to this website -
    http://www.adobe.com/special/adobe_update_manager/?type=Filter&name=FOPN_foweb&version=0.0 .0.0&lang=en_US&os=Windows&osver=6.1.7601&appid=acrobat8pro-en_US&cpu=intel
    This webpage says -
    Adobe Update Manager
    Adobe cannot locate the requested plugin. New plugins will be listed on this page. Currently there are no plugins.
    So now I am stuck, no direction to go.  I am left without any solution from Adobe for Acrobat on this file.
    When I try to open this PDF file in Reader, it does not load and instead a web browser is spawned loading the webpage -
    http://plugin.fileopen.com/Default.aspx?bhcp=1
    This is the FileOpen Plug-in for Adobe Acrobat/Reader, which prompts to -
    Please click OK to download the FileOpen Plug-in Installer for Adobe Acrobat/Reader 
    I click on OK, download and run the Installer file, accept the terms, and installed the FileOpen Client (x64) B928.  Upon completion, it prompts to Finish.  But it does not automatically bring Reader up or try to load the file.  So I try again to load the PDF file into Reader.  But once again, the file does not load and the web browser is spawned loading the same FileOpen Plug-in Installer link.  I click OK again, and start the same FileOpen Client process.  This time, it recognizes that I have FileOpen Client installed, and the window gives me two choices, Repair or Remove.  So since I apparently need this Plug-in, I choose Repair.  The process seems to complete the Repair.  But when I try to load the file, it still brings me back to the FileOpen Plug-in webpage.  So now I am stuck again, and left without any solution from Adobe for Reader on this file. 
    I tried Adobe support.  But apparently Adobe does not support past releases of their products (Acrobat 8), and also does not give free support for the current version of their free products (Reader XI). 
    Can this be fixed? 

    How is Acrobat 8 not fully Windows 7 compatible?  I see discussions on this Adobe Community saying how Acrobat 8 does work on Windows 7 and with 64-bit.  It appears that if Acrobat 8 is updated to the latest version, then this should fix AA8-Win7 issues.  And I am at the latest AA8 version, 8.3.1. 
    And how are Acrobat 8 and Reader XI are not compatible?  I have always had Acrobat and Reader installed on the same PC, without ever having any issues.  And Adobe allows the installation of one after the other.  So apparently Adobe allows them both to exist together.  If they are incompatible, then why would Adobe allow them to exist together? 
    Anyway, I did uninstall the FileOpen Plug-in and the Reader XI, then reinstalled the FileOpen Plug-in.  So now Reader is not installed and only Acrobat 8 is installed.  I then tried to load the PDF file, but I still get the Acrobat 8 error described above. 

  • So I have a file on my desktop and I cannot open it, move it to a folder, or delete it from my mac. I dont know what it has in it, and that makes me suspicious. What can I do to remove this unremovable file from my computer? Is it a virus?

    So I have a file on my desktop and I cannot open it, move it to a folder, or delete it from my mac. I dont know what it has in it, and that makes me suspicious. What can I do to remove this unremovable file from my computer? Is it a virus?

    First, I would recommend repairing the hard drive with Disk Utility.
    If that doesn't fix the problem, there's a very dangerous command you can execute in the Terminal.  This is very hazardous, because a simple typo can result in very drastic consequences.  I have seen people erase their entire hard drive by putting a space in the wrong place!  So, please follow the directions I'm going to give you very carefully!
    Open the Terminal, which is found in the Utilities folder in the Applications folder.  In the Terminal, enter the following:
    sudo rm -f
    Make sure to put a space after the "-f"!  Then, drag the troublesome file from the Finder and drop it on the Terminal window.  That should insert the path to the file in the command.  Then go back to the Terminal and press return.  You will be asked for your password, and when you type it, nothing will be shown as a security measure.  Press return again after entering your password.  The file should be deleted.

  • For the first time, I'm trying to use adobe premiere elements10 that came with my pc Windows 8. I created a single project, saved it but cannot open it. My pc shows the file I created but I get an error message that says this type file is not supported or

    For the first time, I'm trying to use adobe premiere elements 10 that came with my pc Windows 8. I created a single project, saved it but cannot open it. My pc shows the file I created but I get an error message that says this type file is not supported or the codex is not installed. As a test, I created another very small project and get the same error message, when I try to open it. Pls give me a simple answer, a refund or a phone

    mike frischenmeyer
    What computer operating system is your Premiere Elements 10 running on? And, what video card/graphics card does that computer use?
    Is this the first time you are using Premiere Elements 10 or have you worked with it before successfully? There is no easy solution until we
    know the details and troubleshoot to determined what caused the problem.
    1. Can you open a new project?
    2. After you saved/closed the problem project, did you move, delete, or rename any of the files/folder that were related to the source media
    for that project?
    3. Please review the Adobe document on troubleshooting damaged projects.
    Troubleshoot damaged projects | Adobe Premiere Elements
    4. What are the steps that you are using to reopen this saved closed project.
    a. File Menu/Open Project/Name of Project
    b. Other
    Please review and consider and then we can decide what next based on your further details and results..
    Thank you.
    ATR

  • How to get the total execution time from a tkprof file

    Hi,
    I have a tkprof file. How can I get the total execution time. Going through the file i guess the sum of "Total Waited" would give the total time in the section "Elapsed times include waiting on following events:"
    . The sample of tkprof is given below.
    SQL ID: gg52tq1ajzy7t Plan Hash: 3406052038
    SELECT POSTED_FLAG
    FROM
    AP_INVOICE_PAYMENTS WHERE CHECK_ID = :B1 UNION ALL SELECT POSTED_FLAG FROM
      AP_PAYMENT_HISTORY APH, AP_SYSTEM_PARAMETERS ASP WHERE CHECK_ID = :B1 AND
      NVL(APH.ORG_ID, -99) = NVL(ASP.ORG_ID, -99) AND
      (NVL(ASP.WHEN_TO_ACCOUNT_PMT, 'ALWAYS') = 'ALWAYS' OR
      (NVL(ASP.WHEN_TO_ACCOUNT_PMT, 'ALWAYS') = 'CLEARING ONLY' AND
      APH.TRANSACTION_TYPE IN ('PAYMENT CLEARING', 'PAYMENT UNCLEARING')))
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.00       0.00          0          0          0           0
    Execute    442      0.08       0.13          0          0          0           0
    Fetch      963      0.22       4.72        350      16955          0         521
    total     1406      0.31       4.85        350      16955          0         521
    Misses in library cache during parse: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 173     (recursive depth: 1)
    Number of plan statistics captured: 1
    Rows (1st) Rows (avg) Rows (max)  Row Source Operation
             1          1          1  UNION-ALL  (cr=38 pr=3 pw=0 time=139 us)
             1          1          1   TABLE ACCESS BY INDEX ROWID AP_INVOICE_PAYMENTS_ALL (cr=5 pr=0 pw=0 time=124 us cost=6 size=12 card=1)
             1          1          1    INDEX RANGE SCAN AP_INVOICE_PAYMENTS_N2 (cr=4 pr=0 pw=0 time=92 us cost=3 size=0 card=70)(object id 27741)
             0          0          0   NESTED LOOPS  (cr=33 pr=3 pw=0 time=20897 us)
             0          0          0    NESTED LOOPS  (cr=33 pr=3 pw=0 time=20891 us cost=12 size=41 card=1)
             1          1          1     TABLE ACCESS FULL AP_SYSTEM_PARAMETERS_ALL (cr=30 pr=0 pw=0 time=313 us cost=9 size=11 card=1)
             0          0          0     INDEX RANGE SCAN AP_PAYMENT_HISTORY_N1 (cr=3 pr=3 pw=0 time=20568 us cost=2 size=0 card=1)(object id 27834)
             0          0          0    TABLE ACCESS BY INDEX ROWID AP_PAYMENT_HISTORY_ALL (cr=0 pr=0 pw=0 time=0 us cost=3 size=30 card=1)
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      db file sequential read                       350        0.15          4.33
      Disk file operations I/O                        3        0.00          0.00
      latch: shared pool                              1        0.17          0.17
    ********************************************************************************

    user13019948 wrote:
    Hi,
    I have a tkprof file. How can I get the total execution time.
    call count cpu elapsed disk query current rows
    total 1406 0.31 4.85 350 16955 0 521TOTAL ELAPSED TIME is 4.85 seconds from line above

  • Any ideas how I can view this flv file?

    I have CS3 Flash using Flash Player 9 and Actions Script 3.  I am publishing a progressve loading swf, which has an absolute path to an flv of http://www.haleygroup.com/work_images/basics.flv.  The swf file is located here http://www.haleygroup.com/work_images/basics.swf, along withn the html, flv, and skin.  When I click the button (configured by an XML file) on my web site to view the file, I get a flickering box.  Other flvs in the XML file are configured the same way and work fine.  See this flickering box at http://www.haleygroup.com/, enter site and go to "et al" page, then click "Basics".  Any ideas how I can view this flv file?  Many, many thanks.

    I just changed the path to a relative path of just "basics.flv" and still have the problem.  See swf at http://www.haleygroup.com/work_images/basics.swf.  Thanks.

  • To view the flash technology content in this pdf file please install this version of flash player

    I am getting an error while opening a pdf file I am using Windows 7 with adobe 10.1.7 installed error message " to view the flash technology content in this pdf file please install this version of flash player"

    Both ActiveX and plugin?  What versions?

  • I want to read a file which is in a zip and this zip file is at ftp site

    i am facing this problem and try to find the solution from last month please help me
    i want to read a file which in ziped and this zip file is at ftp site. and i want to read this file without downloading this zip file to local machine. i have to read it from ftp location only

    You can open an URLConnection to a file on an FTP server (search this forum to find out how). You can get the InputStream from the URLConnection and feed it to ZipInputStream. That should do the job.

  • Please could you advise? ... After installing Itunes 11.3.1.2 on my Laptop and when reconnecting my iPad2 via USB, it is no longer visible under 'My Computer'. Any advice on resolving this issue would be most welcome. Thanks

    Please could you advise? ... After installing Itunes 11.3.1.2 on my Laptop and when reconnecting my iPad2 via USB, it is no longer visible under 'My Computer'. Any advice on resolving this issue would be most welcome. Thanks

    Any one or a combo may help
    Give your iPad a reset. Hold down the sleep and home  keys for about 20 seconds. When you see the silver apple, let go and let it reboot and try again.
    Try a different USB cord
    Try a different USB port
    Try rebooting your computer
    Try closing/opening iTunes.
    If you go through that and it doesn't work, try going into the control panel, add/remove programs. Uninstall iTunes, Apple Mobile Device Service, Apple Application Support. Then redownload and reinstall iTunes and try again

  • "This wav file could not be read"

    I have a DL project with 30 timelines. It has been playing and burning fine for the last 4 months--I've just been tweaking menus and replacing some of the assets with newer encodes.
    Yesterday when I attempted to preview I got the message "this wav file could not be read." There are 35 .wav files in the project. This morning I did a "save as" on the project and systematically removed the wav files from the timelines two at a time until I found what was causing the problem (naturally it was the very last one). This was not a wav file that had been replaced in recent months, it has been in the project from the beginning
    Then I opened the original project and deleted only that .wav file from the timeline and the project previewed fine. So I deleted the .wav file from the project and then imported the same .wav file again, placed it in the timeline and the project works fine.
    Can someone tell me what would cause this behavior? Is there some sort of corruption in the asset and I'm going to have the same problem again? Or is it more likely some corruption in the project, and if so what could it be or what should I do about it?

    I have just replaced all WAV files in the project with ac3 files("reaplace asset" command).
    Still, when building DVD, god damned Encore CS4 mumbles "this WAV file could not be read."
    WTF?
    I looked through several topics on the Adobe forums where people ask the same question. There is no one a single answer! So, I'm back to Sonic Scenarist!
    No time for "dancing with a tambourine," around a blunt Adobe.
    And by the way, when Encore telling "This wav file could not be read" -- WHY it's not telling me WHICH ONE file? Do I have to guess or ask a fortune-teller?

  • How to read the content of this excel file in LV

    Hi could you please let me know how can I read the content of this excel file using the Read From Speardsheet function. It contains text and numbers
    Thanks
    The excel file is attached
    Attachments:
    Datalogging.zip ‏307 KB

    Check attached VI.
    I am not allergic to Kudos, in fact I love Kudos.
     Make your LabVIEW experience more CONVENIENT.
    Attachments:
    ReadFromExcel.vi ‏27 KB

Maybe you are looking for

  • Change Reconciliation Account in Vendor

    Hi, Can I change the Reconciliation Account in Maintain Field Status Group: Account Management ? The user-end ask to change the account from 120501 to 213006 acc. Is´t wrong ? I´m change the Asset to Passive . Tks, Sandra Amadi

  • Update to 8.1 after using Windows Phone Recovery T...

    Hello This is Criss My Phone is Lumia 1020 and I had Denim 8.1 Update latest version on my phone. But While using It was freezing and crashing, Then I've used Windows Phone Recovery Tool and Now It works smooth and perfect but It has returned to Wind

  • 11.5.10.2  upgrade

    http://www.oracle.com/support/library/brochure/lifetime-support-applications.pdf The above link talks about support dates of E-Business 11.5.10.2 It says premier support ends in November 2010 and extended support ends in Nov 2013 Generally all of us

  • Need help placing PDF as a thumbnail in my e-mail

    Want image fully displayed as thumbnail or incon size but when the end users opens their e-mail if they want to cick the icon it will enlarge to full display of PDF

  • Mail will not send mail wirelessly: need to plug into ethernet port:

    Hi: This is weird. While my wife's ibook has a strong signal and can use Safari effortlessly, when she tries to send mail, Mail won't let her. In other words SMTP is the issue because she never has a problem receiving mail the POP server. Since we ha