How to find the time taken for creating execution plan alone

Hi,
Is there any way to find out the division between the time taken for query parsing, creating execution plan and actual data retrieval seperately? If I enable 'set timing on' I see the elapsed time which is the total time taken for all these 3.
Some of my queries are taking long time when I run it first time and so want to know what is it taking long, is it the parsing the query or creating the execution plan? (Since my queries run faster second time, I am assuming the major part was for parsing or creating the plan but not the data retrieval).
Also, where does Oracle keep the execution plan? Is it in the BUFFER_CACHE? if so, I tried flushing the buffer_cache and restarting the DB as well, but still the query execution seems faster compared to the first time. How long does Oracle keep the execution plan in the cache and is there anyway to increase this cache size?
Thanks in advance!

user13169027 wrote:
Hi,
Is there any way to find out the division between the time taken for query parsing, creating execution plan and actual data retrieval seperately? If I enable 'set timing on' I see the elapsed time which is the total time taken for all these 3.
Some of my queries are taking long time when I run it first time and so want to know what is it taking long, is it the parsing the query or creating the execution plan? (Since my queries run faster second time, I am assuming the major part was for parsing or creating the plan but not the data retrieval).
The ideal way for finding the answer to your questions above, would be to perform a (sql) trace of your query executions. To see the difference in the trace-files, you might want to trace the first execution in one session, and the second execution in another session: so you get two different trace files, which you can then seperately tkprof, and investigate.
Also, where does Oracle keep the execution plan? Is it in the BUFFER_CACHE? if so, I tried flushing the buffer_cache and restarting the DB as well, but still the query execution seems faster compared to the first time. How long does Oracle keep the execution plan in the cache and is there anyway to increase this cache size?
Execution plans are held in the shared-pool, not the buffer-cache. As far as I know they will be kept in memory in an LRU way (least recently used), just like db-blocks are in the buffer-pool (I know this is not entirely correct, but for all practical purposes, think of it this way).

Similar Messages

  • How to analyse the time taken for a query

    Hey gurus ,
                          How to find the time taken for a query to execute .
    Regards,
    Venkatesh

    Hi,
    Time taken to execute a query = FRONT END TIME + OLAP TIME + DB TIME.
    front end time is time taken to do format in BEX.
    olap time is time taken to aggegate data in OLAP buffer.
    db time is tme taken to collect data at data target.
    to fine all these information
    goto RSRT -> give query name -> execute+debug -> it will display all the fields > check fields what ever u want.
    Regards,
    Haritha.

  • How to find the time stamp for delata

    Hi Analysts,
    I am loading data from R/3 to InfoProvider(Cube or ODS) with delta update.
    I have seen nodata was loaded to InfoProvider. But data was available at DataSource. then new delta is started. i want to load the last delta again.
    How to see the time stamp of delta?
    How to load that delta data?
    Please help me in this need.
    Hari.

    Dear Srihari,
    if your last delta failed then you can request it again by calling the same delta infopackage again, it will ask for repeat delta (in case last delta has failed), go and run it.
    this way you can have your delta figurs back, and do upload via PSA.
    Hope it helps.

  • How to find the number of references created for a given  object ??

    How to find the number of references created for a given object in a big application environment.
    That means, if i give any object name (of my application) as input, then how can i find the[b] number of references created for that particular object ??

    Please do not post the same question multiple times.
    As for your original question, there is no direct way to do it.
    Especially not the way you phrased it,
    since objects don't have "names".
    Applications also don't have "names".
    They have classes and instances.
    Also, there are 2 related issues, and I'm not sure which one is the one you asked.
    #1. Finding the number of references to the same object.
    Eg.
    Map<String,String> a = new HashMap<String,String>();
    Map<String,String> b = new HashMap<String,String>();
    Map<String,String> c = a;In this case, there are only 2 objects.
    The first object has (at least) 2 references pointing to it.
    The second object has (at least) 1 reference pointing to it.
    (There may be more, if the HashMap library keeps
    references to these things, or if the HashMap object has
    some internal cyclic references...)
    If you're asking this, then it can't be done.
    It's an active research topic in universities
    and software research labs, called "alias analysis".
    Type it in google, and you'll see people are working hard
    and having little success so far.
    #2. Finding the number of instances created from a class.
    In this case, what you have to do is to add a counter to
    the constructor of the class. Every time an object is constructed,
    you increment the counter. Like this:
       class MyClass
           public static int counter = 0;
           public MyClass( )  { counter++; }
        // Then later in your program, you can do this:
        MyClass a = new MyClass();
        MyClass b = new MyClass();
        System.out.println(MyClass.counter); // It should show 2Note: you won't be able to do this to every class in the system.
    For every class you care about, you have to modify its constructor.
    Also: when an object is deleted, you won't always know it
    (and thus you won't always be able to decrement the counter).
    Finalizers cannot always work (read Joshua Bloch's
    "Effective Java" book if you don't believe me), but basically
    (1) finalizers will not always be called, and
    (2) finalizers can sometimes cause objects to not be deleted,
    and thus the JVM will run out of memory and crash

  • How to find the TCODE that is created for the table maintanance generator

    Hi ,
    How to find the TCODE that is created for the table maintanance generator of particular table,if we only know the table name.
    Regards
    Ramakrishna L

    Hello,
    I try it this way
    1. Goto SE16 --> enter table TSTCP.
    2. In the selection-screen displayed, enter
    PARAM = *<ZTABNAME>*
    You will get the t-code for the TMG.
    BR,
    Suhas
    PS: Are you sure a t-code has been created for this TMG ?

  • How to find the time difference..?

    HI
    How to find the time difference between two times
    for Example
    the difference between '24/10/2005 8:25:00 PM' and '25/10/2005 5:20:00 AM'
    is 8.55
    Kris

    This is a procedure taht do the job
    CREATE OR REPLACE FUNCTION Diff_Time
         LD$Date_Deb IN DATE DEFAULT SYSDATE
         ,LD$Date_Fin IN DATE DEFAULT SYSDATE
         ,LN$JJ       OUT PLS_INTEGER
         ,LN$HH       OUT PLS_INTEGER
         ,LN$MI       OUT PLS_INTEGER
         ,LN$SS       OUT PLS_INTEGER
      ) RETURN NUMBER
    IS
      dif   NUMBER ;
    BEGIN
      IF LD$Date_Fin < LD$Date_Deb THEN
         RETURN ( -1 ) ;
      END IF ;
      SELECT  LD$Date_Fin - LD$Date_Deb INTO dif  FROM dual ;
      SELECT  TRUNC ( LD$Date_Fin - LD$Date_Deb)  INTO LN$JJ  FROM dual ;
      SELECT  TRUNC ( (LD$Date_Fin - LD$Date_Deb) * 24) -  ( LN$JJ * 24 ) INTO LN$HH FROM dual ;
      SELECT  TRUNC ( (LD$Date_Fin - LD$Date_Deb) * 1440) - ( (LN$HH * 60) + ( LN$JJ * 1440) ) INTO LN$MI FROM dual ;
      SELECT  TRUNC ( (LD$Date_Fin - LD$Date_Deb) * 86400) - ( (LN$MI * 60) + (LN$HH * 3600) + ( LN$JJ * 3600 * 24 ) ) INTO LN$SS FROM dual ;
      RETURN( dif ) ;
    END ;
    /You may have to modify it to fit your own requirement.
    Francois

  • How to find the customer exits for a particular transaction

    hi
    how to find the customer exits for a particular transaction

    Hi jyothsna vankadari ,
    ther is a convenient way to find all BADIS called. You may know that BADIS are the newer version of EXITs.
    I would suggest you to go for BADI.
    Follow the below steps to find out what all BADI's are called when you press any button in any transaction.
    1) Goto se24 (Display class cl_exithandler)
    2) Double click on the method GET_INSTANCE.
    3) Put a break point at Line no.25 (CASE sy-subrc).
    Now
    4) Execute SAP standard transaction
    5) Press the required button for which you need to write an exit logic, the execution will stop at the break point.
    6) Check the values of variable 'exit_name', it will give you the BADI name called at that time.
    7) This way you will find all the BADIs called on click of any button in any transaction.
    Regards,
    Clemens

  • How to find the Invoice available for Purchase orders

    Hi friends,
    How to find the Invoice available for PO. Please give me the tcodes also.
    Is one PO can have multiple Invoice, then what is the relation between those PO and Invoices.
    Thanks,
    Veerendra.

    Hi,
    Goto ME23N and in the line item choose the PO History tab..
      There you can check if there is any invoice created for that PO..
      Yes one PO can have multiple invoices...
      Check the table RSEG where it has references to a PO and PO line items..
    THanks,
    Naren

  • How to find the standard Idoc for Transfer Order (LT03)

    hi
    How to find the standard Idoc for Transfer Order (LT03)
    How to create the Idoc on LT03
    plz help me out
    Thank u
    Ram

    Someone is using FM: L_IDOC_INPUT_WMTORD, message type WMTORD and basic type WMTOID01 in doing this when trying to send an Idoc to an external system when a transfer order for a delivery note is created (LT03). Is it OK
    Please reward points

  • How to find the BTE event for FBCJ transaction code

    Hi All,
            i need to find the BTE event for Finance related transaction codes.i checked in the SWEL transaction code, didnt find any event triggered and the standard BADI doesnt suite my requirement.The transaction code  which i tried is FBCJ.can anyone help me how to find the BTE event for the above mentioned transaction.
    Thanks in Advance,
    lokesh kumar.K

    Hello Lokesh,
    The following is one of the process of finding a BTE and implementing it.
    (1)Goto transction FIBF .Execute it with Attribute type = 'A'. Then in the menubar Environment->Info System (P/S )
           Go through the list of BTE's available with the description available beside.
    (2)Select the BTE you want to implement.
    (3)Press button Sample function module
    (4)This brings you to SE37 - Copy the sample function module to a Z-function module (First create a new function group for the function module) . Note: The name of the Z-functionmodule is not important
    (5)Edit the code in the new function module
    (6)Go back to transaction FIBF - Menu Settings->Products -> Of a customer and create a new product whicj identifies the new product . Remember to mark the Active field.
    (7)Go back to FIBF menu Settings->P/S function modules->of a customer - Create an entry that links the BTE and Product with the new function module
    Hope this will help.
    Regards,
    Samson

  • How to  find the user exit for a screen..

    Hi,
    plz help me how to find the user exit for a screen..?
    Regards
    Anbu

    Hi,
    check this program this will give you the list of user-exit and BADI for the perticular Tcode.
    REPORT  zuserexit_badi.
    TABLES : tstc,
    tadir,
    modsapt,
    modact,
    trdir,
    tfdir,
    enlfdir,
    sxs_attrt ,
    tstct.
    DATA : jtab LIKE tadir OCCURS 0 WITH HEADER LINE.
    DATA : field1(30).
    DATA : v_devclass LIKE tadir-devclass.
    PARAMETERS : p_tcode LIKE tstc-tcode,
    p_pgmna LIKE tstc-pgmna .
    DATA wa_tadir TYPE tadir.
    START-OF-SELECTION.
      IF NOT p_tcode IS INITIAL.
        SELECT SINGLE * FROM tstc WHERE tcode EQ p_tcode.
      ELSEIF NOT p_pgmna IS INITIAL.
        tstc-pgmna = p_pgmna.
      ENDIF.
      IF sy-subrc EQ 0.
        SELECT SINGLE * FROM tadir
        WHERE pgmid = 'R3TR'
        AND object = 'PROG'
        AND obj_name = tstc-pgmna.
        MOVE : tadir-devclass TO v_devclass.
        IF sy-subrc NE 0.
          SELECT SINGLE * FROM trdir
          WHERE name = tstc-pgmna.
          IF trdir-subc EQ 'F'.
            SELECT SINGLE * FROM tfdir
            WHERE pname = tstc-pgmna.
            SELECT SINGLE * FROM enlfdir
            WHERE funcname = tfdir-funcname.
            SELECT SINGLE * FROM tadir
            WHERE pgmid = 'R3TR'
            AND object = 'FUGR'
            AND obj_name EQ enlfdir-area.
            MOVE : tadir-devclass TO v_devclass.
          ENDIF.
        ENDIF.
        SELECT * FROM tadir INTO TABLE jtab
        WHERE pgmid = 'R3TR'
        AND object IN ('SMOD', 'SXSD')
        AND devclass = v_devclass.
        SELECT SINGLE * FROM tstct
        WHERE sprsl EQ sy-langu
        AND tcode EQ p_tcode.
        FORMAT COLOR COL_POSITIVE INTENSIFIED OFF.
        WRITE:/(19) 'Transaction Code - ',
        20(20) p_tcode,
        45(50) tstct-ttext.
        SKIP.
        IF NOT jtab[] IS INITIAL.
          WRITE:/(105) sy-uline.
          FORMAT COLOR COL_HEADING INTENSIFIED ON.
    Sorting the internal Table
          SORT jtab BY object.
          DATA : wf_txt(60) TYPE c,
          wf_smod TYPE i ,
          wf_badi TYPE i ,
          wf_object2(30) TYPE c.
          CLEAR : wf_smod, wf_badi , wf_object2.
    Get the total SMOD.
          LOOP AT jtab INTO wa_tadir.
            AT FIRST.
              FORMAT COLOR COL_HEADING INTENSIFIED ON.
              WRITE:/1 sy-vline,
              2 'Enhancement/ Business Add-in',
              41 sy-vline ,
              42 'Description',
              105 sy-vline.
              WRITE:/(105) sy-uline.
            ENDAT.
            CLEAR wf_txt.
            AT NEW object.
              IF wa_tadir-object = 'SMOD'.
                wf_object2 = 'Enhancement' .
              ELSEIF wa_tadir-object = 'SXSD'.
                wf_object2 = ' Business Add-in'.
              ENDIF.
              FORMAT COLOR COL_GROUP INTENSIFIED ON.
              WRITE:/1 sy-vline,
              2 wf_object2,
              105 sy-vline.
            ENDAT.
            CASE wa_tadir-object.
              WHEN 'SMOD'.
                wf_smod = wf_smod + 1.
                SELECT SINGLE modtext INTO wf_txt
                FROM modsapt
                WHERE sprsl = sy-langu
                AND name = wa_tadir-obj_name.
                FORMAT COLOR COL_NORMAL INTENSIFIED OFF.
              WHEN 'SXSD'.
    For BADis
                wf_badi = wf_badi + 1 .
                SELECT SINGLE text INTO wf_txt
                FROM sxs_attrt
                WHERE sprsl = sy-langu
                AND exit_name = wa_tadir-obj_name.
                FORMAT COLOR COL_NORMAL INTENSIFIED ON.
            ENDCASE.
            WRITE:/1 sy-vline,
            2 wa_tadir-obj_name HOTSPOT ON,
            41 sy-vline ,
            42 wf_txt,
            105 sy-vline.
            AT END OF object.
              WRITE : /(105) sy-uline.
            ENDAT.
          ENDLOOP.
          WRITE:/(105) sy-uline.
          SKIP.
          FORMAT COLOR COL_TOTAL INTENSIFIED ON.
          WRITE:/ 'No.of Exits:' , wf_smod.
          WRITE:/ 'No.of BADis:' , wf_badi.
        ELSE.
          FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
          WRITE:/(105) 'No userexits or BADis exist'.
        ENDIF.
      ELSE.
        FORMAT COLOR COL_NEGATIVE INTENSIFIED ON.
        WRITE:/(105) 'Transaction does not exist'.
      ENDIF.
    AT LINE-SELECTION.
      DATA : wf_object TYPE tadir-object.
      CLEAR wf_object.
      GET CURSOR FIELD field1.
      CHECK field1(8) EQ 'WA_TADIR'.
      READ TABLE jtab WITH KEY obj_name = sy-lisel+1(20).
      MOVE jtab-object TO wf_object.
      CASE wf_object.
        WHEN 'SMOD'.
          SET PARAMETER ID 'MON' FIELD sy-lisel+1(10).
          CALL TRANSACTION 'SMOD' AND SKIP FIRST SCREEN.
        WHEN 'SXSD'.
          SET PARAMETER ID 'EXN' FIELD sy-lisel+1(20).
          CALL TRANSACTION 'SE18' AND SKIP FIRST SCREEN.
      ENDCASE.
    Reagards,
    Bharat.

  • How to find the text id for the text in the sales order

    Hi all,
    How to find the text id for the item-text in the sales order?
    There are different Text available in  the sales order under item like Warehouse instruction, CSR instruction...
    I want to know the corresponding Text id for the text ELECTRONIC ORDER COMMENT.
    Table TTXID contains the validation of the Text id.
    Please help me in knowing the way to identify the text-id from the text list..
    Thanks foryour help
    Suresh Kumar

    U can fetch the texts for the items using
    Read_text.
    Example:
        g_f_tdname = xvttp-vbeln.
        g_f_obj = p_obj.
        g_f_langu = 'DE'.
        REFRESH g_t_lines.
        CLEAR g_t_lines.
        CALL FUNCTION 'READ_TEXT'
             EXPORTING
                  id                      = p_var
                  language                = g_f_langu
                  name                    = g_f_tdname
                  object                  = g_f_obj
             TABLES
                  lines                   = g_t_lines
             EXCEPTIONS
                  id                      = 1
                  language                = 2
                  name                    = 3
                  not_found               = 4
                  object                  = 5
                  reference_check         = 6
                  wrong_access_to_archive = 7
                  OTHERS                  = 8.
        IF sy-subrc <> 0.
         MESSAGE ID SY-MSGID TYPE SY-MSGTY NUMBER SY-MSGNO
                 WITH SY-MSGV1 SY-MSGV2 SY-MSGV3 SY-MSGV4.
        ENDIF.
    The Required fields are,
    Text-id ,language,name,object.
    Let me know if you further require help.
    Regards

  • How to find the workflow admins for all costcenters ?

    Dear SRM gurus
    We are using Classic scenario with N th step workflow with BADI.
    we have a requirement.
    How to find the workflow admins for the particular costcenters.
    we used HRV1222A where ATTRIB EQ <Z attribute>(This is our own attribute to group all the costcenters)
    used table HRP1001 to find the Admins but results are not correct because it is not showing my user id(I have all authorisations).
    Is there anyway to find all the admins for a cost center(users are more than 7000+)
    can anybody send work flow related presentations or cookbook
    Thanks in Advance.
    srinu

    hi
    I have not received any thing.Please send again
    [email protected]
    [email protected]

  • Where and how to find the storage locatation for the consignment stock

    where and how to find the storage locatation for the consignment stock (customer stock )  for more than one storage location .
    table :msku
    material no    -   werks - batch
    xxx                   sg11  - 200352ac
    table : mchb
    material no    -   werks  -lgort - batch
    xxx                   sg11   sg10   200352ac
    xxx                   sg11   gs11   200352ac
    note : each stock location having same batch no in different storage and my question how to find which link for msku to mchb .

    Hi,
    Try the table MARD: Storage Location Data for Material, where in the field LABST will give the stock field, against a given material/plant/Storage Loc.
    Regards,
    JLN

  • How to find the search help for the parameters stmt in a report

    hi
    how to find the search help for the parameters stmt in a report , that is using which addition to the parameters statement

    I am not sure if I understood the question,but if you meant how to attach a search help to parameter for which a default search help is not available,you can do that by using addition  "Matchcode Object"
    Parameter: a type i matchcode object 'Search Help Name'
    Search Help name should be in single quotes.
    Regards,
    Anubhav.
    P.S: Award Points if useful.

Maybe you are looking for

  • Transferring new iphone

    I have friend who just purchased a iphone 4s and wants to transfer all data from his 3gs.  He doesn't have a computer and wants to do it on my computer.  Can he just sign into his itunes account on my computer, backup his old iphone and then restore

  • Change project size after recording

    Is it possible to change the project screen size after it has already been recorded? I have a presentation that was recorded at 670 px tall and would really like to shrink it back down to 800 X 600 so it can fit in a browser window without scrolling.

  • Help with the alarm clock, please!

    i'm using the ipod mini, and every morning the alarm clock goes off with the exact same song. is it possible to make the mini choose the alarm clock's track randomly? or, at least, is it possible to choose a different song to start my morning off wit

  • Why does photo shop 9 shutdown with "request runtime to terminate" message?

    How can I correct when my Photoshop 9 shutdowns with "request for Runtime to terminate in an unusual way" message?

  • 5g video ipod owners: Don't upgrade to iTunes 7.0 (or 1.2)

    If your ipod (mine is a 5th. gen 60g version), is working well, (as mine was...), then, by all means, do NOT update to iTunes 7.0, (or the iPod to 1.2) The iTunes update seems to be o.k., but the 1.2 iPod updater totaly messed up my pod! Cannot selec