TKPROF facility

I have various procedures, functions that effectively make up the application. When a user submits a request via the web the processing is too slow I need to improve the performance of the application.
To assist is the TKPROF the tool to use i.e. will it produce statistics on all SQL statements that occur within my code ?
Apologise if my questions seems elementary but I havent done any tuning as such.
Regards.

hi,
the TKPROF utility is going to help u for sure...
for u r session set the SQL TRACE to TRUE is initialization parameters..its going to give u an o/p with in trace file format (TRC)
convert all those in readable format by using TKPROF...
if u need more assistance in this.. do let me know.
as i did all these things recently
-thanks
Jai

Similar Messages

  • OCCI/ODBC application sql trace failure...

    Hi,
    I was doing the sql*net trace for an OCCI/ODBC Application writen in c++. I have an InstantClient on my PC. I was trying to access the Oracle through my C++ program to
    compare the performance of OCCI and ODBC.
    I was using the Oracle 10g(ver10.2.0.1.0 ), Oracle instant cilent(win32-10.2.0.3-20061115), and VS 8.0.
    TNSNAMES.ora:
    ORCL =  
      (DESCRIPTION =
      (ADDRESS_LIST =
      (ADDRESS = (PROTOCOL = TCP)(HOST = host_name)(PORT = 1521))
      (CONNECT_DATA =
      (SERVER = DEDICATED)
      (SERVICE_NAME = ORCL)
    (SID = ORCL)
    LISTENER.ORA:(It was created by net manager.)
    SID_LIST_LISTENER =
      (SID_LIST =
      (SID_DESC =
      (GLOBAL_DBNAME = ORCL)
      (ORACLE_HOME = F:\oracle\product\10.1.0\Db_3)
      (SID_NAME = ORCL)
    LISTENER =
      (DESCRIPTION =
      (ADDRESS = (PROTOCOL = TCP)(HOST = HOST_NAME)(PORT = 1521))
    The sqlnet.ora file was writen to trace the client sql. Fortunately, my C++ program can access the oracle and get my result back successfully. In the same time, the trace files
    can be created, but when using the tkprof tool to explain it, it comes to the file with useless information.
    One of the *.trc file explaind by tkprof tool:
    Sort options: default
    count = number of times OCI procedure was executed
    cpu = cpu time in seconds executing
    elapsed = elapsed time in seconds executing
    disk = number of physical reads of buffers from disk
    query = number of buffers gotten for consistent read
    current = number of buffers gotten in current mode (usually for update)
    rows = number of rows processed by the fetch or execute call
    Trace file: ora21763.trc
    Trace file compatibility: 8.00.04
    Sort options: default
    1 session in tracefile.
    0 user SQL statements in trace file.
    0 internal SQL statements in trace file.
    0 SQL statements in trace file.
    0 unique SQL statements in trace file.
    327 lines in trace file.
    Finally, I got TNS-12518 TNS-12564 error. I tried to add DIRECT_HANDOFF_TTC_LISTENER=OFF, but it didnt work. I traced the listener, the error occured in the listener.trc "
    ntt2err: soc 464 error " and " nsbequeath: error reading REDIR/NSE msg".
    I just cann't get the right trace file and cann't sovle the two errors(TNS-12518 TNS-12564). Can somebody give me some advices, please.

    Hi,
    The TKPROF facility accepts as input an SQL trace file generated when SQL Trace has been turned on for the system or a session, not a SQL*NET trace file. A SQL*Net trace file is a dump of raw data packets and communications at the SQL*NET layer. If you want to get performance statistics from SQL beign executed by your application, then you need to turn on SQL Trace not SQL*MET tracing.
    To enable SQL trace at the system level, you need to execute:
    alter system set SQL_TRACE=TRUE
    The NS-12518 TNS-12564 normally means you are running into some sort of resource deletion issue. This can be caused by various things. Make sure you are properly cleaning up and closing sessions in your application.
    Are you performing some sort of stress test or have you just written a Multi-threaded test harness that executes different types of SQL with OCCI/ODBC?
    HTH
    J.B.

  • What is the difference between tkprof and explainplan

    Hi,
    what is the difference between tkprof and explainplan.

    Execution Plans and the EXPLAIN PLAN Statement
    Before the database server can execute a SQL statement, Oracle must first parse the statement and develop an execution plan. The execution plan is a task list of sorts that decomposes a potentially complex SQL operation into a series of basic data access operations. For example, a query against the dept table might have an execution plan that consists of an index lookup on the deptno index, followed by a table access by ROWID.
    The EXPLAIN PLAN statement allows you to submit a SQL statement to Oracle and have the database prepare the execution plan for the statement without actually executing it. The execution plan is made available to you in the form of rows inserted into a special table called a plan table. You may query the rows in the plan table using ordinary SELECT statements in order to see the steps of the execution plan for the statement you explained. You may keep multiple execution plans in the plan table by assigning each a unique statement_id. Or you may choose to delete the rows from the plan table after you are finished looking at the execution plan. You can also roll back an EXPLAIN PLAN statement in order to remove the execution plan from the plan table.
    The EXPLAIN PLAN statement runs very quickly, even if the statement being explained is a query that might run for hours. This is because the statement is simply parsed and its execution plan saved into the plan table. The actual statement is never executed by EXPLAIN PLAN. Along these same lines, if the statement being explained includes bind variables, the variables never need to actually be bound. The values that would be bound are not relevant since the statement is not actually executed.
    You don’t need any special system privileges in order to use the EXPLAIN PLAN statement. However, you do need to have INSERT privileges on the plan table, and you must have sufficient privileges to execute the statement you are trying to explain. The one difference is that in order to explain a statement that involves views, you must have privileges on all of the tables that make up the view. If you don’t, you’ll get an “ORA-01039: insufficient privileges on underlying objects of the view” error.
    The columns that make up the plan table are as follows:
    Name Null? Type
    STATEMENT_ID VARCHAR2(30)
    TIMESTAMP DATE
    REMARKS VARCHAR2(80)
    OPERATION VARCHAR2(30)
    OPTIONS VARCHAR2(30)
    OBJECT_NODE VARCHAR2(128)
    OBJECT_OWNER VARCHAR2(30)
    OBJECT_NAME VARCHAR2(30)
    OBJECT_INSTANCE NUMBER(38)
    OBJECT_TYPE VARCHAR2(30)
    OPTIMIZER VARCHAR2(255)
    SEARCH_COLUMNS NUMBER
    ID NUMBER(38)
    PARENT_ID NUMBER(38)
    POSITION NUMBER(38)
    COST NUMBER(38)
    CARDINALITY NUMBER(38)
    BYTES NUMBER(38)
    OTHER_TAG VARCHAR2(255)
    PARTITION_START VARCHAR2(255)
    PARTITION_STOP VARCHAR2(255)
    PARTITION_ID NUMBER(38)
    OTHER LONG
    DISTRIBUTION VARCHAR2(30)
    There are other ways to view execution plans besides issuing the EXPLAIN PLAN statement and querying the plan table. SQL*Plus can automatically display an execution plan after each statement is executed. Also, there are many GUI tools available that allow you to click on a SQL statement in the shared pool and view its execution plan. In addition, TKPROF can optionally include execution plans in its reports as well.
    Trace Files and the TKPROF Utility
    TKPROF is a utility that you invoke at the operating system level in order to analyze SQL trace files and generate reports that present the trace information in a readable form. Although the details of how you invoke TKPROF vary from one platform to the next, Oracle Corporation provides TKPROF with all releases of the database and the basic functionality is the same on all platforms.
    The term trace file may be a bit confusing. More recent releases of the database offer a product called Oracle Trace Collection Services. Also, Net8 is capable of generating trace files. SQL trace files are entirely different. SQL trace is a facility that you enable or disable for individual database sessions or for the entire instance as a whole. When SQL trace is enabled for a database session, the Oracle server process handling that session writes detailed information about all database calls and operations to a trace file. Special database events may be set in order to cause Oracle to write even more specific information—such as the values of bind variables—into the trace file.
    SQL trace files are text files that, strictly speaking, are human readable. However, they are extremely verbose, repetitive, and cryptic. For example, if an application opens a cursor and fetches 1000 rows from the cursor one row at a time, there will be over 1000 separate entries in the trace file.
    TKPROF is a program that you invoke at the operating system command prompt in order to reformat the trace file into a format that is much easier to comprehend. Each SQL statement is displayed in the report, along with counts of how many times it was parsed, executed, and fetched. CPU time, elapsed time, logical reads, physical reads, and rows processed are also reported, along with information about recursion level and misses in the library cache. TKPROF can also optionally include the execution plan for each SQL statement in the report, along with counts of how many rows were processed at each step of the execution plan.
    The SQL statements can be listed in a TKPROF report in the order of how much resource they used, if desired. Also, recursive SQL statements issued by the SYS user to manage the data dictionary can be included or excluded, and TKPROF can write SQL statements from the traced session into a spool file.
    How EXPLAIN PLAN and TKPROF Aid in the Application Tuning Process
    EXPLAIN PLAN and TKPROF are valuable tools in the tuning process. Tuning at the application level typically yields the most dramatic results, and these two tools can help with the tuning in many different ways.
    EXPLAIN PLAN and TKPROF allow you to proactively tune an application while it is in development. It is relatively easy to enable SQL trace, run an application in a test environment, run TKPROF on the trace file, and review the output to determine if application or schema changes are called for. EXPLAIN PLAN is handy for evaluating individual SQL statements.
    By reviewing execution plans, you can also validate the scalability of an application. If the database operations are dependent upon full table scans of tables that could grow quite large, then there may be scalability problems ahead. On the other hand, if large tables are accessed via selective indexes, then scalability may not be a problem.
    EXPLAIN PLAN and TKPROF may also be used in an existing production environment in order to zero in on resource intensive operations and get insights into how the code may be optimized. TKPROF can further be used to quantify the resources required by specific database operations or application functions.
    EXPLAIN PLAN is also handy for estimating resource requirements in advance. Suppose you have an ad hoc reporting request against a very large database. Running queries through EXPLAIN PLAN will let you determine in advance if the queries are feasible or if they will be resource intensive and will take unacceptably long to run.

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

  • How do I create an 'upload facility" for my website using Muse.

    How do I create an 'upload facility" for my website using Muse.  We are a print company and is how we receive most of our work.
    Iain

    Hey Iggy,
    These might help:
    Muse
    http://tv.adobe.com/watch/introducing-business-catalyst/getting-started-with-business-cata lyst-and-muse-what-is-business-catalyst
    http://tv.adobe.com/watch/introducing-business-catalyst/getting-started-with-business-cata lyst-and-muse-creating-and-publishing-sites
    -Dave

  • How can i view and apply new custom patterns without going to preset manager? i had this facility but have now lost it

    how can i view and apply new custom patterns without going to preset manager? i had this facility but have now lost it.  i design patterns but am fairly new to photoshop. i used to be able to click on the drop down menu in patterns in the 'fill' box but cannot now do this.  have i inadvertently clicked on something to turn this facility off?  i now have to go to 'preset manager' and manually move my new design to the first box and click 'done' so that i can use it.

    Which version of photoshop are you using?
    After you define a custom pattern it should be added to the bottom of whatever patterns are already loaded.
    For example, if you define a custom pattern and then go to Edit>Fill>Pattern, the newly defined pattern should have been added to the existing loaded patterns.

  • TKPROF report, performance issue

    Part of the tkprof listed:
    UPDATE JS_CM_TP tp
    SET (tp.crs_emlkey, tp.tp_crs_conn_aid, tp.tp_crs_conn_type) = (
    SELECT crs_emlkey, crs.crs_to_tp_aid, crs.crs_xctype FROM JS_CM_CRS crs
    WHERE (crs.ne_id = tp.ne_id) AND ( tp.tp_id = crs.crs_from_tp_id)
    AND ROWNUM < 2
    WHERE (NULL IS NULL OR tp.ne_id = NULL) AND (tp.crs_emlkey IS NULL)
    call count cpu elapsed disk query current rows
    Parse 1 0.01 0.00 0 2 0 0
    Execute 1 197.40 464.30 0 6247609 2127652 2081272
    Fetch 0 0.00 0.00 0 0 0 0
    total 2 197.41 464.31 0 6247611 2127652 2081272
    Misses in library cache during parse: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: 34
    Rows Row Source Operation
    0 UPDATE JS_CM_TP (cr=6247825 pr=0 pw=0 time=330337082 us)
    2081272 PX COORDINATOR (cr=3 pr=0 pw=0 time=70981442 us)
    0 PX SEND QC (RANDOM) :TQ10000 (cr=0 pr=0 pw=0 time=0 us)
    0 PX BLOCK ITERATOR (cr=0 pr=0 pw=0 time=0 us)
    0 TABLE ACCESS FULL JS_CM_TP (cr=0 pr=0 pw=0 time=0 us)
    16 COUNT STOPKEY (cr=6247534 pr=0 pw=0 time=67715446 us)
    16 TABLE ACCESS BY INDEX ROWID JS_CM_CRS (cr=6247534 pr=0 pw=0 time=58920730 us)
    16 INDEX RANGE SCAN CRS_INDEX1 (cr=6247518 pr=0 pw=0 time=52633611 us)(object id 35745)
    where JS_CM_TP is a table with 3 millions records, the others are in the range of x00,000. tp.ne_id and crs.ne_id both are indexed.
    I know this is a pretty bad query. Don't know why the index is not used (on tp.ne_id) instead a full table access is used (optimizer is ALL_ROWS).
    Thanks.
    - Zac

    do you have an index on ne_id and crs_from_t_id in js_cm_crs
    query also looks wrong. 'tp.ne_id = NULL' is not valid syntatically. Make sure you posted the same the query for which you generated the trace.
    Message was edited by:
    adchanana

  • I have written a little book on 'Pages' initially I was able to download it to friends, however, this facility is now not working. Can anyone tell me what I can do to resolve this. Please.

    I have just written a little book, on my iPad, using 'Pages' I was able to download it for proofreading, however, this facility has now ceased.  When I press 'send' it makes the 'rushing sound' but in fact does not download!
    Please will someone help, I am an old man, 82 years old, and need all the help I can get!

    Have you tried restarting or resetting your iPad?
    Restart: Press On/Off button until the Slide to Power Off slider appears, select Slide to Power Off and, after It shuts down, press the On/Off button until the Apple logo appears.
    Reset: Press the Home and On/Off buttons at the same time and hold them until the Apple logo appears (about 10-15 seconds).
    No data will be lost.

  • Ora-00604 error while taking tkprof of a trace file

    Sorry i am giving the full erro but omitting exact table names
    Hi ,
    I have an error while taking tkprof of a trace file.
    I gave the following command ---
    tkprof <source.trc> <file.prc> sys=no sort=exeela,fchela,prsela explain= /
    error is --
    Error in create table of EXPLAIN PLAN table : unix_session_user.prof$paln_table
    ORA-00604: error occurred at recursive SQL level 1
    ORA-20001: Step-6:DDL
    Event Security. You are not permitted to perform the requested structural
    changes to PROF (TABLE)
    Event triggered : CREATE
    ora_login_user
    (session_user) : unix_session_user(dummy)
    Search : select count(*) from
    tabl(dummy table name) where obj_name like '%\%%' escape '\' and obj_type =
    'TABLE' and obj_type = 'USER' and ( event_CREATE = 'Y' or status =
    'Override')
    ORA-06512: at line 162
    ORA-06510: PL/SQL: unhandled
    user-defined exception
    EXPLAIN PLAN option disabled.
    i searched for the error and in oracle forum i found a solution .. http://forums.oracle.com/forums/thread.jspa?threadID=844287&tstart=0
    but after giving the table option it is giving the same error
    tkprof <source.trc> <file.prc> sys=no sort=exeela,fchela,prsela table=old_schema.plan_table explain= /
    it again gave the same error.
    In both two cases it gives elapsed time results,library cache missing etc but before giving this it throws ORA-00604 error as stated above
    then i again correct the tkprof statement ..
    tkprof <source.trc> <file.prc> sys=no sort=exeela,fchela,prsela table=new_schema.plan_table explain= /
    say this schema name here i used is dummy schema name.
    My question is did this error came as we had not sufficient previlages in the old_schema but that previleges we have in new_schema?
    My databse version is 9.2.0.4.0
    Thanks in advance
    Edited by: bp on Feb 3, 2009 11:36 PM
    Edited by: bp on Feb 3, 2009 11:40 PM

    Please post here full error message, there should be lines with ORA-00604 and then some other ORA as well.
    And are there any trace files generated during this error?
    And as You can see from error description, probably You will have to contact with Oracle support in order to solve this case:
    oerr ora 00604
    00604, 00000, "error occurred at recursive SQL level %s"
    // *Cause:  An error occurred while processing a recursive SQL statement
    // (a statement applying to internal dictionary tables).
    // *Action: If the situation described in the next error on the stack
    // can be corrected, do so; otherwise contact Oracle Support.

  • After upgrading to Lion, Preview (5.2.2) appears to have lost the facility to run a slide show by using my mouse to click an icon in the visible menu bar, as I could in the previous version.  Can I retrieve that icon and thus that facility?

    After upgrading to Lion, Preview (5.2.2) appears to have lost the facility to run a slide show by using my mouse to click an icon in the visible menu bar, as I could in the previous version.  Can I retrieve that icon and thus that facility?

    Unfortunately not. Lion has made many adjustments to the previous system. Try opening your pdfs in keynote.

  • How do I use my Email facility

    I am a new Blackberry user and being of advanced years find some of the new technology difficult to understand.  I have now posted 3 questions on this forum and have been delighted with the help I have received.
    My 4th question is as follows:
    I have now updated the phone from my service provider (Orange) and now have an "Orange World" browser which gives me access to the internet and with this I have no problems.
    From the same source I also have an Email facility and would appreciate some help. 
    I have 2 email addresses one is @demon.co.uk and the other is @virgin.net.  I do not want any more.  When I am away from home I would like to be able to redirect my incoming Emails to my Blackberry and be able to reply to them by Blackberry but when I am back home receive them on my desktop as normal.
    Is this possible and if so how do I set it up?
    oldwulf
    Solved!
    Go to Solution.

    You don't need to worry about BB fetching all emails and leaving none on the server for you to download via your regular email client on the computer. The way BB's mail service is (normally) working is to push a copy of the email to your handheld device, while leaving a copy on the server. Now, if this wold prove to be untrue, there's bound to be a setting for always leaving a copy. Log in to your email settings page via a web browser on the computer, to familiarize yourself with the options. To get there, you might need to have a word with your operator. In my case, they didn't know, but using the url: operatorname.blackberry.com did the trick. You can also do this from the bb phone, and you need to set up a user login.
    The second part of your question is about syncronizing your email box on the computer with the inbox on the phone. I don't have a straight answer but there are ways to do it. For example, when you download email to your computer it is usually done via a protocol called POP. If you can change this to another protocol, called IMAP, it will synch the inbox folders on every client you are using with the email server so that you never have to read an email twice. But that is if your ISP / email provider can enable this. And having said that, I'm pretty sure there is a smarter way, let's leave room for someone else to provide a better answer.

  • I am having a problem sending photos by way of the share facility in iPhoto.  I have looked in accounts and i cloud is not listed as an option.  I removed MobileMe and reloaded it and that enabled me to send the photos but then the email didn't arrive

    When I first tried to email photos from the share facility of iPhoto 9.2.3 I received a message something along the lines of server didn't recognise your id and password.  Read other peoples posts that suggested removing and reloading icloud in the iPhone account section.  No icloud in my accounts  just email and mobile me so I removed and reloaded mobile me.  After that I sent a test email to myself.  It arrived eventually but disappeared the instant I tried to open it.  Shut down my Macbook completely and then switched it on again with exactly the same results.  I am using OS X 10.7.4.  Can anyone tell me how to get icloud as an option for my iPhoto emails?  I use icloud for my normal emails.

    I've resolved my problem now.  It wasn't iphoto: preferences:@ that I needed but iphoto:preferences:general where there is the option to choose email for sending photos.  Can't believe I missed that before.

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

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

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

  • How do I pay for my storage plan on iCloud?  I have followed the instructions "tap for account" but there is no facility to do this?  Help!

    How do I pay for my storage plan on iCloud?  I have followed the instructions but there is no facility to do this.  Help!

    Hi there jeanirismary,
    You may find the information in the article below helpful.
    iCloud storage upgrades and downgrades
    -Griff W.  

  • Stuck at "grey screen of death", disk I/O errors, Facility com.apple.system

    Good morning everybody!
    Yesterday, my MacBook Air revB crashed upon trying to open an mp4 video. I had to press and hold the power button until switch-off. After this, the machine wouldn't start in either normal or safe mode, but was stuck on the grey screen with the Apple logo and the spinning wheel. A start attempt in verbose mode revealed the error "[Level 3] [ReadUID 0] [Facility com.apple.system.fs] [ErrType IO] [ErrNo 6] [IOType Read]", occurring twice. After this, some normal startup posts appeared, but each after a very long time, and preceded by the name of my harddisk and "IO error". Therefore, the system hung doe to not being able to read from the disk what it wanted to read for start-up. I booted into single user mode and used the find command to search "com.apple.system.fs" from root. It was not found. I verified the find command by searching something else, and that was found. Now I renamed my User folder in single user mode and rebooted in verbose mode. The Facility com.apple.system.fs persisted, but afterwards the system booted normally, no chain of disk IO errors. I deleted the User folder that had been newly created due to renaming the old one, and changed the old one's name back to its original value. Afterwards, the system booted normally without any errors, including the "com.apple.system.fs" one. The S.M.A.R.T. status of the disk was and is "SMARTOK". In order to find this out, I opened the console, whereupon the system crashed again. Only after 20 min of 1 s-long windows of opportunity (when the beachball disappeared) was I able to force-quit the console by invoking alt-cmd-esc, and the system continued to respond normally. There are obviously corrupt log files producing the very same read errors that had originally caused the system to hang during boot. Does anybody now what is going on?
    The best,

    Hey there,
    I reread your original post... The problem to me is that what you did to make it boot again doesn't make much sense. Nothing in your home directory prevents the system from booting.
    You said that the system hung when you had Console open. Most of the log files shown there are in /var/log, /Library/Logs some are also in your User directory in ~/Library/Logs, you could try deleting everything inside...
    Why renaming your home folder changed anything is a mystery to me. The only theory I have is general file system corruption that got repaired during one of those bootups due to an automated fsck. That or the system deleted and recreated invalid plist files.
    Mac OS has important files in /Library and /System/Library. The ones in System belong to the System and are not supposed to be touched. The ones in /Library are open for Applications to add their own System-wide Configuration settings etc. The same structure exists in your home directory ~/Libary. Usually the most interesting areas in your home directory are ~/Library/Application Support and ~/Library/Preferences. However as I previously said nothing in your home directory would keep the system from booting. It would always go to the blue screen before the login screen would appear (even when you have auto login on).
    Good luck!

Maybe you are looking for