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.
Similar Messages
-
I need a help in reading video file of 80MB into ...
Hello,
I need a help in reading video file of 80MB into a vector storing ByteArrays in it.Please help me soon.
Thank YouHello,
I was able to solve my problem by thinking & my code goes as follows.I am trying to read a video file in my program.
public Vector getFileMediaContent(RandomAccessFile fileObj){
Runtime runtime = Runtime.getRuntime();
System.out.println ("Free memory : inside Boolean Type Panel" + runtime.freeMemory() );
dataContent.removeAllElements();
System.out.println("dataContent :"+dataContent.size());
try{
int size=(int)fileObj.length();
if(size<2000000){
byte[] data = new byte[size];
fileObj.read(data);
dataContent.addElement(data);
data=null;
System.gc();
else{
int fixedsize=2000000;
int startindex=0;
int read=0;
int remaining=0;
while(read!=-1){
byte[] data=new byte[fixedsize];
read=fileObj.read(data,0,data.length);
dataContent.addElement(data);
startindex=startindex+data.length;
remaining=size-startindex;
fileObj.seek(startindex);
data=null;
System.gc();
if(remaining>0 && remaining<2000000){
byte[] data1=new byte[remaining];
read=fileObj.read(data1,0,data1.length);
dataContent.addElement(data1);
data1=null;
System.gc();
System.out.println("outside while");
System.out.println("dataContent 1 :"+dataContent.size());
System.out.println ("Free memory : inside Boolean Type Panel" + runtime.freeMemory() );
fileObj = null;
System.gc();
}catch(Exception e){
e.printStackTrace();
return dataContent;
Now I am not facing the problem of IndexOut of Bounds Exception But I am getting Out of Memory Error.
Can You suggest me to come out of this,.
As I know I have two solutions.
1.Make the objects Null which is using more space & call System.gc();
2.Increase the Virtual Memory of my System.
Any solutions other than this?
And How to Increase the Virtual Memory?Please do reply.
ThankYou -
hi I was wondering if someone can help me do some read/write file with java. here is what I want to do:
Read a file and search the whole file for a word such as "throw" and print out the rest of that line to a new file. in the case of "throw", i want to link all thrown exceptions to the file that contained them.
can someone help me out and let me know what way I can approach in this?
any help would be greatly appreciated.
thanks!Rough and dirty, here's a class that will read a file and return a resultset:
import java.io.*;
import java.nio.*;
import java.nio.channels.FileChannel;
import java.util.*;
import java.text.DateFormat;
public class Utils{
File fileName;
FileOutputStream outputFile;
boolean closeChannel;
//Constructor
public Utils(String directory, String filename){
String strFileDir = directory;
String strFileName = filename;
File fileDir = new File(strFileDir);
fileName = new File(fileDir, strFileName);
// If directory does not exhist, create it.
if(!fileDir.isDirectory()){
if(fileDir.mkdirs()){
System.out.println(fileDir + " created.");
else{
System.out.println(fileDir + " could not be created.");
public ArrayList readText() throws IOException{
// Read content of file into a collection
ArrayList arrayList = new ArrayList();
try{
BufferedReader in = new BufferedReader(new FileReader(fileName));
String line;
while((line = in.readLine()) != null){
arrayList.add(line);
in.close();
catch (IOException ex){
throw ex;
return arrayList;
}And here's how you use the class:
// Create a new Disk Utilities object. This can be used for all subsequent read/writes to this file.
Utils utilTest = new Utils("e:/testing", "Testing.txt");
// Create a collection to hold the data from the file.
ArrayList arrayList = new ArrayList();
try{arrayList = utilTest.readText();}catch(IOException ex){ex.printStackTrace(System.err);} -
Hello, I'm trying to read this file, but I keep getting a java.nullpointerexception at the end of it:
Element: PART
Content: (HEADER,CHAPTER+)
Element: p
Content: (#PCDATA)
Element: INTRODUCTION
Content: (HEADER,p+)+
Element: CHAPTER_NUMBER
Content: (#PCDATA)
Element: HEADER
Content: (#PCDATA)
Element: BOOK
Content: (OPENER,SUBTITLE?,INTRODUCTION?,(SECTION|PART)+)
Element: SECTION
Content: (HEADER,p+)
Element: CHAPTER
Content: (CHAPTER_NUMBER,CHAPTER_TEXT)
Element: OPENER
Content: (TITLE_TEXT)*
Element: CHAPTER_TEXT
Content: (p)+
Element: SUBTITLE
Content: (#PCDATA)
Element: TITLE_TEXT
Content: (#PCDATA)
here is my code:
s = br.readLine();
while (s != null){
node[i] = new Node();
if (s.startsWith("Element: ")){
node.element = s.substring(s.indexOf(":") + 2);
System.out.println("Element[" + i + "]: " + node[i].element);
else if (s.startsWith(" Content: ")){
node[i].content = s.substring(s.indexOf(":") + 2);
System.out.println("Content[" + i + "]: " + node[i].content);
s = br.readLine();
if (s.startsWith("Element: ")) i++; //line 194 causes error
br.close();
here is my output
Element[0]: PART
Content[0]: (HEADER,CHAPTER+)
Element[1]: p
Content[1]: (#PCDATA)
Element[2]: INTRODUCTION
Content[2]: (HEADER,p+)+
Element[3]: CHAPTER_NUMBER
Content[3]: (#PCDATA)
Element[4]: HEADER
Content[4]: (#PCDATA)
Element[5]: BOOK
Content[5]: (OPENER,SUBTITLE?,INTRODUCTION?,(SECTION|PART)+)
Element[6]: SECTION
Content[6]: (HEADER,p+)
Element[7]: CHAPTER
Content[7]: (CHAPTER_NUMBER,CHAPTER_TEXT)
Element[8]: OPENER
Content[8]: (TITLE_TEXT)*
Element[9]: CHAPTER_TEXT
Content[9]: (p)+
Element[10]: SUBTITLE
Content[10]: (#PCDATA)
Element[11]: TITLE_TEXT
Content[11]: (#PCDATA)
java.lang.NullPointerException
at Test.readDTDObjectFile(Test.java:194)
at Test.<init>(Test.java:143)
at Test.main(Test.java:338)
can anybody help me figure out how to fix this? thanks so much!nevermind, i figured it out. thanks anyway!
-
Please HELP me read this file....!
I am having trouble reading the file input.dat using this code that I wrote. It compiles without errors but I get an ArrayIndexOutOfBounds Exception when i run my program.
public void Read(String fileName) {
try {
String num;
String cells;
FileReader file = new FileReader(fileName);
BufferedReader in = new BufferedReader (file);
num = in.readLine();
number = Integer.valueOf(num).intValue();
co = new ClassObject[number];
pair = new PairObject[number * number];
System.out.println("There are " + number + " total classes");
int cno = 1;
int x =0;
int y =0;
while (in.readLine() != "*") {
for (int b=0; b<number; b++){
co[b] = new ClassObject();
co.className = in.readLine();
co[b].classNumber = cno;
while (in.readLine() != "$"){ //problem occurs here
co[b].classAttribute[x] = in.readLine();
x++;
while (in.readLine() != "#"){
co[b].classMethod[y] = in.readLine();
y++;
cno++;
} catch (IOException e) {
System.out.println("Warning: Cannot Read File");
System.exit(0);
}and here is my input file (input.dat): 5
class1
int someInt
$
getInt()
class2
String anyString
$
getString()
class3
int value
$
setValue()
class4
char someChar
$
getChar()
class5
float someFloat
$
getFloat()
* thanks so much for any help!Hi, I changed some part of my code but I am still having the same problem. Here is my new code, hopefully somebody can help me figure this out String line = in.readLine();
while (!"*".equals(line)) {
for (int b=0; b<number; b++){
co[b] = new ClassObject();
co.className = line;
co[b].classNumber = cno;
while (!"$".equals(line)){
co[b].classAttribute[x] = line;
x++;
while (!"#".equals(line)){
co[b].classMethod[y] = line;
y++;
cno++; -
Hi,
I have a piece of code:
import org.w3c.dom.Document;
import javax.xml.parsers.DocumentBuilder;
import org.apache.commons.httpclient.HttpMethod;
private Document xmlDoc;
private DocumentBuilder docBuilder;
private HttpMethod method;
xmlDoc = docBuilder.parse (method.getResponseBodyAsStream());When I execute the last line, I get a nullPointerException. I know that my method is instantiated.
System.out.println ("MyRssReader.readRSSFeed: method==null? " + (method==null) );gave:
MyRssReader.readRSSFeed: method==null? falseSo, the big question is, what is not instantiated? I know that X in
docBuilder.parse (X);can be a File, (abstract) InputSource, InputStream (as I am using), InputStream with URI, or URI. URI in both cases as String.
I can get the RSS feed as a String, but see no way to get that String parsed.
Abel
PS: I also tried
xmlDoc = docBuilder.parse (method.getURI().toString());and
xmlDoc = docBuilder.parse (method.getResponseBodyAsStream(), method.getURI().toString());EDIT:
Reading the parse method in DocumentBuilder I see it checks if the InputStream is null. When it is null, it raises a
new IllegalArgumentException("InputStream cannot be null");As I do not see that exception, the InputStream is instantiated.
Edited by: Abel on Jan 31, 2008 9:46 AM
Added part about DocumentBuilder.parse(InputStream is)The stack trace I got is:
Exception in thread "AWT-EventQueue-1" java.lang.NullPointerException
at foo.bar.rssreader.RssReader.readRSSFeed(RssReader.java:111)
at foo.bar.MyModel.createFeed(MyModel.java:106)
at foo.bar.MyModel.setLoggedIn(MyModel.java:89)
at foo.bar.window.LogInPanel.checkFieldsAndLogIn(LogInPanel.java:297)
at foo.bar.window.LogInPanel.actionPerformed(LogInPanel.java:211)
at javax.swing.AbstractButton.fireActionPerformed(Unknown Source)
at javax.swing.AbstractButton$Handler.actionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.fireActionPerformed(Unknown Source)
at javax.swing.DefaultButtonModel.setPressed(Unknown Source)
at javax.swing.plaf.basic.BasicButtonListener.mouseReleased(Unknown Source)
at java.awt.Component.processMouseEvent(Unknown Source)
at javax.swing.JComponent.processMouseEvent(Unknown Source)
at java.awt.Component.processEvent(Unknown Source)
at java.awt.Container.processEvent(Unknown Source)
at java.awt.Component.dispatchEventImpl(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.LightweightDispatcher.retargetMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.processMouseEvent(Unknown Source)
at java.awt.LightweightDispatcher.dispatchEvent(Unknown Source)
at java.awt.Container.dispatchEventImpl(Unknown Source)
at java.awt.Window.dispatchEventImpl(Unknown Source)
at java.awt.Component.dispatchEvent(Unknown Source)
at java.awt.EventQueue.dispatchEvent(Unknown Source)
at java.awt.EventDispatchThread.pumpOneEventForFilters(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForFilter(Unknown Source)
at java.awt.EventDispatchThread.pumpEventsForHierarchy(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.pumpEvents(Unknown Source)
at java.awt.EventDispatchThread.run(Unknown Source) -
Please Help on Reading Binary file
I'm trying to read a binary file and find a string like "DE F0 CA 01"
i'm new for java and looked in the forum for solution without success
please help
best regards
gebinow i can read the binary file, my problem is now to find the position of byte sequence in the file
here is my code, may be it helps
import java.io.*;
public class ReadBinary
public static void main(String f[])
FileInputStream fis;
DataInputStream dis;
String value;
char charIn;
try
fis = new FileInputStream(f[0]);
dis = new DataInputStream(fis);
System.out.println("file " + f[0]);
while (dis.available() > 0)
value = Integer.toHexString(dis.read());
catch (EOFException eof)
System.out.println("EOF reached");
catch (IOException ioe)
System.out.println("IO Error " + ioe);
}best regards
gebi -
Help required in reading a file from Shared location on Network
Hi,
I need help in reading a file from a shared location. Can you kindly tell me the pattern for inputting the shared location path. I am using fileUtilService>Exists
"\\Shiva\test\shared\eForms\temp.xlsx" is the actual location of the file. How should i input the location in the INPUT variable of EXISTS.readResource content operation will fetch documents from Adobe Repository. Unless you checkin the required file into repository, the above error will remain.
From a shared folder, you should able to read the files using readDocument (using FileUtils) without any issues. Perhaps, the access rights prevent the execution.
If you are running JBoss as a windows service (turnkey will create a windows service for the JBoss instance), try the following:
Run -> services.msc -> Right click on JBoss service for Adobe LiveCycle -> Properties
Check the value given under logon tab. The User Account mentioned there should have appropriate access to the shared folder you are attempting read.
Nith -
Reading trace file on the fly.
I came across one cool trick mentioned by Tanel Poder, but it doesn't seem to work for me. Could anyone please help in reading trace file on the fly.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
SQL> !uname -a
Linux abc 2.6.16.60-0.34-smp #1 SMP Fri Jan 16 14:59:01 UTC 2009 x86_64 x86_64 x86_64 GNU/Linux
SQL> select value ||'/'||(select instance_name from v$instance) ||'_ora_'||
2 (select spid||case when traceid is not null then '_'||traceid else null end
from v$process where addr = (select paddr from v$session
3 4 where sid = (select sid from v$mystat
5 where rownum = 1
6 )
7 )
8 ) || '.trc' tracefile
9 from v$parameter where name = 'user_dump_dest'
10 /
TRACEFILE
/n01/oraadmin1/diag/rdbms/abc/inst1/trace/inst11_ora_28754.trc
SQL> host mknod /n01/oraadmin1/diag/rdbms/abc/inst1/trace/inst11_ora_28754.trc p
SQL> set define off
SQL> host grep "WAIT" /n01/oraadmin1/diag/rdbms/abc/inst1/trace/inst11_ora_28754.trc &
SQL> set define on
SQL> alter session set events '10046 trace name context forever, level 8';
Session altered.
SQL> select * from dual;
D
X
SQL>
SQL> select * from dual;
D
X
{code}
I dont get any WAIT printed into the pipe file created before tracing.
Am i doing something wrong here ?
Edited by: Yasu on Nov 12, 2012 10:14 AMI tried manual method and yes i am able to find WAIT lines in trace file.
Connected to:
Oracle Database 11g Enterprise Edition Release 11.1.0.7.0 - 64bit Production
With the Partitioning, Real Application Clusters, OLAP, Data Mining
and Real Application Testing options
SQL> select value ||'/'||(select instance_name from v$instance) ||'_ora_'||
(select spid||case when traceid is not null then '_'||traceid else null end
2 3 from v$process where addr = (select paddr from v$session
4 where sid = (select sid from v$mystat
5 where rownum = 1
6 )
7 )
8 ) || '.trc' tracefile
9 from v$parameter where name = 'user_dump_dest'
10 /
TRACEFILE
/n01/oraadmin1/diag/rdbms/proddba/proddba1/trace/proddba1_ora_23021.trc
SQL> alter session set events '10046 trace name context forever, level 8';
Session altered.
SQL> select * from dual;
D
X
SQL> alter session set events '10046 trace name context off';
Session altered.
SQL> !ls -lrt /n01/oraadmin1/diag/rdbms/proddba/proddba1/trace/proddba1_ora_23021.trc
-rw-r----- 1 oracle oinstall 2738 2012-11-12 01:13 /n01/oraadmin1/diag/rdbms/proddba/proddba1/trace/proddba1_ora_23021.trc
SQL> !grep "WAIT" /n01/oraadmin1/diag/rdbms/proddba/proddba1/trace/proddba1_ora_23021.trc
WAIT #1: nam='SQL*Net message to client' ela= 6 driver id=1650815232 #bytes=1 p3=0 obj#=-1 tim=1352704368368424
WAIT #1: nam='SQL*Net message from client' ela= 4057810 driver id=1650815232 #bytes=1 p3=0 obj#=-1 tim=1352704372428142
WAIT #1: nam='SQL*Net message to client' ela= 6 driver id=1650815232 #bytes=1 p3=0 obj#=-1 tim=1352704372428492
WAIT #1: nam='SQL*Net message from client' ela= 195 driver id=1650815232 #bytes=1 p3=0 obj#=-1 tim=1352704372428892
WAIT #1: nam='SQL*Net message to client' ela= 3 driver id=1650815232 #bytes=1 p3=0 obj#=-1 tim=1352704372428939
WAIT #1: nam='SQL*Net message from client' ela= 46319788 driver id=1650815232 #bytes=1 p3=0 obj#=-1 tim=1352704418748740Not sure why using mknod fails in my case.
Edited by: Yasu on Nov 12, 2012 12:48 PM -
Hi
I need some help in reading binary files. This is the code I have so far.
import java.io.InputStream;
import java.io.FileInputStream;
import java.io.IOException;
public class patternmatch {
public static void main (String[] args) {
final byte[] bytes = new byte[1];
try {
final InputStream instream = new FileInputStream (args[0]);
while (true) {
final int count = instream.read (bytes);
if (count==-1) break;
System.out.println(bytes);
instream.close();
} catch (IOException e) {
System.err.println(e);
}Instead of a list of hexadecimal numbers that I want I get a long line of
[B@eee36c
[B@eee36c
[B@eee36c
[B@eee36c
Which represents some address I think.
Does anyone know how to extract the hexidecimal numbers?
Thanks
Charlesdouble post http://forum.java.sun.com/thread.jsp?forum=31&thread=558802
-
How can you read datalog files in LabVIEW?
I have a VI that records time and waveform data and writes them as a cluster to a datalog file. I have been unable to read these files in any way, however. I have been working with the datalog examples in LabVIEW, but I have not been able to figure out how to use the Read Datalog File example effectively. Does anyone have any suggestions on how I can either use this example to read waveforms, or how I can design a VI to read datalog files in another way? Thanks.
Hi,
when you read from a datalog file you have to wire to the datalog type input of the Open File function a cluster of the same type as the clusters when you created the file; each cluster is a record.
In the example Write Datalog File Example.vi you see that each record consists of a cluster containing a string and 1D array of DBL; in the Read Datalog File Example.vi a cluster of exactly the same type is wired to the datalog type inputs.
You can use this example to read your datalog files but you must wire to the datalog type input a cluster containing the time data and a waveform data; pratically you have to tell how the data are saved in your file.
I hope I have been clear enough, eventually if you tell me how you save the time data (string, numeric) I
can modify the example to read your datalog files.
Good luck,
Alberto -
Hi,
We want to read a excel file. For that we are using file upload UI element and HSSF POI to read excel file. The code to read the excel file is working fine in standalone. In standalone we are hardcoding the file path. But in WD application, we are not hard coding it.
We are using following code to supply the file name to HSSF code through file upload UI:
try
InputStream in = new FileInputStream(wdContext.currentContextElement
().getFileResource());
wdComponentAPI.getMessageManager().reportSuccess("IN "+in);
HSSFWorkbook wb = new HSSFWorkbook(in);
catch (Exception e)
wdComponentAPI.getMessageManager().reportSuccess("ERROR in HSSF");
Where FileResource is a context variable binded with property "data" of FileUpload UI element.
Now, the problem is that the excel file is not getting read. We are getting ERROR in HSSF message.
Please help in reading the file path.
Regards,
VaibhavHi,
Try this:
InputStream in = wdContext.currentContextElement().getFileResource().read(false);
Regards,
Satyajit. -
The program doest enterpret my figures from the text file in the correct way since the numbers contain dots instead of commas. Is there a way to fix this in labVIEW, or do I have to change the files before reading them in the program? Thanks beforehend!
You must go in the labview option menu, you can select 'use the local
separator' in the front side submenu (LV6i).
If you use the "From Exponential/Fract/Eng" vi, you are able to select this
opton (with a boolean) without changing the labview parameters.
(sorry for my english)
Lange Jerome
FRANCE
"Nina" a ecrit dans le message news:
[email protected]..
> I would like to read a text file in which the decimal numbers are
> using dots instead of commas. Is there a way of converting this in
> labVIEW, or how can I get the program to enterpret the figures in the
> correct way?
>
> The program doest enterpret my figures from the text file in the
> correct way since the numbers contain dots instea
d of commas. Is there
> a way to fix this in labVIEW, or do I have to change the files before
> reading them in the program? Thanks beforehend! -
Everytime Adobe Reader 9 is extracting installation files, about half way, Windows XP SP3 reboots. Therefore, I am unable to install the Adobe Reader on my computer. I would appreciate any help you can provide.
Thanks for the replies. I have followed most of the suggestions given in "Test Screen Name" response. Unfortunately, I have not been able to correctly identify and eliminate rootkit infections (viruses), if any. Furthermore, even when I try to install Adobe Reader X, the system freezes when about 53% of the installation is complete. I am still trying to figure this problem out.
Good news!
I just installed Adobe Reader 11 and it worked beautifully!
Thanks again for your suggestions. -
The correct ways to create a helper functions in C++
Hi there
I have many functions which I use in my projects from different classes.
Which is the most correct ways to create a helper functions.
Thanks1) Split your project into different versatile sub-modules each handle by an object. The module should be reusable later on.
2) Each module or class should be declared on separate .hpp and .cpp files. ( for reusability and portability )
3)Make each module as much self contained as possible(independent) . That way you can reduce unnecessary linking with other files and reduce dependency on helper files. Compiling and working on only one module at a time will be easier and faster.
4)When your code is better organize , coding will more systematic, less error prone, easy debugging and more fun in programming.
For example in my project I create classes like
i) CDatabaseManager - to take care of SQL database
ii)CPlaylistManager - to deal with complex playlist
iii)CGraphicManager - to deal with graphic overlay over video
and so on.
Thanks. I would like to know how organize it ? Is it right to write helper function in namespace or class ? And is it right to make
static functions ?
Maybe you are looking for
-
Set Customerwise Debtor accounts in Accounts Receivable
Hi All, I need to set customerwise debtor accounts when a transaction is created in accounts receivables. That is when I enter a transaction for customer A, then account debited must be customer A debtor account. Can I do this in oracle ebusiness sui
-
Passing array of parameters to constructor
I'm writing a script which facilitates interaction between javascript and an already existing flash library. One of the things I need to do is create an instance of class x, where class x can be one of a large number of classes. The constructors for
-
I was looking at the sample video rental application that comes with JDeveloper 2.0 and I had a question about the OAS part: each transaction starts a thread that handles the session's expiration but as far as I know, the JWeb cartridge doesn't let t
-
JProgressBar and file transfer
Hi, I am trying to use a JProgressBar to determine how many bytes have been sent so far. I have constructed the JProgressBar with the maximum size of the file size. For each 'segment' of the file sent, the progress bar should increment using the setP
-
Need some help with wine + midi
Howdi guys! I need some help. I'd like to run an application which is only available for Windows and OSX, so my choice is wine. This application needs to send midi signals to the hardware it is supposed to control. In the product's forum there is a t