Help in understanding TKPROF output

Hi All,
Following is the TKPROF output of a user_dump_dest trace file, obtained by setting trace to 10046@level 12.
select "CHNNL"."CHNNL_BK" "C0", case "GEOG12"."SUB_STATE_PRVNC_CD" when
*:"SYS_B_000" then :"SYS_B_001" when :"SYS_B_002" then :"SYS_B_003" when*
*:"SYS_B_004" then :"SYS_B_005" when :"SYS_B_006" then :"SYS_B_007" when*
*:"SYS_B_008" then :"SYS_B_009" when :"SYS_B_010" then :"SYS_B_011" when*
*:"SYS_B_012" then :"SYS_B_013" else "GEOG12"."SUB_STATE_PRVNC_NAME_TXT" end*
*"C1", "TIME_PERIOD13"."MONTH_CD" "C2", lpad(to_char(EXTRACT( MONTH*
FROM
*(TIMESTAMP :"SYS_B_014") )), :"SYS_B_015", :"SYS_B_016") "C3", sum(case*
when "TIME_PERIOD13"."DAY_CLNDR_DATE"=TIMESTAMP :"SYS_B_017" then
*"SALES_FACT"."EXTND_NET_SALE_AMNT" else :"SYS_B_018" end ) over (partition*
by "CHNNL"."CHNNL_BK", case "GEOG12"."SUB_STATE_PRVNC_CD" when :"SYS_B_019"
then :"SYS_B_020" when :"SYS_B_021" then :"SYS_B_022" when :"SYS_B_023"
then :"SYS_B_024" when :"SYS_B_025" then :"SYS_B_026" when :"SYS_B_027"
then :"SYS_B_028" when :"SYS_B_029" then :"SYS_B_030" when :"SYS_B_031"
then :"SYS_B_032" else "GEOG12"."SUB_STATE_PRVNC_NAME_TXT" end ,
*"TIME_PERIOD13"."MONTH_CD") "C4", sum(case when*
*"TIME_PERIOD13"."DAY_CLNDR_DATE" between (TIMESTAMP :"SYS_B_033" -*
NUMTODSINTERVAL( EXTRACT( DAY FROM TIMESTAMP :"SYS_B_034" ), :"SYS_B_035" )
+ INTERVAL :"SYS_B_036" DAY) and TIMESTAMP :"SYS_B_037" then
*"SALES_FACT"."EXTND_NET_SALE_AMNT" else :"SYS_B_038" end ) over (partition*
by "CHNNL"."CHNNL_BK", case "GEOG12"."SUB_STATE_PRVNC_CD" when :"SYS_B_039"
then :"SYS_B_040" when :"SYS_B_041" then :"SYS_B_042" when :"SYS_B_043"
then :"SYS_B_044" when :"SYS_B_045" then :"SYS_B_046" when :"SYS_B_047"
then :"SYS_B_048" when :"SYS_B_049" then :"SYS_B_050" when :"SYS_B_051"
then :"SYS_B_052" else "GEOG12"."SUB_STATE_PRVNC_NAME_TXT" end ,
*"TIME_PERIOD13"."MONTH_CD") "C5", sum(case when*
*"TIME_PERIOD13"."DAY_CLNDR_DATE"=TIMESTAMP :"SYS_B_053" then*
*"SALES_FACT"."QTY_SOLD_IN_CASES" else :"SYS_B_054" end ) over (partition by*
*"CHNNL"."CHNNL_BK", case "GEOG12"."SUB_STATE_PRVNC_CD" when :"SYS_B_055"*
then :"SYS_B_056" when :"SYS_B_057" then :"SYS_B_058" when :"SYS_B_059"
then :"SYS_B_060" when :"SYS_B_061" then :"SYS_B_062" when :"SYS_B_063"
then :"SYS_B_064" when :"SYS_B_065" then :"SYS_B_066" when :"SYS_B_067"
then :"SYS_B_068" else "GEOG12"."SUB_STATE_PRVNC_NAME_TXT" end ,
*"TIME_PERIOD13"."MONTH_CD") "C6", sum(case when*
*"TIME_PERIOD13"."DAY_CLNDR_DATE" between (TIMESTAMP :"SYS_B_069" -*
NUMTODSINTERVAL( EXTRACT( DAY FROM TIMESTAMP :"SYS_B_070" ), :"SYS_B_071" )
+ INTERVAL :"SYS_B_072" DAY) and TIMESTAMP :"SYS_B_073" then
*"SALES_FACT"."QTY_SOLD_IN_CASES" else :"SYS_B_074" end ) over (partition by*
*"CHNNL"."CHNNL_BK", case "GEOG12"."SUB_STATE_PRVNC_CD" when :"SYS_B_075"*
then :"SYS_B_076" when :"SYS_B_077" then :"SYS_B_078" when :"SYS_B_079"
then :"SYS_B_080" when :"SYS_B_081" then :"SYS_B_082" when :"SYS_B_083"
then :"SYS_B_084" when :"SYS_B_085" then :"SYS_B_086" when :"SYS_B_087"
then :"SYS_B_088" else "GEOG12"."SUB_STATE_PRVNC_NAME_TXT" end ,
*"TIME_PERIOD13"."MONTH_CD") "C7", sum(case when*
*"TIME_PERIOD13"."DAY_CLNDR_DATE"=TIMESTAMP :"SYS_B_089" then*
*"SALES_FACT"."QTY_SOLD_IN_KLGMS" else :"SYS_B_090" end ) over (partition by*
*"CHNNL"."CHNNL_BK", case "GEOG12"."SUB_STATE_PRVNC_CD" when :"SYS_B_091"*
then :"SYS_B_092" when :"SYS_B_093" then :"SYS_B_094" when :"SYS_B_095"
then :"SYS_B_096" when :"SYS_B_097" then :"SYS_B_098" when :"SYS_B_099"
then :"SYS_B_100" when :"SYS_B_101" then :"SYS_B_102" when :"SYS_B_103"
then :"SYS_B_104" else "GEOG12"."SUB_STATE_PRVNC_NAME_TXT" end ,
*"TIME_PERIOD13"."MONTH_CD") "C8", sum(case when*
*"TIME_PERIOD13"."DAY_CLNDR_DATE" between (TIMESTAMP :"SYS_B_105" -*
NUMTODSINTERVAL( EXTRACT( DAY FROM TIMESTAMP :"SYS_B_106" ), :"SYS_B_107" )
+ INTERVAL :"SYS_B_108" DAY) and TIMESTAMP :"SYS_B_109" then
*"SALES_FACT"."QTY_SOLD_IN_KLGMS" else :"SYS_B_110" end ) over (partition by*
*"CHNNL"."CHNNL_BK", case "GEOG12"."SUB_STATE_PRVNC_CD" when :"SYS_B_111"*
then :"SYS_B_112" when :"SYS_B_113" then :"SYS_B_114" when :"SYS_B_115"
then :"SYS_B_116" when :"SYS_B_117" then :"SYS_B_118" when :"SYS_B_119"
then :"SYS_B_120" when :"SYS_B_121" then :"SYS_B_122" when :"SYS_B_123"
then :"SYS_B_124" else "GEOG12"."SUB_STATE_PRVNC_NAME_TXT" end ,
*"TIME_PERIOD13"."MONTH_CD") "C9", sum("SALES_FACT"."EXTND_GROSS_SALE_AMNT")*
over (partition by "CHNNL"."CHNNL_BK", case "GEOG12"."SUB_STATE_PRVNC_CD"
when :"SYS_B_125" then :"SYS_B_126" when :"SYS_B_127" then :"SYS_B_128"
when :"SYS_B_129" then :"SYS_B_130" when :"SYS_B_131" then :"SYS_B_132"
when :"SYS_B_133" then :"SYS_B_134" when :"SYS_B_135" then :"SYS_B_136"
when :"SYS_B_137" then :"SYS_B_138" else
*"GEOG12"."SUB_STATE_PRVNC_NAME_TXT" end , "TIME_PERIOD13"."MONTH_CD") "C10",*
*((sum(case when ("TIME_PERIOD13"."DAY_CLNDR_DATE"=TIMESTAMP :"SYS_B_139")*
then "SALES_FACT"."EXTND_NET_SALE_AMNT" else :"SYS_B_140" end ) over
*(partition by "CHNNL"."CHNNL_BK", case "GEOG12"."SUB_STATE_PRVNC_CD" when*
*:"SYS_B_141" then :"SYS_B_142" when :"SYS_B_143" then :"SYS_B_144" when*
*:"SYS_B_145" then :"SYS_B_146" when :"SYS_B_147" then :"SYS_B_148" when*
*:"SYS_B_149" then :"SYS_B_150" when :"SYS_B_151" then :"SYS_B_152" when*
*:"SYS_B_153" then :"SYS_B_154" else "GEOG12"."SUB_STATE_PRVNC_NAME_TXT" end*
*, "TIME_PERIOD13"."MONTH_CD")+sum(case when*
*"TIME_PERIOD13"."DAY_CLNDR_DATE" between (TIMESTAMP :"SYS_B_155" -*
NUMTODSINTERVAL( EXTRACT( DAY FROM TIMESTAMP :"SYS_B_156" ), :"SYS_B_157" )
+ INTERVAL :"SYS_B_158" DAY) and TIMESTAMP :"SYS_B_159" then
*"SALES_FACT"."EXTND_NET_SALE_AMNT" else :"SYS_B_160" end ) over (partition*
by "CHNNL"."CHNNL_BK", case "GEOG12"."SUB_STATE_PRVNC_CD" when :"SYS_B_161"
then :"SYS_B_162" when :"SYS_B_163" then :"SYS_B_164" when :"SYS_B_165"
then :"SYS_B_166" when :"SYS_B_167" then :"SYS_B_168" when :"SYS_B_169"
then :"SYS_B_170" when :"SYS_B_171" then :"SYS_B_172" when :"SYS_B_173"
then :"SYS_B_174" else "GEOG12"."SUB_STATE_PRVNC_NAME_TXT" end ,
*"TIME_PERIOD13"."MONTH_CD"))+(sum(case when*
*("TIME_PERIOD13"."DAY_CLNDR_DATE"=TIMESTAMP :"SYS_B_175") then*
*"SALES_FACT"."QTY_SOLD_IN_CASES" else :"SYS_B_176" end ) over (partition by*
*"CHNNL"."CHNNL_BK", case "GEOG12"."SUB_STATE_PRVNC_CD" when :"SYS_B_177"*
then :"SYS_B_178" when :"SYS_B_179" then :"SYS_B_180" when :"SYS_B_181"
then :"SYS_B_182" when :"SYS_B_183" then :"SYS_B_184" when :"SYS_B_185"
then :"SYS_B_186" when :"SYS_B_187" then :"SYS_B_188" when :"SYS_B_189"
then :"SYS_B_190" else "GEOG12"."SUB_STATE_PRVNC_NAME_TXT" end ,
*"TIME_PERIOD13"."MONTH_CD")+sum(case when "TIME_PERIOD13"."DAY_CLNDR_DATE"*
between (TIMESTAMP :"SYS_B_191" - NUMTODSINTERVAL( EXTRACT( DAY FROM
TIMESTAMP :"SYS_B_192" ), :"SYS_B_193" ) + INTERVAL :"SYS_B_194" DAY) and
TIMESTAMP :"SYS_B_195" then "SALES_FACT"."QTY_SOLD_IN_CASES" else
*:"SYS_B_196" end ) over (partition by "CHNNL"."CHNNL_BK", case*
*"GEOG12"."SUB_STATE_PRVNC_CD" when :"SYS_B_197" then :"SYS_B_198" when*
*:"SYS_B_199" then :"SYS_B_200" when :"SYS_B_201" then :"SYS_B_202" when*
*:"SYS_B_203" then :"SYS_B_204" when :"SYS_B_205" then :"SYS_B_206" when*
*:"SYS_B_207" then :"SYS_B_208" when :"SYS_B_209" then :"SYS_B_210" else*
*"GEOG12"."SUB_STATE_PRVNC_NAME_TXT" end , "TIME_PERIOD13"."MONTH_CD")))*
+(sum(case  when ("TIME_PERIOD13"."DAY_CLNDR_DATE"=TIMESTAMP :"SYS_B_211")
then "SALES_FACT"."QTY_SOLD_IN_KLGMS" else :"SYS_B_212" end ) over
*(partition by "CHNNL"."CHNNL_BK", case "GEOG12"."SUB_STATE_PRVNC_CD" when*
*:"SYS_B_213" then :"SYS_B_214" when :"SYS_B_215" then :"SYS_B_216" when*
*:"SYS_B_217" then :"SYS_B_218" when :"SYS_B_219" then :"SYS_B_220" when*
*:"SYS_B_221" then :"SYS_B_222" when :"SYS_B_223" then :"SYS_B_224" when*
*:"SYS_B_225" then :"SYS_B_226" else "GEOG12"."SUB_STATE_PRVNC_NAME_TXT" end*
*, "TIME_PERIOD13"."MONTH_CD")+sum(case when*
*"TIME_PERIOD13"."DAY_CLNDR_DATE" between (TIMESTAMP :"SYS_B_227" -*
NUMTODSINTERVAL( EXTRACT( DAY FROM TIMESTAMP :"SYS_B_228" ), :"SYS_B_229" )
+ INTERVAL :"SYS_B_230" DAY) and TIMESTAMP :"SYS_B_231" then
*"SALES_FACT"."QTY_SOLD_IN_KLGMS" else :"SYS_B_232" end ) over (partition by*
*"CHNNL"."CHNNL_BK", case "GEOG12"."SUB_STATE_PRVNC_CD" when :"SYS_B_233"*
then :"SYS_B_234" when :"SYS_B_235" then :"SYS_B_236" when :"SYS_B_237"
then :"SYS_B_238" when :"SYS_B_239" then :"SYS_B_240" when :"SYS_B_241"
then :"SYS_B_242" when :"SYS_B_243" then :"SYS_B_244" when :"SYS_B_245"
then :"SYS_B_246" else "GEOG12"."SUB_STATE_PRVNC_NAME_TXT" end ,
*"TIME_PERIOD13"."MONTH_CD")) "C11" from "THA_SALES_DBA"."CHNNL" "CHNNL",*
*(select "GEOG"."GEOG_KEY" "GEOG_KEY", "GEOG"."SUB_STATE_PRVNC_CD"*
*"SUB_STATE_PRVNC_CD", "GEOG"."SUB_STATE_PRVNC_NAME_TXT"*
*"SUB_STATE_PRVNC_NAME_TXT" from "THA_SALES_DBA"."GEOG" "GEOG" where*
*"GEOG"."SUB_STATE_PRVNC_LOAD_DATA_TYPE"=:"SYS_B_247") "GEOG12",*
*"THA_SALES_DBA"."TIME_PERIOD" "TIME_PERIOD13", "THA_SALES_DBA"."SALES_FACT"*
*"SALES_FACT", (select "PROD"."PROD_KEY" "PROD_KEY", "PROD"."PROD_DVSN_CD"*
*"PROD_DVSN_CD", "PROD"."PCKG_SIZE_CD" "PCKG_SIZE_CD" from*
*"THA_SALES_DBA"."PROD" "PROD" where "PROD"."LOAD_DATA_TYPE_CD"=:"SYS_B_248")*
*"PROD14", "THA_SALES_DBA"."DSTRBTR" "DSTRBTR" where*
*"PROD14"."PROD_DVSN_CD"=:"SYS_B_249" and "PROD14"."PCKG_SIZE_CD"=*
*:"SYS_B_250" and "DSTRBTR"."DSTRBTR_CD"<>:"SYS_B_251" and CASE*
WHEN("DSTRBTR"."DSTRBTR_CD" IS NULL) OR ("CHNNL"."CHNNL_BK" IS NULL) THEN
NULL ELSE ("DSTRBTR"."DSTRBTR_CD"||"CHNNL"."CHNNL_BK") END<>:"SYS_B_252"
and "SALES_FACT"."CHNNL_KEY"="CHNNL"."CHNNL_KEY" and
*"SALES_FACT"."DSTRBTR_KEY"="DSTRBTR"."DSTRBTR_KEY" and*
*"SALES_FACT"."GEOG_KEY"="GEOG12"."GEOG_KEY" and "SALES_FACT"."PROD_KEY"=*
*"PROD14"."PROD_KEY" and "SALES_FACT"."TIME_PERIOD_KEY"=*
*"TIME_PERIOD13"."TIME_PERIOD_KEY"*
call     count       cpu    elapsed       disk      query    current        rows
Parse        1      0.01       0.00          0          0          0           0
Execute      1      0.01       0.01          0          0          0           0
Fetch     7632    129.92     245.70     406278      12619         35      763042
total     7634    129.95     245.73     406278      12619         35      763042
Misses in library cache during parse: 1
Optimizer mode: ALL_ROWS
Parsing user id: 68
Rows     Row Source Operation
*763042 WINDOW BUFFER (cr=12619 pr=406278 pw=257613 time=239232878 us)*
*763042 WINDOW BUFFER (cr=12619 pr=372409 pw=237458 time=217248824 us)*
*763042 WINDOW BUFFER (cr=12619 pr=339595 pw=217662 time=194593662 us)*
*763042 WINDOW BUFFER (cr=12619 pr=307255 pw=198149 time=177438908 us)*
*763042 WINDOW BUFFER (cr=12619 pr=275292 pw=178940 time=157976971 us)*
*763042 WINDOW BUFFER (cr=12619 pr=244097 pw=160017 time=139997871 us)*
*763042 WINDOW BUFFER (cr=12619 pr=213275 pw=141404 time=119675383 us)*
*763042 WINDOW BUFFER (cr=12619 pr=184170 pw=123525 time=105714100 us)*
*763042 WINDOW BUFFER (cr=12619 pr=155800 pw=105953 time=88478655 us)*
*763042 WINDOW BUFFER (cr=12619 pr=128025 pw=88650 time=71243641 us)*
*763042 WINDOW BUFFER (cr=12619 pr=100871 pw=71641 time=54047210 us)*
*763042 WINDOW BUFFER (cr=12619 pr=73821 pw=54957 time=35324144 us)*
*763042 WINDOW SORT (cr=12619 pr=48205 pw=38587 time=18865032 us)*
*763042 HASH JOIN (cr=12619 pr=0 pw=0 time=3127703 us)*
*15098 TABLE ACCESS FULL TIME_PERIOD (cr=693 pr=0 pw=0 time=15216 us)*
*763042 HASH JOIN (cr=11926 pr=0 pw=0 time=2344335 us)*
*1845 TABLE ACCESS FULL GEOG (cr=92 pr=0 pw=0 time=1910 us)*
*763194 HASH JOIN (cr=11834 pr=0 pw=0 time=1577327 us)*
*11 TABLE ACCESS FULL CHNNL (cr=7 pr=0 pw=0 time=47 us)*
*765432 HASH JOIN (cr=11827 pr=0 pw=0 time=1580849 us)*
*2 TABLE ACCESS FULL DSTRBTR (cr=7 pr=0 pw=0 time=50 us)*
*765432 HASH JOIN (cr=11820 pr=0 pw=0 time=814835 us)*
*313 TABLE ACCESS FULL PROD (cr=174 pr=0 pw=0 time=1195 us)*
*1045260 TABLE ACCESS FULL SALES_FACT (cr=11646 pr=0 pw=0 time=31 us)*
Elapsed times include waiting on following events:
Event waited on                             Times   Max. Wait  Total Waited
----------------------------------------   Waited  ----------  ------------
SQLNet message to client 7633 0.00 0.01*
SQLNet message from client 7633 1826.57 2334.17*
SQLNet more data from client 1 0.00 0.00*
direct path write temp                       5332        0.09          6.23
direct path read temp                      389239        0.09        115.09
The query is automatically generated by Cognos 8.2. The database is 64-bit Oracle 10.2.0.4 on Windows 2003 Enterprise Edition R2.
I am unable to understand the "*WINDOW BUFFER/WINDOW SORT*" statement under the Row Source Operation. Could one of you please explain this operation to me?
Thanks and Regards,
Sriraman

The WINDOW BUFFER/WINDOW SORT operations are used when processing analytical SQLs, you can see these in your SQL statement. In WINDOW BUFFER the SQL engine do calculations above some buffered data subset and in the WINDOW SORT data subsets are being sorted.
Dusan

Similar Messages

  • Can anyone help me understand this output from Console?

    My Macbook Pro freezes and I have to manually shut it down and restart it.  This is the error output from Console after I restart the Mac and find the time that the Mac froze.
    Here is the error code again, if it was too hard to read from the image above:

    Hi, did you find any answer to this? I have the same problem with globeinvestor.com gold tracker program. It stops to run from very beginning and give me a 23 code error.
    Their supprot can not fix this. Actually i have tried this in three different computers and all of them are same.

  • Help in TKPROF Output: Row Source Operation v.s Execution plan confusing

    Hello,
    Working with oracle 10g/widnows, and trying to understand from the TKPROF what is the purpose of the "Row Source operation" section.
    From the "Row Source Operation" section the PMS_ROOM table is showing 16 rows selected, and accessed by an ACCESS FULL, and the following script gives another value.
    select count(*) from pms_folio give the following.
    COUNT(*)
    148184
    But in the execution plan section, the PMS_FOLIO table is accessed by ROW ID after index scan in the JIE_BITMAP_CONVERSION index
    What really means Row Source operation compares to the execution plan and how both information should be read to fully know if the optimizer is not making wrong estimation?
    furthermore readding 13594 buffers to fetch 2 rows, show the SQL Script itself is not sufficient, but the elapsed time is roughly 0.7seconds,but shrinking the # of buffers to be read should probably shrink the response time.
    The following TKPROF output.
    Thanks very much for your help
    SELECT NVL(SUM(NVL(t1.TOTAL_GUESTS, 0)), 0)
    FROM DEV.PMS_FOLIO t1
    WHERE (t1.FOLIO_STATUS <> 'CANCEL'
    AND t1.ARRIVAL_DATE <= TO_DATE(:1, 'SYYYY/MMDDHH24MISS')
    AND t1.DEPARTURE_DATE > TO_DATE(:1, 'SYYYY/MMDDHH24MISS')
    AND t1.PRIMARY_OR_SHARE = 'P' AND t1.IS_HOUSE = 'N')
    call count cpu elapsed disk query current rows
    Parse 1 0.00 0.00 0 0 0 0
    Execute 2 0.00 0.00 0 0 0 0
    Fetch 2 0.12 0.12 0 13594 0 2
    total 5 0.12 0.12 0 13594 0 2
    Misses in library cache during parse: 0
    Optimizer mode: ALL_ROWS
    Parsing user id: 82 (PMS5000)
    Rows Row Source Operation
    2 SORT AGGREGATE (cr=13594 pr=0 pw=0 time=120165 us)
    16 TABLE ACCESS FULL PMS_FOLIO (cr=13594 pr=0 pw=0 time=121338 us)
    Rows Execution Plan
    0 SELECT STATEMENT MODE: ALL_ROWS
    2 SORT (AGGREGATE)
    16 TABLE ACCESS MODE: ANALYZED (BY INDEX ROWID) OF 'PMS_FOLIO'
    (TABLE)
    0 INDEX MODE: ANALYZED (RANGE SCAN) OF
    'JIE_BITMAP_CONVERSION' (INDEX)
    <Edited by: user552326 on 8-Apr-2009 12:49 PM
    Edited by: user552326 on 8-Apr-2009 12:52 PM
    Edited by: user552326 on 8-Apr-2009 12:53 PM                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

    Your query is using bind variables. Explain Plan doesn't work exactly the same way -- it can't handle bind variables.
    See http://www.oracle.com/technology/oramag/oracle/08-jan/o18asktom.html
    In your output, the row source operations listing is the real execution.
    The explain plan listing may well be misleading as Oracle uses cardinality estimates when trying to explain with bind variables.
    Also, it seems that your plan table may be a 9i version, not the 10g PLAN_TABLE created by catplan.sql There are additional columns in the 10g PLAN_TABLE that explain uses well.
    BTW, you start off with a mention of "PMS_ROOM" showing 16 rows, but it doesn't appear in the data you have presented.

  • Help understanding Analyzer output

    Can anyone help on understanding the db analyzer output attached ?
    The MaxCPUs message is clear I'd like to understand there are some issues that can be fixed.
    Thank you !!
    ===== #0          at 2009-03-20 11:53:42
    *  I  Database Analyzer configuration file dbanalyzer77.cfg, version 7.7.06 Build 009-123-202-944
    *  I  Number of logical CPUs: 8, physical CPUs: 2, processor type: x86_64
    *  I  Configuration: number of CPUs (MAXCPU): 6, max user tasks: 1020
    *  I  'MaxCPUs' (6) exceeds number of physical CPUs (2)!
    *  I  Physical memory 16088 MB, virtual memory 16386 MB, memory allocated from instance: 5292 MB
    *  I  Operating system: Linux 2.6.23.1-42.fc8 #1 SMP Tue Oct 30 13:18:33 EDT 2007
    *  I  Kernel version: Kernel    7.7.06   Build 009-123-202-944
    *  I  Instance ECF3 (fatboy) is up since  23:59:58
    *  I  Number of data volumes: 2
    *  I  SQL commands executed: 174857156
    * W1  Number of tables where update statistics is required: 1
    * W1  Owner: DBA, table: SYSUPGRADEHISTORY
    * W1  Lock list escalations: 12
    *  I  Size of data cache 4094.43 MB, used data size in instance 1364.88 MB
    * W3  Log automatic overwrite is set to 'on' !
    ===== #1          at 2009-03-20 11:54:42
    *  I  SQL commands executed: 2148, avg. 39.31 per second
    *  I  Active User tasks found in state 'Enter ExclLock': 2
    *  I  Active User tasks found in state 'Running': 2
    *  I  Active User tasks found in state 'Connect close': 1
    *  I  Runnable User tasks found in state 'Enter ExclLock': 2
    *  I  UKT11: commands: 25316973, dispatches: 109499812, user task 785 is running, 1 tasks are waiting for CPU
    *  I  UKT10: commands: 18359305, dispatches: 107190388, user task 617 is running, 1 tasks are waiting for CPU
    *  I  UKT10: user task 620 is waiting for CPU in state 'Enter ExclLock'
    *  I  UKT11: user task 788 is waiting for CPU in state 'Enter ExclLock'
    * W2  74 primary key range accesses, selectivity 0.33%: 31873 rows read, 106 rows qualified
    *  I  CPU utilization: instance ECF3: 101.64% (usr: 101.64%, sys: 0%) host: 104.92% (usr: 103.28%, sys: 1.64%, idle: 691.8%)
    ===== #2          at 2009-03-20 11:55:43
    *  I  SQL commands executed: 2527, avg. 46.28 per second
    *  I  Active User tasks found in state 'Running': 1
    *  I  Active User tasks found in state 'Connect close': 2
    *  I  Active User tasks found in state 'ExclLock Yield': 1
    *  I  Runnable User tasks found in state 'ExclLock Yield': 1
    *  I  UKT11: commands: 25318126, dispatches: 109644955, user task 784 is running, 1 tasks are waiting for CPU
    *  I  UKT11: user task 790 is waiting for CPU in state 'ExclLock Yield'
    * W3  27 primary key range accesses, selectivity 0.17%: 16227 rows read, 27 rows qualified
    *  I  DATA50: collision rate 3.29%, 436543 collisions, 1 waits (0%), 13256056 accesses on region 54
    * W3  User task 1130 blocked in state 'Connect close' since 60s, application pid 1510
    *  I  CPU utilization: instance ECF3: 113.33% (usr: 113.33%, sys: 0%) host: 115% (usr: 115%, sys: 0%, idle: 691.67%)
    ===== #3          at 2009-03-20 11:56:43
    *  I  SQL commands executed: 1379, avg. 26.7 per second
    * W3  20 primary key range accesses, selectivity 0.20%: 10148 rows read, 20 rows qualified
    *  I  CPU utilization: instance ECF3: 47.54% (usr: 47.54%, sys: 0%) host: 50.82% (usr: 49.18%, sys: 1.64%, idle: 742.62%)
    ===== #4          at 2009-03-20 11:57:44
    *  I  SQL commands executed: 6910, avg. 119.33 per second
    *  I  Active User tasks found in state 'Connect close': 1
    * W2  240 table scans, selectivity 0.64%: 196678 rows read, 1267 rows qualified
    * W3  57 primary key range accesses, selectivity 0.28%: 26740 rows read, 76 rows qualified
    * W2  330 index accesses, selectivity 1.54%: 36056 rows read, 557 rows qualified
    *  I  CPU utilization: instance ECF3: 45% (usr: 45%, sys: 0%) host: 46.67% (usr: 46.67%, sys: 0%, idle: 760%)
    ===== #5          at 2009-03-20 11:58:44
    *  I  SQL commands executed: 1522, avg. 29.05 per second
    *  I  Active User tasks found in state 'Running': 1
    * W3  56 primary key range accesses, selectivity 0.20%: 27880 rows read, 56 rows qualified
    *  I  CPU utilization: instance ECF3: 73.77% (usr: 73.77%, sys: 0%) host: 78.69% (usr: 77.05%, sys: 1.64%, idle: 716.39%)
    ===== #6          at 2009-03-20 11:59:45
    *  I  SQL commands executed: 1557, avg. 30.12 per second
    *  I  Active User tasks found in state 'Running': 1
    * W3  38 primary key range accesses, selectivity 0.16%: 23366 rows read, 38 rows qualified
    *  I  CPU utilization: instance ECF3: 51.67% (usr: 51.67%, sys: 0%) host: 55% (usr: 53.33%, sys: 1.67%, idle: 755%)
    ===== #7          at 2009-03-20 12:00:45
    *  I  SQL commands executed: 5712, avg. 97.74 per second
    *  I  Active User tasks found in state 'Running': 1
    * W3  47 primary key range accesses, selectivity 0.16%: 28046 rows read, 46 rows qualified
    *  I  CPU utilization: instance ECF3: 73.77% (usr: 73.77%, sys: 0%) host: 75.41% (usr: 75.41%, sys: 0%, idle: 718.03%)
    ===== #8          at 2009-03-20 12:01:46
    *  I  SQL commands executed: 1565, avg. 30.25 per second
    * W3  42 primary key range accesses, selectivity 0.17%: 24666 rows read, 42 rows qualified
    *  I  DATA50: collision rate 4.43%, 444353 collisions, no waits, 10038277 accesses on region 54
    *  I  CPU utilization: instance ECF3: 86.67% (usr: 86.67%, sys: 0%) host: 91.67% (usr: 90%, sys: 1.67%, idle: 716.67%)
    ===== #9          at 2009-03-20 12:02:46
    *  I  SQL commands executed: 2111, avg. 38.7 per second
    *  I  Active User tasks found in state 'Running': 1
    *  I  Active User tasks found in state 'Connect close': 1
    * W3  53 primary key range accesses, selectivity 0.16%: 33101 rows read, 53 rows qualified
    *  I  CPU utilization: instance ECF3: 86.89% (usr: 85.25%, sys: 1.64%) host: 86.89% (usr: 86.89%, sys: 0%, idle: 706.56%)
    ===== #10         at 2009-03-20 12:03:47
    *  I  SQL commands executed: 1293, avg. 25.72 per second
    * W3  43 primary key range accesses, selectivity 0.17%: 24667 rows read, 43 rows qualified
    *  I  CPU utilization: instance ECF3: 65% (usr: 65%, sys: 0%) host: 70% (usr: 68.33%, sys: 1.67%, idle: 736.67%)

    Hi again Andrea!
    > Can anyone help on understanding the db analyzer output attached ?
    > The MaxCPUs message is clear I'd like to understand there are some issues that can be fixed.
    Ok, let's see if we can provide a free walkthrough..
    > ===== #0          at 2009-03-20 11:53:42
    > *  I  Database Analyzer configuration file dbanalyzer77.cfg, version 7.7.06 Build 009-123-202-944
    > *  I  Number of logical CPUs: 8, physical CPUs: 2, processor type: x86_64
    > *  I  Configuration: number of CPUs (MAXCPU): 6, max user tasks: 1020
    > *  I  'MaxCPUs' (6) exceeds number of physical CPUs (2)!
    > *  I  Physical memory 16088 MB, virtual memory 16386 MB, memory allocated from instance: 5292 MB
    > *  I  Operating system: Linux 2.6.23.1-42.fc8 #1 SMP Tue Oct 30 13:18:33 EDT 2007
    > *  I  Kernel version: Kernel    7.7.06   Build 009-123-202-944
    > *  I  Instance ECF3 (fatboy) is up since  23:59:58
    > *  I  Number of data volumes: 2
    > *  I  SQL commands executed: 174857156
    Ok, the I (= Information) messages are nothing to worry about.
    It's just for your information.
    > * W1  Number of tables where update statistics is required: 1
    > * W1  Owner: DBA, table: SYSUPGRADEHISTORY
    > * W1  Lock list escalations: 12
    Then there are warning messages (W1, W2, W3).
    These indicates violations to check rules.
    These check rules are defined by the dbanalyzer configuration file and the warning severity level is simply chosen by the developer of that file.
    These two warnings above (spread over 3 lines) are:
    1. One table needs new statitics - it's table DBA.SYSUPGRADEHISTORY.
    DBAnalyzer knows this, because the MaxDB Kernel inserted the tablename into a special system table SYSUPDSTATWANTED when it accessed it and found the statistics did not fit to the data in the table.
    Run a "update statistics as per system table" to clear this warning.
    2. There had been lock list escalations in the database.
    This happens when a single transactions holds more than 20% of all available lock entries. If this happens all row-locks are escalated to tablelocks.
    Since this obviously isn't the greatest thing for parallel data access, this should be avoided.
    Increate the MAXLOCKS parameter (say to 1000000 for starters) and check whether there are still lock escalations.
    > *  I  Size of data cache 4094.43 MB, used data size in instance 1364.88 MB
    > * W3  Log automatic overwrite is set to 'on' !
    This one is serious!
    With log automatic overwrite on you basically say "the data in this database is not important - I do not need to recover this database instance".
    Think about whether this fits the situation!
    > * W2  74 primary key range accesses, selectivity 0.33%: 31873 rows read, 106 rows qualified
    This is a warning about badly tuned SQL statements.
    For the 74 primary key ranges more than 310000 rows were read and only 106 fitted to the WHERE clause.
    Check your statetements and think about providing appropriate indexes.
    > * W3  27 primary key range accesses, selectivity 0.17%: 16227 rows read, 27 rows qualified
    Same again - only worse.
    > * W3  User task 1130 blocked in state 'Connect close' since 60s, application pid 1510
    You may want to check what user task 1130 is up to.
    Why is it hanging on "Connect close" ? Maybe a network issue!?
    > * W3  20 primary key range accesses, selectivity 0.20%: 10148 rows read, 20 rows qualified
    Ok, we already know this one.
    You need to tune your SQL.
    > * W2  240 table scans, selectivity 0.64%: 196678 rows read, 1267 rows qualified
    And again - SQL not tuned good enough.
    This time it's table scanes with a slightly better selectivity but still: reading nearly 200000 rows to get around 1200 is not the most clever thing to do.
    > * W3  57 primary key range accesses, selectivity 0.28%: 26740 rows read, 76 rows qualified
    dito.
    > * W2  330 index accesses, selectivity 1.54%: 36056 rows read, 557 rows qualified
    Same in green - only that this time a secondary index was used. But still the index is not selective enough.
    > * W3  56 primary key range accesses, selectivity 0.20%: 27880 rows read, 56 rows qualified
    Just like television - repetitions all over again.
    > * W3  38 primary key range accesses, selectivity 0.16%: 23366 rows read, 38 rows qualified
    They do this with Star Trek or Bonanza...:-)
    ok, lets skip the rest.
    I think you get the picture.
    Hope that helps,
    Lars

  • Abnormal high "query" count in customer tkprof output

    We have a performance problem with one of our customer.
    A query is made on a 12K rows table, and there is no full scan, the index is used.
    If we run the query on our test database, which is identical, and examine the tkprof output, things appears normal:
    Fetch=80, cpu=0.0, disk=0, query=15738,rows=782
    But the same query, on and identical table, same index at our customer:
    Fetch=831, cpu=4.75, disk=141, query=550564, rows=830
    I dont unerstand what is the "query" parameter, the number of cache buffers read in memory ?
    It is unbeleivebly high, further more, hard to understand high number of rows in the execution plan:
    Ours
    1570 TABLE ACCESS BY INDEX ROWID MY_SECRET_TABLE_NAME
    1570 INDEX RANGE SCAN MY_PRIMARY_KEY_INDEX
    Customers:
    88413 TABLE ACCESS BY INDEX ROWID MY_SECRET_TABLE_NAME
    92917 INDEX RANGE SCAN MY_PRIMARY_KEY_INDEX
    We dont understand such high numbers. On theory, from our former DBA, was that our indexes where not create properly. A unique key index was create, then a primary constraint with the same name, was added to the table. Apparently we should have created only the constraint, and not the second index.
    Any help appreciated.

    Hi Guy,
    Query = db block gets + consistent gets.
    Consistent gets are the block reads you need to reconstruct a read-consistent image of the data.
    If you can't fetch all records at a time, you will get multiple fetches. At each fetch Oracle will issue consistent gets, as it needs to provide to you the data in the state when you started the query.
    Looking at your statistics, it is quite clear what happened.
    Fetch=80, cpu=0.0, disk=0, query=15738,rows=782
    782 rows in 80 fetches. Roughly 10 rows per fetch.
    But the same query, on an identical table, same index at our customer:
    Fetch=831, cpu=4.75, disk=141, query=550564, rows=830
    830 rows in 830 fetches (the last fetch is to check there is no more data), which means 1 row per fetch.
    In both cases: consistent gets at every fetch.
    Somehow your client has made sure, by means of a setting, he will fetch only 1 row at a time. And that is killing him.
    Nothing wrong with any index.
    Hth
    Sybrand Bakker
    Senior Oracle DBA

  • 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.

  • Can you help me understand the use of the word POSITION in TR and CFM?

    Hi,
    I am trying to have a view of typical BI reports in TR and TM/CFM so through my research I came to the following link:.
    http://help.sap.com/saphelp_nw2004s/helpdata/en/62/08193c38f98e1ce10000000a11405a/frameset.htm
    My problem on this link and other postings on this site seem to be the same. Can you help me understand the use of the word POSITIONS in these context:
    1. Our client has asked for financial transaction reports in BW, such as position of Borrowings, Investments and Hedge Operations (TM data).
    2. I have a requirement on, some reports related to Money Market (Fixed Term Deposits, Deposits at Notice) something on FSCM-Treasury and Risk Manager. These reports will be similar to that of Loans, i.e. Position statement, flow statement, etc.
    3. The set of position values for a single position or a limited amount of positions can be reported by transactions TPM12 and TPM13 in R3.
    4. 0CFM_C10 (Financial Positions Cube)
    Do you have some simple report outputs to help clarify how the word POSITION is used in such environments?
    Thanks
    Edited by: AmandaBaah on Feb 15, 2010 4:39 PM

    If I future buy 10 shares in company at £1 per share - at the end of the day my potential value is £10
    The next day the shares drop tp £0.9 per share - I have a negative position - my shares are only worth £9
    I haven;t bought them yet - but I have a negative position - ie if things stayed as they are - I am going to realise (ie end up with)  a loss
    Now you can use this for loans and foreign exchange banks as well...

  • Need help in understanding why so many gets and I/O

    Hi there,
    I have a sql file somewhat similar in structure to below:
    delete from table emp;-- changed to Truncate table emp;
    delete from table dept;--changed to Truncate table dept;
    insert into emp values() select a,b,c from temp_emp,temp_dept where temp_emp.id=temp_dept.emp_id
    update emp set emp_name=(select emp_name from dept where emp.id=dept.emp_id);
    commit --only at the end
    the above file takes about 9-10 hrs to complete its operation. and
    the values from v$sql for the statement
    update emp set emp_name=(select emp_name from dept where emp.id=dept.emp_id);
    are as below:
    SHARABLE_MEM     PERSISTENT_MEM     RUNTIME_MEM     SORTS     LOADED_VERSIONS     OPEN_VERSIONS     USERS_OPENING     FETCHES     EXECUTIONS     PX_SERVERS_EXECUTIONS     END_OF_FETCH_COUNT     USERS_EXECUTING     LOADS     FIRST_LOAD_TIME     INVALIDATIONS     PARSE_CALLS     DISK_READS     DIRECT_WRITES     BUFFER_GETS     APPLICATION_WAIT_TIME     CONCURRENCY_WAIT_TIME     CLUSTER_WAIT_TIME     USER_IO_WAIT_TIME     PLSQL_EXEC_TIME     JAVA_EXEC_TIME     ROWS_PROCESSED     COMMAND_TYPE     OPTIMIZER_MODE     OPTIMIZER_COST     OPTIMIZER_ENV     OPTIMIZER_ENV_HASH_VALUE     PARSING_USER_ID     PARSING_SCHEMA_ID     PARSING_SCHEMA_NAME     KEPT_VERSIONS     ADDRESS     TYPE_CHK_HEAP     HASH_VALUE     OLD_HASH_VALUE     PLAN_HASH_VALUE     CHILD_NUMBER     SERVICE     SERVICE_HASH     MODULE     MODULE_HASH     ACTION     ACTION_HASH     SERIALIZABLE_ABORTS     OUTLINE_CATEGORY     CPU_TIME     ELAPSED_TIME     OUTLINE_SID     CHILD_ADDRESS     SQLTYPE     REMOTE     OBJECT_STATUS     LITERAL_HASH_VALUE     LAST_LOAD_TIME     IS_OBSOLETE     CHILD_LATCH     SQL_PROFILE     PROGRAM_ID     PROGRAM_LINE#     EXACT_MATCHING_SIGNATURE     FORCE_MATCHING_SIGNATURE     LAST_ACTIVE_TIME     BIND_DATA     TYPECHECK_MEM
    18965     8760     7880     0     1     0     0     0     2     0     2     0     2     2011-05-10/21:16:44     1     2     163270378     0     164295929     0     509739     0     3215857850     0     0     20142     6     ALL_ROWS     656     E289FB89A4E49800CE001000AEF9E3E2CFFA331056414155519421105555551545555558591555449665851D5511058555155511152552455580588055A1454A8E0950402000002000000000010000100050000002002080007D000000000002C06566001010000080830F400000E032330000000001404A8E09504646262040262320030020003020A000A5A000     4279923421     50     50     APPS     0     00000003CBE5EF50     00     1866523305     816672812     1937724149     0     SYS$USERS     0     01@</my.sql     -2038272289          -265190056     0          9468268067     10420092918          00000003E8593000     6     N     VALID     0     2011-05-11/10:23:45     N     5          0     0     1.57848E+19     1.57848E+19     5/12/2011 4:39          0
    1) how do i re-write this legacy script? and what should be done to improve performance?
    2) Should i use PL/sql to re-write it?
    3) Also help in understanding why a simple update statement is doing so many buffer gets and reading , Is this Read consistency Trap as i'm not committing anywhere in between or it is actually doing so much of work.
    (assume dept table has cols emp_name and emp_id also)

    update emp set emp_name=(select emp_name from dept where emp.id=dept.emp_id);I guess that these are masked table names ? Nobody would have emp_name in a dept table.
    Can you re-format the output, using "code" tags ( [  or {  }
    Hemant K Chitale
    Edited by: Hemant K Chitale on May 12, 2011 12:44 PM

  • Need help for understanding the behaviour of these 2 queries....

    Hi,
    I need your help for understanding the behaviour of following two queries.
    The requirement is to repeat the values of the column in a table random no of times.
    Eg. A table xyz is like -
    create table xyz as
    select 'A' || rownum my_col
    from all_objects
    where rownum < 6;
    my_col
    A1
    A2
    A3
    A4
    A5
    I want to repeat each of these values (A1, A2,...A5) multiple times - randomly decide. I have written the following query..
    with x as (select my_col, trunc(dbms_random.value(1,6)) repeat from xyz),
    y as (select level lvl from dual connect by level < 6)
    select my_col, lvl
    from x, y
    where lvl <= repeat
    order by my_col, lvl
    It gives output like
    my_col lvl
    A1     1
    A1     3
    A1     5
    A2     1
    A2     3
    A2     5
    A3     1
    A3     3
    A3     5
    A4     1
    A4     3
    A4     5
    A5     1
    A5     3
    A5     5
    Here in the output, I am not getting rows like
    A1     2
    A1     4
    A2     2
    A2     4
    Also, it has generated the same set of records for all the values (A1, A2,...,A5).
    Now, if I store the randomly-decided value in the table like ---
    create table xyz as
    select 'A' || rownum my_col, trunc(dbms_random.value(1,6)) repeat
    from all_objects
    where rownum < 6;
    my_col repeat
    A1     4
    A2     1
    A3     5
    A4     2
    A5     2
    And then run the query,
    with x as (select my_col, repeat from xyz),
    y as (select level lvl from dual connect by level < 6)
    select my_col, lvl
    from x, y
    where lvl <= repeat
    order by my_col, lvl
    I will get the output, exactly what I want ---
    my_col ....lvl
    A1     1
    A1     2
    A1     3
    A1     4
    A2     1
    A3     1
    A3     2
    A3     3
    A3     4
    A3     5
    A4     1
    A4     2
    A5     1
    A5     2
    Why the first approach do not generate such output?
    How can I get such a result without storing the repeat values?

    If I've understood your requirement, the below will achieve it:
    SQL> create table test(test varchar2(10));
    Table created.
    SQL> insert into test values('&test');
    Enter value for test: bob
    old   1: insert into test values('&test')
    new   1: insert into test values('bob')
    1 row created.
    SQL> insert into test values('&test');
    Enter value for test: terry
    old   1: insert into test values('&test')
    new   1: insert into test values('terry')
    1 row created.
    SQL> insert into test values('&test');
    Enter value for test: steve
    old   1: insert into test values('&test')
    new   1: insert into test values('steve')
    1 row created.
    SQL> insert into test values('&test');
    Enter value for test: roger
    old   1: insert into test values('&test')
    new   1: insert into test values('roger')
    1 row created.
    SQL> commit;
    Commit complete.
    SQL> select lpad(test,(ceil(dbms_random.value*10))*length(test),test) from test;
    LPAD(TEST,(CEIL(DBMS_RANDOM.VALUE*10))*LENGTH(TEST),TEST)
    bobbobbobbobbobbobbobbobbobbob
    terryterry
    stevestevesteve
    rogerrogerrogerrogerrogerrogerrogerrogerrogerYou can alter the value of 10 in the SQL if you want the potential for a higher number of names.
    Andy

  • Understand the output of explain plan

    I am trying to understand the output of explain plan. I have 2 plans below and don't understand it completely.
    In below SQL I would expect optimizer to fetch "ROWNUM < 500" first and then do the outer join. But below explain plan doesn't list it as No. 1. So I don't really understand how to intepret the sequence from the explain plan:
    select TASK0_.TASK_ID from
    (  select TASK0_.TASK_ID from
      ( select task0_.task_id  from task task0_) TASK0_ where ROWNUM < 500 ) TASK0_ 
    left outer join f_message_task task0_1_ on task0_.task_id=task0_1_.task_id
    left outer join b_a_task task0_2_ on task0_.task_id=task0_2_.task_id
    left outer join i_task task0_3_ on task0_.task_id=task0_3_.task_id
    left outer join o_task task0_4_ on task0_.task_id=task0_4_.task_id
    left outer join r_transmission_task task0_5_ on task0_.task_id=task0_5_.task_id
    left outer join s_error_task task0_6_ on task0_.task_id=task0_6_.task_id
    PLAN_TABLE_OUTPUT     
    Plan hash value: 707970537     
    | Id  | Operation                    | Name                     | Rows  | Bytes | Cost (%CPU)| Time     |     
    |   0 | SELECT STATEMENT             |                          |   499 | 19461 |  1042   (6)| 00:00:13 |     
    |*  1 |  HASH JOIN OUTER             |                          |   499 | 19461 |  1042   (6)| 00:00:13 |     
    |*  2 |   HASH JOIN OUTER            |                          |   499 | 16966 |   757   (6)| 00:00:10 |     
    |   3 |    NESTED LOOPS OUTER        |                          |   499 | 14471 |   589   (4)| 00:00:08 |     
    |   4 |     NESTED LOOPS OUTER       |                          |   499 | 12475 |   588   (4)| 00:00:08 |     
    |   5 |      NESTED LOOPS OUTER      |                          |   499 | 10479 |   588   (4)| 00:00:08 |     
    |   6 |       NESTED LOOPS OUTER     |                          |   499 |  8982 |   588   (4)| 00:00:08 |     
    |   7 |        VIEW                  |                          |   499 |  2495 |   588   (4)| 00:00:08 |     
    |*  8 |         COUNT STOPKEY        |                          |       |       |            |          |     
    |   9 |          INDEX FAST FULL SCAN| PK_TASK                  |   697K|  3403K|   588   (4)| 00:00:08 |     
    |* 10 |        INDEX UNIQUE SCAN     | PK_r_TRANSMISSION |     1 |    13 |     0   (0)| 00:00:01 |     
    |* 11 |       INDEX UNIQUE SCAN      | PK_b_a_TASK          |     1 |     3 |     0   (0)| 00:00:01 |     
    |* 12 |      INDEX UNIQUE SCAN       | PK_s_ERROR_TASK     |     1 |     4 |     0   (0)| 00:00:01 |     
    |* 13 |     INDEX UNIQUE SCAN        | PK_i_TASK    |     1 |     4 |     0   (0)| 00:00:01 |     
    |  14 |    INDEX FAST FULL SCAN      | PK_o_TASK           |   347K|  1695K|   161   (6)| 00:00:02 |     
    |  15 |   INDEX FAST FULL SCAN       | PK_f_MESSAGE        |   392K|  1917K|   276   (4)| 00:00:04 |     
    Predicate Information (identified by operation id):     
       1 - access("TASK0_"."TASK_ID"="TASK0_1_"."TASK_ID"(+))     
       2 - access("TASK0_"."TASK_ID"="TASK0_4_"."TASK_ID"(+))     
       8 - filter(ROWNUM<500)     
      10 - access("TASK0_"."TASK_ID"="TASK0_5_"."TASK_ID"(+))     
      11 - access("TASK0_"."TASK_ID"="TASK0_2_"."TASK_ID"(+))     
      12 - access("TASK0_"."TASK_ID"="TASK0_6_"."TASK_ID"(+))     
      13 - access("TASK0_"."TASK_ID"="TASK0_3_"."TASK_ID"(+))     
    In below SQL I expect rownum to be applied at the end but it gets applied first:
    select *  from (  select TASK0_.TASK_ID from ( select task0_.task_id  from task task0_ 
    left outer join f_message_task task0_1_ on task0_.task_id=task0_1_.task_id
    left outer join b_a_task task0_2_ on task0_.task_id=task0_2_.task_id
    left outer join i_task task0_3_ on task0_.task_id=task0_3_.task_id
    left outer join o_task task0_4_ on task0_.task_id=task0_4_.task_id
    left outer join r_t_task task0_5_ on task0_.task_id=task0_5_.task_id
    left outer join s_error_task task0_6_ on task0_.task_id=task0_6_.task_id
    ) TASK0_ where ROWNUM < 500 ) TASK0_;
    PLAN_TABLE_OUTPUT     
    Plan hash value: 673345378     
    | Id  | Operation                    | Name                     | Rows  | Bytes | Cost (%CPU)| Time     |     
    |   0 | SELECT STATEMENT             |                          |   499 |  6487 |   507   (1)| 00:00:07 |     
    |   1 |  VIEW                        |                          |   499 |  6487 |   507   (1)| 00:00:07 |     
    |*  2 |   COUNT STOPKEY              |                          |       |       |            |          |     
    |   3 |    NESTED LOOPS OUTER        |                          |   501 | 19539 |   507   (1)| 00:00:07 |     
    |   4 |     NESTED LOOPS OUTER       |                          |   501 | 17034 |     5  (20)| 00:00:01 |     
    |   5 |      NESTED LOOPS OUTER      |                          |   501 | 15030 |     5  (20)| 00:00:01 |     
    |   6 |       NESTED LOOPS OUTER     |                          |   501 | 13026 |     5  (20)| 00:00:01 |     
    |   7 |        NESTED LOOPS OUTER    |                          |   501 | 11523 |     5  (20)| 00:00:01 |     
    |   8 |         NESTED LOOPS OUTER   |                          |   501 |  5010 |     5  (20)| 00:00:01 |     
    |   9 |          INDEX FAST FULL SCAN| PK_TASK                  |   499 |  2495 |     2   (0)| 00:00:01 |     
    |* 10 |          INDEX UNIQUE SCAN   | PK_o_TASK           |     1 |     5 |     1   (0)| 00:00:01 |     
    |* 11 |         INDEX UNIQUE SCAN    | PK_r_T |     1 |    13 |     0   (0)| 00:00:01 |     
    |* 12 |        INDEX UNIQUE SCAN     | PK_b_a_TASK          |     1 |     3 |     0   (0)| 00:00:01 |     
    |* 13 |       INDEX UNIQUE SCAN      | PK_s_ERROR_TASK     |     1 |     4 |     0   (0)| 00:00:01 |     
    |* 14 |      INDEX UNIQUE SCAN       | PK_i_TASK    |     1 |     4 |     0   (0)| 00:00:01 |     
    |* 15 |     INDEX UNIQUE SCAN        | PK_f_MESSAGE        |     1 |     5 |     1   (0)| 00:00:01 |     
    Predicate Information (identified by operation id):     
       2 - filter(ROWNUM<500)     
      10 - access("TASK0_"."TASK_ID"="TASK0_4_"."TASK_ID"(+))     
      11 - access("TASK0_"."TASK_ID"="TASK0_5_"."TASK_ID"(+))     
      12 - access("TASK0_"."TASK_ID"="TASK0_2_"."TASK_ID"(+))     
      13 - access("TASK0_"."TASK_ID"="TASK0_6_"."TASK_ID"(+))     
      14 - access("TASK0_"."TASK_ID"="TASK0_3_"."TASK_ID"(+))     
      15 - access("TASK0_"."TASK_ID"="TASK0_1_"."TASK_ID"(+))Edited by: user628400 on Feb 20, 2009 12:14 PM
    Edited by: user628400 on Feb 20, 2009 12:15 PM

    Please read the FAQ: http://forums.oracle.com/forums/help.jspa
    And learn how to post code and explain plans using the tags.                                                                                                                                                                                                                                                                           

  • Ellapsed time too much in tkprof output

    Hi All,
    I don't know exactly how to interprete Tkprof output file but i have a problem of performance inserting data to my one table, it takes around 1min but before it was 10 secs. i trace the program and analyze the output from tkprof and i get the following portion:
    insert /*+ APPEND +*/ into T_NAME(COL1,  COL2, COL3, .....)
    values
    (:s1 ,:s2 ,:s3 ,:s4 ,:s5 ,:s6 ,:s7 ,:s8 ,:s9 ,:s10 ,:s11 ,:s12 ,:s13 ,:s14 ,
    :s15 ,:s16 ,:s17 ,:s18 ,:s19 ,:s20 ,:s21 ,:s22 ,:s23 ,:s24 ,:s25 ,:s26 ,
    :s27 ,:s28 ,:s29 ,:s30 ,:s31 ,:s32 ,:s33 ,:s34 ,:s35 ,:s36 ,:s37 ,:s38 ,
    :s39 ,:s40 ,:s41 ,:s42 ,:s43 ,:s44 ,:s45 ,:s46 ,:s47 ,:s48 ,:s49 ,:s50 ,
    :s51 ,:s52 ,:s53 ,:s54 ,:s55 ,:s56 ,:s57 ,:s58 ,:s59 ,:s60 ,:s61 ,:s62 ,
    :s63 ,:s64 ,:s65 ,:s66 ,:s67 ,:s68 )
    call count cpu elapsed disk query current rows
    Parse 2 0.00 0.00 0 0 0 0
    Execute 3 2.94 292.24 12144 1501 57125 4728
    Fetch 0 0.00 0.00 0 0 0 0
    total 5 2.94 292.24 12144 1501 57125 4728
    Misses in library cache during parse: 2
    Misses in library cache during execute: 3
    Optimizer mode: ALL_ROWS
    Parsing user id: 103 (USERNAME)
    Rows Execution Plan
    0 INSERT STATEMENT MODE: ALL_ROWS
    When interpreting this, i got huge value on Ellapsed, disk column during execution:
    The command was exectued 3 times and it was taking 292 secs means 97 secs per execution. I thought it was making my insert problem slow.
    So if i'm not wrong how to avaoid this insertion problem, how to reduce this time of ellapsed.
    What is the problem causing table insertion slow.
    Please help because it is affecting our business
    Thanks for your help
    Raitsarevo

    raitsarevo wrote:
    Hi,
    Gathering statistics will affect performance or not. I mean when i gather statistics of my table now, will this affect operation in this table during execution, the table will be locked or not, indexes will be also or not. Can users work in the table during stat gathering.
    Can anybody give me script to gather stats for partitionned table please.
    Gathering statistics is a good idea in general but it's very unlikely that will help in your particular case. The data needs to be inserted into the table and indexes need to be maintained, this in independent from any statistics. Still it's a good idea in general to refresh statistics if e.g. bulk inserts increased the size and number of rows significantly.
    Have you followed up the advices already given so far regarding further checks and running your statement with tracing enabled at a higher level?
    You can enable this using the following instead of using sql_trace = true:
    ALTER SESSION SET EVENTS '10046 trace name context forever, level 8';and switch it off like that:
    ALTER SESSION SET EVENTS '10046 trace name context off';For more information regarding this, e.g. enabling trace in another session, see e.g. here:
    http://www.juliandyke.com/Diagnostics/Trace/EnablingTrace.html
    raitsarevo wrote:
    Hi guys,
    Reading an output fromENterprise manager, i found that this insert statement is consuming to much "db file sequential read ". I know that is causing wait event. So my question is how to reduce this consumption.
    Thanks
    Raitsarevo.That's very likely caused by the required index maintenance and there is not much you can do about it apart from dropping the indexes. As already mentioned by Jonathan you might hits bugs of the ASSM space management, therefore it would also be good to know if the tablespace the object resides in uses ASSM or not (check the columns EXTENT_MANAGEMENT, ALLOCATION_TYPE, SEGMENT_SPACE_MANAGEMENT of DBA_TABLESPACES).
    Try to generate the extended trace as advised and post the tkprof output here.
    Regards,
    Randolf
    Oracle related stuff blog:
    http://oracle-randolf.blogspot.com/
    SQLTools++ for Oracle (Open source Oracle GUI for Windows):
    http://www.sqltools-plusplus.org:7676/
    http://sourceforge.net/projects/sqlt-pp/

  • Help with understanding key event propagation

    Hello,
    I am hoping someone can help me understand a few things which are not clear to me with respect to handling of key events by Swing components. My understanding is summarized as:
    (1) Components have 3 input maps which map keys to actions
    one for when they are the focused component
    one for when they are an ancestor of the focused component
    one for when they are in the same window as the focused component
    (2) Components have a single action map which contains actions to be fired by key events
    (3) Key events go to the currently focused component
    (4) Key events are consumed by the first matching action that is found
    (5) Key events are sent up the containment hierarchy up to the window (in which case components with a matching mapping in the WHEN_IN_FOCUSED_WINDOW map are searched for)
    (6) The first matching action handles the event which does not propagate further
    I have a test class (source below) and I obtained the following console output:
    Printing keyboard map for Cancel button
    Level 0
    Key: pressed C
    Key: released SPACE
    Key: pressed SPACE
    Level 1
    Key: pressed SPACE
    Key: released SPACE
    Printing keyboard map for Save button
    Level 0
    Key: pressed SPACE
    Key: released SPACE
    Level 1
    Key: pressed SPACE
    Key: released SPACE
    Printing keyboard map for Main panel
    Event: cancel // typed SPACE with Cancel button having focus
    Event: save // typed SPACE with Save button having focus
    Event: panel // typed 'C' with panel having focus
    Event: panel // typed 'C' with Cancel button having focus
    Event: panel // typed 'C' with Save button having focus
    I do not understand the following aspects of its behaviour (tested on MacOSX although I believe the behaviour is not platform dependent):
    (1) I assume that the actions are mapped to SPACE since the spacebar clicks the focused component but I don't explicitly set it?
    (2) assuming (1) is as I described why are there two mappings, one for key pressed and one for key released yet the 'C' key action only has a key pressed set?
    (3) assuming (1) and (2) are true then why don't I get the action fired twice when I typed the spacebar, once when I pressed SPACE and again when I released SPACE?
    (4) I read that adding a dummy action with the value "none" (i.e. the action is the string 'none') should hide the underlying mappings for the given key, 'C' the my example so why when I focus the Cancel button and press the 'C' key do I get a console message from the underlying panel action (the last but one line in the output)?
    Any help appreciated. The source is:
    import javax.swing.*;
    public class FocusTest extends JFrame {
         public FocusTest ()     {
              initComponents();
              setTitle ("FocusTest");
              setLocationRelativeTo (null);
              setSize(325, 160);
              setVisible (true);
         public static void main (String[] args) {
              new FocusTest();
    private void initComponents()
         JPanel panTop = new JPanel();
              panTop.setBackground (java.awt.Color.RED);
    JLabel lblBanner = new javax.swing.JLabel ("PROPERTY TABLE");
    lblBanner.setFont(new java.awt.Font ("Lucida Grande", 1, 14));
    lblBanner.setHorizontalAlignment (javax.swing.SwingConstants.CENTER);
              panTop.add (lblBanner);
              JPanel panMain = new JPanel ();
              JLabel lblKey = new JLabel ("Key:");
              lblKey.setFocusable (true);
              JLabel lblValue = new JLabel ("Value:");
    JTextField tfKey = new JTextField(20);
    JTextField tfValue = new JTextField(20);
    JButton btnCancel = new JButton (createAction("cancel"));     // Add a cancel action.
    JButton btnSave = new JButton (createAction("save"));          // Add a sve action.
              panMain.add (lblKey);
              panMain.add (tfKey);
              panMain.add (lblValue);
              panMain.add (tfValue);
              panMain.add (btnCancel);
              panMain.add (btnSave);
              add (panTop, java.awt.BorderLayout.NORTH);
              add (panMain, java.awt.BorderLayout.CENTER);
    setDefaultCloseOperation (javax.swing.WindowConstants.EXIT_ON_CLOSE);
    // Add an action to the panel for the C key.
              panMain.getInputMap (JComponent.WHEN_IN_FOCUSED_WINDOW).put (KeyStroke.getKeyStroke (java.awt.event.KeyEvent.VK_C, 0), "panel");
              panMain.getActionMap ().put ("panel", createAction("panel"));
              // FAILS ???
              // Add an empty action to the Cancel button to block the underlying panel C key action.
    btnCancel.getInputMap().put (KeyStroke.getKeyStroke (java.awt.event.KeyEvent.VK_C, 0), "none");
    // Print out the input map contents for the Cancel and Save buttons.
    System.out.println ("\nPrinting keyboard map for Cancel button");
    printInputMaps (btnCancel);
    System.out.println ("\nPrinting keyboard map for Save button");
    printInputMaps (btnSave);
              // FAILS NullPointer because the map contents are null ???
    System.out.println ("\nPrinting keyboard map for Main panel");
    // printInputMaps (panMain);
    private AbstractAction createAction (final String actionName) {
         return new AbstractAction (actionName) {
              public void actionPerformed (java.awt.event.ActionEvent evt) {
                   System.out.println ("Event: " + actionName);
    private void printInputMaps (JComponent comp) {
         InputMap map = comp.getInputMap();
         printInputMap (map, 0);
    private void printInputMap (InputMap map, int level) {
         System.out.println ("Level " + level);
         InputMap parent = map.getParent();
         Object[] keys = map.allKeys();
         for (Object key : keys) {
              if (key.equals (parent)) {
                   continue;
              System.out.println ("Key: " + key);
         if (parent != null) {
              level++;
              printInputMap (parent, level);
    Thanks,
    Tim Mowlem

    Use the [url http://forum.java.sun.com/help.jspa?sec=formatting]Code Formatting Tags so the posted code retains its original formatting.
    1) In the Metal LAF the space bar activates the button. In the Windows LAF the Enter key is used to activate the button. Therefore these bindings are added by the LAF.
    2) The pressed binding paints the button in its pressed state. The released binding paint the button in its normal state. Thats why the LAF adds two bindings.
    In your case you only added a single binding.
    3) The ActionEvent is only fired when the key is released. Same as a mouse click. You can hold the mouse down as long as you want and the ActionEvent isn't generated until you release the mouse. In fact, if you move the mouse off of the button before releasing the button, the ActionEvent isn't even fired at all. The mouse pressed/released my be generated by the same component.
    4) Read (or reread) the [url http://java.sun.com/docs/books/tutorial/uiswing/misc/keybinding.html#howto]How to Remove Key Bindings section. "none" is only used to override the default action of a component, it does not prevent the key stroke from being passed on to its parent.

  • Can anyone help me understand "Continue Statements"?

    Hi,
    I was wondering if anyone could help me understand continue statements. I've been studying the java tutorials this weekend but can not get my head around the following explanation: (My thoughts are at the end of this message and it might be easiest to read them first!)
    "The continue statement skips the current iteration of a for, while , or do-while loop. The unlabeled form skips to the end of the innermost loop's body and evaluates the boolean expression that controls the loop. The following program, ContinueDemo , steps through a String, counting the occurences of the letter "p". If the current character is not a p, the continue statement skips the rest of the loop and proceeds to the next character. If it is a "p", the program increments the letter count.
    {code}class ContinueDemo {
    public static void main(String[] args) {
    String searchMe = "peter piper picked a peck of pickled peppers";
    int max = searchMe.length();
    int numPs = 0;
    for (int i = 0; i < max; i++) {
    //interested only in p's
    if (searchMe.charAt(i) != 'p')
    continue;
    //process p's
    numPs++;
    System.out.println("Found " + numPs + " p's in the string.");
    }{code}
    Here is the output of this program:
    Found 9 p's in the string.
    To see this effect more clearly, try removing the continue statement and recompiling. When you run the program again, the count will be wrong, saying that it found 35 p's instead of 9.
    A labeled continue statement skips the current iteration of an outer loop marked with the given label. The following example program, ContinueWithLabelDemo, uses nested loops to search for a substring within another string. Two nested loops are required: one to iterate over the substring and one to iterate over the string being searched. The following program, ContinueWithLabelDemo, uses the labeled form of continue to skip an iteration in the outer loop.
    {code}class ContinueWithLabelDemo {
    public static void main(String[] args) {
    String searchMe = "Look for a substring in me";
    String substring = "sub";
    boolean foundIt = false;
    int max = searchMe.length() - substring.length();
    test:
    for (int i = 0; i <= max; i++) {
    int n = substring.length();
    int j = i;
    int k = 0;
    while (n-- != 0) {
    if (searchMe.charAt(j++)
    != substring.charAt(k++)) {
    continue test;
    foundIt = true;
    break test;
    System.out.println(foundIt ? "Found it" :
    "Didn't find it");
    }{code}
    Here is the output from this program.
    Found it"
    Here are Woodie's thoughts........................................
    1) With the first program I don't understand how the program counts the number of "p's". Like for example how it stores the number of "p's". Shouldn't it say:
    if (searchMe.charAt(i) = 'p') then store it in some sort of containers??? 2) With the second program, I don't understand the test section. For example: Why does it have --? why does it have != after while and why does it have != after if?
    while (n-- != 0)
                    if (searchMe.charAt(j++) != substring.charAt(k++))
                        continue test;
                foundIt = true;
                     break test;Edited by: woodie_woodpeck on Nov 23, 2008 3:29 AM

    Woodie, I think they're just silly "theoretical" examples... ergo don't worry too much not understanding them, coz they don't actually make a lot of sense... as you've allready pointed out there are other "more normal" control structures which achieve the same thing, and which in this case (in my humble opinion) would make for clearer, more concise, more maintainable code.
    All you need to know about continue is "it means go back to the top of the loop"... If you're not comfortable using "continue" then don't.
    There's more than one way to do it.
      public static void main(String[] args) {
        try {
          final String s = "peter piper picked a peck of pickled peppers";
          int count = 0;
          for ( char c : s.toStringArray() ) {
            if (c=='p') count++;
          System.out.println("There are "+count+ " p's in '"+s+"'");
        } catch (Exception e) {
          e.printStackTrace();
      }Having said all that... I did use continue in anger the other day... I was reading Geometries from a shape file... the reader was throwing an ArrayIndexOutOfBoundsException given an "empty Feature" (ie a feature with the geospatial presence)... All I did was catch the exception and continue trying to read the new feature... the alternative would have been to rewrite the control logic of the whole reader loop... quick, simple effective... but I don't routinely build continue statements into new code... just a matter of personal taste.
    Cheers. Keith.

  • Interpret of TKPROF Output

    Hello friends,
    I have a 'select' within a loop while...
    Viewing the file generated by tkprof, has the information below:
    call count cpu elapsed disk query current rows
    Parse 1 0.01 0.00 0 0 0 0
    Execute 109 2.12 7.24 284 7586 111205 21582
    Fetch 0 0.00 0.00 0 0 0 0
    total 110 2.13 7.25 284 7586 111205 21582
    The field 'count' tells me that she will be parsed 1 time and executed 109 times?
    Although it is considered 1 time, is difference in performance if it were played only 1 time?
    And what I see fields to improve performance?

    If it was executed only 1 time, it would be faster, sure, but is that what you want?
    Does your tkprof output has more information? I cant see any information to help improve performance.
    Try put here some AUTOTRACE info too.
    Edited by: user10146205 on 18/09/2008 14:38

  • Error Posting IDOC: need help in understanding the following error

    Hi ALL
    Can you please, help me understand the following error encountered while the message was trying to post a IDOC.
    where SAP_050 is the RFC destination created to post IDOCs
    <?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
    - <!--  Call Adapter
      -->
    - <SAP:Error xmlns:SAP="http://sap.com/xi/XI/Message/30" xmlns:SOAP="http://schemas.xmlsoap.org/soap/envelope/" SOAP:mustUnderstand="">
      <SAP:Category>XIAdapter</SAP:Category>
      <SAP:Code area="IDOC_ADAPTER">ATTRIBUTE_IDOC_RUNTIME</SAP:Code>
      <SAP:P1>FM NLS_GET_LANGU_CP_TAB: Could not determine code page with SAP_050 Operation successfully executed FM NLS_GET_LANGU_CP_TAB</SAP:P1>
      <SAP:P2 />
      <SAP:P3 />
      <SAP:P4 />
      <SAP:AdditionalText />
      <SAP:ApplicationFaultMessage namespace="" />
      <SAP:Stack>Error: FM NLS_GET_LANGU_CP_TAB: Could not determine code page with SAP_050 Operation successfully executed FM NLS_GET_LANGU_CP_TAB</SAP:Stack>
      <SAP:Retry>M</SAP:Retry>
      </SAP:Error>
    Your help is greatly appreciated.............Thank you!

    Hi Patrick,
      Check the authorizations assigned to the user which you used in the RFC destinations, If there is no enough authorizations then it is not possible to post the idocs.
    Also Refer this Note 747322
    Regards,
    Prakash

Maybe you are looking for

  • Action profile for Business Partners

    Dear SAPers, Currently Action profile, can be easily set-up for Business transactions (Opp, Activity,etc.). Examle: When Opp status is changed (schedule condition, start condition), Business Parnter attribute is adapted (Execution). Does anyone know

  • HOW TO USE "WITH" STATEMENT IN MESSAGES

    MESSAGE e001 WITH WERKS  SY-REPID TELL ME HOW TO USE "WITH" IN MESSAGES SEND SYANTAX AND EXAMPLE CODE

  • ITunes bought and paid for movies are not on my Mac

    I set 2 movies to download before I retired for the night. I logged in and received the "are you sure" msg.  The movies were actively downloading. These 2 movies are not in "My Movies". Who do dI contact?

  • Problem printer

    Problem : printer hp laserjet 400  mfp m425 dn print "GET/ HTTP/1.0 " is first page. Thank you for answer

  • Public folders, lack of

    I was thinking about the lack of public folders in Mac Server/Mac Mail, and that a possible bodge would be to set up an IMAP account that everyone has set up on their Mac, and can create folders within. Just wanted to check there isn't a cleverer or