AJAX, how to check execution time of queries?

CF8, using CFDIV to bind to a CFC. The CFC has several SQL
queries, including select, insert, update, delete. I need to check
the execution time of these queries. I have the CF Ajax logger
turned on (cfdebug), but it doesn't seem to list query execution
times. I see the query execution times from normal form pages in
the log info on that page, at the bottom as normal, but not the
queries in Ajax binded CFC's.
Am I missing a server setting? I have everything checked in
the Ajax logger. Global, LogReader, http, bind, debug, info,error,
window.
Thanks in advance for any help!
Mike

I use Ajax (in CF7) a lot to access a SQL Server database. To
determine execution times for Ajax queries, I run the application
in Firefox with the "Firebug" add-on. Firebug reports the execution
of each (and every) Ajax transaction in milliseconds.

Similar Messages

  • How to extract execution time of a step

    how to extract execution time of a step ?
    This step calls another sequence, and
    I want to know how long it take to execute that seqeuence.
    I need this information during run time, not in the
    report.
    thanks.

    Hi,
    You could try.
    Enable the Record Result for the step in question.
    This will allow you to extract the TotalTime.
    Then you could use the RemoveElements(Locals.ResultList,"[0]",1) - this assumes you have only logged one result. This is the same as not recording results for that step.
    Otherwise you will have to workout the time yourself by calling the API Execution.SecondsExecuting() - API Execution.SecondsAtStart().
    Regards
    Ray Farmer
    Regards
    Ray Farmer

  • How to reduce execution time ?

    Hi friends...
    I have created a report to display vendor opening balances,
    total debit ,total credit , total balance & closing balance for the given date range. it is working fine .But it takes more time to execute . How can I reduce execution time ?
    Plz help me. It's a very urgent report...
    The coding is as below.....
    report  yfiin_rep_vendordetail no standard page heading.
    tables : bsik,bsak,lfb1,lfa1.
    type-pools : slis .
    --TABLE STRUCTURE--
    types : begin of tt_bsik,
            bukrs type bukrs,
            lifnr type lifnr,
            budat type budat,
            augdt type augdt,
            dmbtr type dmbtr,
            wrbtr type wrbtr,
            shkzg type shkzg,
            hkont type hkont,
            bstat type bstat_d ,
            prctr type prctr,
            name1 type name1,
         end of tt_bsik,
         begin of tt_lfb1,
             lifnr type lifnr,
             mindk type mindk,
         end of tt_lfb1,
        begin of tt_lfa1,
            lifnr type lifnr,
            name1 type name1,
            ktokk type ktokk,
        end of tt_lfa1,
        begin of tt_opbal,
            bukrs type bukrs,
            lifnr type lifnr,
            gjahr type gjahr,
            belnr type belnr_d,
            budat type budat,
            bldat type bldat,
            waers type waers,
            dmbtr type dmbtr,
            wrbtr type wrbtr,
            shkzg type shkzg,
            blart type blart,
            monat type monat,
            hkont type hkont,
            bstat type bstat_d ,
            prctr type prctr,
            name1 type name1,
            tdr type  dmbtr,
            tcr type  dmbtr,
            tbal type  dmbtr,
          end of tt_opbal,
         begin of tt_bs ,
            bukrs type bukrs,
            lifnr type lifnr,
            name1 type name1,
            prctr type prctr,
            tbal type dmbtr,
            bala type dmbtr,
            balb type dmbtr,
            balc type dmbtr,
            bald type dmbtr,
            bale type dmbtr,
            gbal type dmbtr,
        end of tt_bs.
    ************WORK AREA DECLARATION *********************
    data :  gs_bsik type tt_bsik,
            gs_bsak type tt_bsik,
            gs_lfb1 type tt_lfb1,
            gs_lfa1 type tt_lfa1,
            gs_ageing  type tt_ageing,
            gs_bs type tt_bs,
            gs_opdisp type tt_bs,
            gs_final type tt_bsik,
            gs_opbal type tt_opbal,
            gs_opfinal type tt_opbal.
    ************INTERNAL TABLE DECLARATION*************
    data :  gt_bsik type standard table of tt_bsik,
            gt_bsak type standard table of tt_bsik,
            gt_lfb1 type standard table of tt_lfb1,
            gt_lfa1 type standard table of tt_lfa1,
            gt_ageing type standard table of tt_ageing,
            gt_bs type standard table of tt_bs,
            gt_opdisp type standard table of tt_bs,
            gt_final type standard table of tt_bsik,
            gt_opbal type standard table of tt_opbal,
            gt_opfinal type standard table of tt_opbal.
    ALV DECLARATIONS *******************
    data : gs_fcat type slis_fieldcat_alv ,
           gt_fcat type slis_t_fieldcat_alv ,
           gs_sort type slis_sortinfo_alv,
           gs_fcats type slis_fieldcat_alv ,
           gt_fcats type slis_t_fieldcat_alv.
    **********global data declration***************
    data :   kb type dmbtr ,
              return like  bapireturn ,
              balancespgli like  bapi3008-bal_sglind,
              noteditems like  bapi3008-ntditms_rq,
              keybalance type table of  bapi3008_3 with header line,
             opbalance type p.
    SELECTION SCREEN DECLARATIONS *********************
    selection-screen begin of block b1 with frame .
    select-options : so_bukrs for bsik-bukrs obligatory,
                     so_lifnr for bsik-lifnr,
                     so_hkont for bsik-hkont,
                     so_prctr for bsik-prctr ,
                     so_mindk for lfb1-mindk,
                     so_ktokk for lfa1-ktokk.
    selection-screen end of block b1.
    selection-screen : begin of block b1 with frame.
    parameters       : p_rb1 radiobutton group rad1 .
    select-options   : so_date for sy-datum .
    selection-screen : end of block b1.
    ********************************ASSIGNING ALV GRID
    ****field catalog for balance report
    gs_fcats-col_pos = 1.
    gs_fcats-fieldname = 'BUKRS'.
    gs_fcats-seltext_m =  text-001.
    append gs_fcats to gt_fcats .
    gs_fcats-col_pos = 2 .
    gs_fcats-fieldname = 'LIFNR'.
    gs_fcats-seltext_m = text-002.
    append gs_fcats to gt_fcats .
    gs_fcats-col_pos = 3.
    gs_fcats-fieldname = 'NAME1'.
    gs_fcats-seltext_m =  text-003.
    append gs_fcats to gt_fcats .
    gs_fcats-col_pos = 4.
    gs_fcats-fieldname = 'BALC'.
    gs_fcats-seltext_m =  text-016.
    append gs_fcats to gt_fcats .
    gs_fcats-col_pos = 5.
    gs_fcats-fieldname = 'BALA'.
    gs_fcats-seltext_m =  text-012.
    append gs_fcats to gt_fcats .
    gs_fcats-col_pos = 6.
    gs_fcats-fieldname = 'BALB'.
    gs_fcats-seltext_m =  text-013.
    append gs_fcats to gt_fcats .
    gs_fcats-col_pos = 7.
    gs_fcats-fieldname = 'TBAL'.
    gs_fcats-seltext_m =  text-014.
    append gs_fcats to gt_fcats .
    gs_fcats-col_pos = 8.
    gs_fcats-fieldname = 'GBAL'.
    gs_fcats-seltext_m =  text-015.
    append gs_fcats to gt_fcats .
    data : repid1 type sy-repid.
    repid1 = sy-repid.
    INITIALIZATION EVENTS ******************************
    initialization.
    *Clearing the work area.
    clear gs_bsik.
    Refreshing the internal tables.
    refresh gt_bsik.
    ******************START OF  SELECTION EVENTS **************************
    start-of-selection.
    *get data for balance report.
      perform sub_openbal.
      perform sub_openbal_display.
    *&      Form  sub_openbal
          text
    -->  p1        text
    <--  p2        text
    form sub_openbal .
      if   so_date-low > sy-datum or so_date-high > sy-datum .
          message i005(yfi02).
         leave screen.
    endif.
         select bukrs lifnr gjahr belnr budat bldat
           waers dmbtr wrbtr shkzg blart monat hkont prctr
           from bsik into table gt_opbal
           where bukrs in so_bukrs and lifnr in so_lifnr
           and hkont in so_hkont and prctr in so_prctr
           and budat in so_date .
        select bukrs lifnr gjahr belnr budat bldat
           waers dmbtr wrbtr shkzg blart monat hkont prctr
           from bsak appending table gt_opbal
           for all entries in gt_opbal
           where lifnr = gt_opbal-lifnr
           and budat in so_date .
    if sy-subrc <> 0.
      message i007(yfi02).
      leave screen.
      endif.
    select lifnr mindk from lfb1 into table gt_lfb1
      for all entries in gt_opbal
        where lifnr = gt_opbal-lifnr and mindk in so_mindk.
    select lifnr name1 ktokk from lfa1 into table gt_lfa1
      for all entries in gt_opbal
       where lifnr = gt_opbal-lifnr and ktokk in so_ktokk.
       loop at gt_opbal into gs_opbal .
         loop at gt_lfb1 into gs_lfb1 where lifnr = gs_opbal-lifnr.
           loop at gt_lfa1 into gs_lfa1 where lifnr = gs_opbal-lifnr.
            gs_opfinal-bukrs = gs_opbal-bukrs.
            gs_opfinal-lifnr = gs_opbal-lifnr.
            gs_opfinal-gjahr = gs_opbal-gjahr.
            gs_opfinal-belnr = gs_opbal-belnr.
            gs_opfinal-budat = gs_opbal-budat.
            gs_opfinal-bldat = gs_opbal-bldat.
            gs_opfinal-waers = gs_opbal-waers.
            gs_opfinal-dmbtr = gs_opbal-dmbtr.
            gs_opfinal-wrbtr = gs_opbal-wrbtr.
            gs_opfinal-shkzg = gs_opbal-shkzg.
            gs_opfinal-blart = gs_opbal-blart.
            gs_opfinal-monat = gs_opbal-monat.
            gs_opfinal-hkont = gs_opbal-hkont.
            gs_opfinal-prctr = gs_opbal-prctr.
            gs_opfinal-name1 = gs_lfa1-name1.
        if gs_opbal-shkzg    = 'H'.
            gs_opfinal-tcr   =  gs_opbal-dmbtr * -1.
            gs_opfinal-tdr   =  '000000'.
        else.
            gs_opfinal-tdr   =  gs_opbal-dmbtr.
            gs_opfinal-tcr   =  '000000'.
        endif.
           append gs_opfinal to gt_opfinal.
           endloop.
           endloop.
           endloop.
    sort gt_opfinal by bukrs lifnr prctr .
    so_date-low = so_date-low - 1 .
    loop at gt_opfinal into gs_opfinal.
    call function 'BAPI_AP_ACC_GETKEYDATEBALANCE'
      exporting
        companycode        = gs_opfinal-bukrs
        vendor             =  gs_opfinal-lifnr
        keydate            = so_date-low
       balancespgli        = ' '
       noteditems          = ' '
      importing
        return             = return
      tables
        keybalance         = keybalance.
    clear kb .
    loop at keybalance .
       kb = keybalance-lc_bal + kb .
    endloop.
          gs_opdisp-balc = kb.
          gs_opdisp-bukrs =  gs_opfinal-bukrs.
          gs_opdisp-lifnr =  gs_opfinal-lifnr.
          gs_opdisp-name1 =  gs_opfinal-name1.
        at new lifnr .
          sum .
          gs_opfinal-tbal =  gs_opfinal-tdr + gs_opfinal-tcr  .
          gs_opdisp-tbal = gs_opfinal-tbal.
          gs_opdisp-bala = gs_opfinal-tdr .
          gs_opdisp-balb = gs_opfinal-tcr .
          gs_opdisp-gbal = keybalance-lc_bal + gs_opfinal-tbal .
          append gs_opdisp to gt_opdisp.
        endat.
        clear gs_opdisp.
        clear keybalance .
      endloop.
      delete adjacent duplicates from gt_opdisp.
    endform.                    " sub_openbal
    *&      Form  sub_openbal_display
          text
    -->  p1        text
    <--  p2        text
    form sub_openbal_display .
    call function 'REUSE_ALV_GRID_DISPLAY'
        exporting
      I_INTERFACE_CHECK                 = ' '
      I_BYPASSING_BUFFER                = ' '
      I_BUFFER_ACTIVE                   = ' '
          i_callback_program              =  repid1
      I_CALLBACK_PF_STATUS_SET          = ' '
      I_CALLBACK_USER_COMMAND           = ' '
      I_CALLBACK_TOP_OF_PAGE            = ' '
      I_CALLBACK_HTML_TOP_OF_PAGE       = ' '
      I_CALLBACK_HTML_END_OF_LIST       = ' '
      I_STRUCTURE_NAME                  =
      I_BACKGROUND_ID                   = ' '
      I_GRID_TITLE                      =
      I_GRID_SETTINGS                   =
      IS_LAYOUT                         =
          it_fieldcat                     = gt_fcats
      IT_EXCLUDING                      =
      IT_SPECIAL_GROUPS                 =
      IT_SORT                           =
      IT_FILTER                         =
      IS_SEL_HIDE                       =
      I_DEFAULT                         = 'X'
      I_SAVE                            = 'X'
      IS_VARIANT                        =
       it_events                        =
      IT_EVENT_EXIT                     =
      IS_PRINT                          =
      IS_REPREP_ID                      =
      I_SCREEN_START_COLUMN             = 0
      I_SCREEN_START_LINE               = 0
      I_SCREEN_END_COLUMN               = 0
      I_SCREEN_END_LINE                 = 0
      IT_ALV_GRAPHICS                   =
      IT_HYPERLINK                      =
      IT_ADD_FIELDCAT                   =
      IT_EXCEPT_QINFO                   =
      I_HTML_HEIGHT_TOP                 =
      I_HTML_HEIGHT_END                 =
    IMPORTING
      E_EXIT_CAUSED_BY_CALLER           =
      ES_EXIT_CAUSED_BY_USER            =
         tables
           t_outtab                       = gt_opdisp
      exceptions
        program_error                     = 1
        others                            = 2
      if sy-subrc <> 0.
        message id sy-msgid type sy-msgty number sy-msgno
                with sy-msgv1 sy-msgv2 sy-msgv3 sy-msgv4.
      endif.
    endform.                    " sub_openbal_display

    I think you are using for all entries statement in almost all select statements but i didnt see any condtion before you are using for all entries statement.
    If you are using for all entries in gt_opbal ... make sure that gt_opbal has some records other wise it will try to read all records from the data base tables.
    Try to check before using for all entries in the select statement like
    if gt_opbal is not initial.
    select adfda adfadf afdadf into table
      for all entries in gt_opbal.
    else.
    select abdf afad into table
    from abcd
    where a = 1
        and b = 2.
    endif.
    i didnt see anything wrong in your report but this is major time consuming when you dont have records in the table which you are using for all entries.

  • How to calculate Execution Time

    Hi gurus,
    Can any one tell me how to calculate the Report Execution time in Seconds.
    We have one requirement.My manager told me track all the reports in Development server how much time those take to execute. and Compare those with Production server.
         I dont have an Idea how to calculate the Execution time in Seconds.
    Please guide me on this.
                    Thanks in Advance
    Thanks and Regards
    Siri...

    hi
    check se30
    enter the prog name and press execute.
    after your execution is over press back
    then press evaluate in the initial screen.
    you have the analysis
    in that you will get the time in microseconds and you can convert to sec
    REWARD IF HELPFUL
    PRASANTH

  • Feature request: Add current execution time to queries

    When you run a query in Toad you are notified about how long a query has been currently running for. However in SQL Developer you just get the bar moving back and forth until it completes and only then you get the execution time. It would be nice to have realtime notification about query execution time.

    in 4EA2, I do see  'All Rows Fetched: 60 in 0.198 seconds' above the column headers in the results grid. Is that what you were looking for?

  • How to optimize execution time for code

    Please suggest the way as i m new to performance tuning for reducing the execution time of code . Related document to performance tuning is appreciable .also tell how to work with Tcode ST05 .
    Thanks in advance

    Please Read before Posting in the Performance and Tuning Forum
    Thread locked.
    Thomas

  • How to get execution time for a view inside procedure ?

    Hi,
    I want execution time for all the views in my database. I tried "execute immediate" but it does not seem to work.
    It is not waiting to complete the execution of view to go to next step.
    If I am executing the same statement in sqlplus, it is displaying correct time.
    Here is my code:
    Begin
    output_file := UTL_FILE.FOpen ('RECORDING',v_FileName, 'W', 32767);
    Open viewcur;
    Loop
    Fetch viewcur into v_view_name;
         Exit when viewcur%notfound;
         SELECT to_char(systimestamp,'DD-MON-YYYY HH24:MI:SS.FF') into v_start_time from dual;
         v_stmt := 'Select * from ' ||v_view_name ;
         Execute Immediate v_stmt;
    SELECT to_char(systimestamp,'DD-MON-YYYY HH24:MI:SS.FF') into v_end_time from dual;
    v_record_str := v_start_time||','||v_view_name||','||v_end_time;
         UTL_FILE.PUT_LINE(output_file, v_record_str);
    End Loop;
    Close viewcur;
    utl_file.fClose(output_file);
    End ;
    Oracle version: 11.1.0.6.0

    Hi,
    Running with a user with dba privileges:
    DECLARE
        CURSOR viewcur IS
            SELECT table_name
            FROM   dictionary d
            WHERE  d.table_name LIKE 'ALL_A%';
        output_file UTL_FILE.file_type;
        v_FileName  VARCHAR2(30) := 'TEST_VIEW_TIME.TXT';
        v_view_name dictionary.table_name%TYPE;
        v_start_time varchar2(30);
        v_end_time varchar2(30);
        v_record_str varchar2(200);
        v_stmt varchar2(200);
    BEGIN
        output_file := UTL_FILE.FOpen('EXT_FILES', v_FileName, 'W', 32767);
        OPEN viewcur;
        LOOP
            FETCH viewcur
                INTO v_view_name;
            EXIT WHEN viewcur%NOTFOUND;
            SELECT TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS.FF')
            INTO   v_start_time
            FROM   dual;
            v_stmt := 'Select * from ' || v_view_name;
            EXECUTE IMMEDIATE v_stmt;
            SELECT TO_CHAR(systimestamp, 'DD-MON-YYYY HH24:MI:SS.FF')
            INTO   v_end_time
            FROM   dual;
            v_record_str := v_start_time || ',' || v_view_name || ',' || v_end_time;
            UTL_FILE.PUT_LINE(output_file, v_record_str);
        END LOOP;
        CLOSE viewcur;
        utl_file.fClose(output_file);
    END;
    /TEST_VIEW_TIME.TXT:
    02-JUL-2009 11:48:47.953000,ALL_ARGUMENTS,02-JUL-2009 11:48:47.953000
    02-JUL-2009 11:48:47.953000,ALL_ALL_TABLES,02-JUL-2009 11:48:47.953000
    02-JUL-2009 11:48:47.953000,ALL_ASSOCIATIONS,02-JUL-2009 11:48:47.953000
    02-JUL-2009 11:48:47.953000,ALL_AUDIT_POLICIES,02-JUL-2009 11:48:47.999000
    02-JUL-2009 11:48:47.999000,ALL_AUDIT_POLICY_COLUMNS,02-JUL-2009 11:48:48.093000
    02-JUL-2009 11:48:48.093000,ALL_AWS,02-JUL-2009 11:48:48.187000
    02-JUL-2009 11:48:48.187000,ALL_AW_PS,02-JUL-2009 11:48:48.187000
    02-JUL-2009 11:48:48.187000,ALL_APPLY,02-JUL-2009 11:48:48.343000
    02-JUL-2009 11:48:48.343000,ALL_APPLY_PARAMETERS,02-JUL-2009 11:48:48.421000
    02-JUL-2009 11:48:48.421000,ALL_APPLY_KEY_COLUMNS,02-JUL-2009 11:48:48.437000
    02-JUL-2009 11:48:48.437000,ALL_APPLY_CONFLICT_COLUMNS,02-JUL-2009 11:48:48.781000
    02-JUL-2009 11:48:48.781000,ALL_APPLY_TABLE_COLUMNS,02-JUL-2009 11:48:48.828000
    02-JUL-2009 11:48:48.828000,ALL_APPLY_DML_HANDLERS,02-JUL-2009 11:48:48.890000
    02-JUL-2009 11:48:48.890000,ALL_APPLY_PROGRESS,02-JUL-2009 11:48:48.968000
    02-JUL-2009 11:48:48.968000,ALL_APPLY_ERROR,02-JUL-2009 11:48:49.015000
    02-JUL-2009 11:48:49.015000,ALL_APPLY_ENQUEUE,02-JUL-2009 11:48:49.234000
    02-JUL-2009 11:48:49.234000,ALL_APPLY_EXECUTE,02-JUL-2009 11:48:49.281000
    02-JUL-2009 11:48:49.281000,ALL_AW_PROP,02-JUL-2009 11:48:49.531000
    02-JUL-2009 11:48:49.546000,ALL_AW_OBJ,02-JUL-2009 11:48:49.578000
    02-JUL-2009 11:48:49.578000,ALL_AW_PROP_NAME,02-JUL-2009 11:48:49.609000
    02-JUL-2009 11:48:49.609000,ALL_AW_AC,02-JUL-2009 11:48:49.624000
    02-JUL-2009 11:48:49.624000,ALL_AW_AC_10G,02-JUL-2009 11:48:49.640000Regards,

  • How to check listed time we charge our battery on macbook air

    how to check battery cycle

    Under the "Apple" click on "About this Mac: - "More info…" - "System report" - Under "Hardware" click on "Power" and at the top will be your "Battery Information".

  • How to check the time taking to extract rows from source and time load data into destination

    Hi,
    Recently I have started working on Optimizing an SSIS package in 2012. The package reads data from AS 400 server and load into SQL Server table.. No transformations are being used in the package. only ADO.Net Source and OLE DB Destination are using in the
    package.
    The SSIS package is extracting 6500 rows and loading into database per batch. This process is taking 18 seconds. I would like to know out of 18 secs how much time is being used only to extract data from the source and how much time is taking to write the
    data to the database per each batch.
    Any thoughts be greatly appreciated...
    Thanks,
    Venu.

    Hello 
    We need more information regarding your system. If you are using SQL 2014 then you can use the new DMV
    sys.dm_exec_query_profiles which is doing this exactly. Check out this URL: http://msdn.microsoft.com/en-us/library/dn223301.aspx
    While executing your SSIS project you can examine each and every process and get the percentage it already did and all the information regarding it.
      Ronen Ariely
     [Personal Site]    [Blog]    [Facebook]

  • How to set execution time of the step with business days in the workflow

    As we know, we can set how many days later the step should be execuated after previous step. now, the problem is how to set the business days (days except sunday and sataurday) for it. any one has good solution on it.

    Hi Nick,
    In order to find the Next working day you need to check for the Factory calendar days for eg, if a workitem has invoked today and if the Approver doesn't release the workitme for which u want to send a mail/reminder to the approver after say next 5or 6 working days, you need to create a function module.
    For eg: In case of Purchase order, if the approver doesn't release the PO .
    Create a Method saying "Next working day" , in which you will be passing the import parameters : PO, Factory calendar day and the sy-datum
    and export parameter : date.
    Create Input date and No of days as container elements of the Task and in the method create a Function module
    In case of PO, consider the Factory calendar key from the T001W  by joining the table EKPO there by passing the PO.
    then pass the date, No of days(say 5 days) and the Factory calendar key  to the "WDKAL_DATE_ADD_FKDAYS" , you will get the next working day of the employee.
    Don't forget to check the Binding properly.
    Do implement this logic and check the same.
    Regards
    Sharief

  • How to improve response time of queries?

    Although it looks that that this question relates to Reports but actually the problem is related to SQL.
    I have a Catalogue type report which retrieves data and prints. That is not much calculations involved.
    It uses six tables.
    The data model is such that I have a separate query for each table and then all
    these tables are liked thru link tool.
    Each table contains 3000 to 9000 rows but one table contains 35000 rows.
    The problem is that the report is taking too much time - about 3-1/2 hours while
    expectation is that it should take 20 to 40 minutes max.
    What can I do to reduce the time it takes to produce report.
    I mean should I modify data model to make a single query with equi-join?
    A)Specially I want to know what is traffic between client and server when
    1) we have multiple quieries and LINK tool is used
    2) Single query and equi-join is used
    B)Which activity is taking most of time ?
    1) Retrieving data from server to client
    2) Sorting according to groups (at client) and formating data and saving in file
    Pl. guide.
    Every body is requested to contribute as per his/her experience and knowledge.
    M Tariq

    Generally speaking, your server is faster than your PC (if it is not, then you have bigger problems than a slow query), let the server do as much of the work as possible, particularly things like sorting, and grouping. Any calculations that can be pushed off onto the server (e.g. aggregate functions, cola + colb etc.) should be.
    A single query will always be faster than multiple queries. Let the server do the linking.
    The more rows you return from the server to your PC, the more bytes the network and your PC have to deal with. Network traffic is "expensive", so get the result set as small as possible on the server before sending it back over the network. PC's generally have little RAM and slow disks compared to servers. Large datasets cause swapping on the PC, this is really expensive.
    Unless you are running on a terribly underpowered server, I think even 30 - 40 minutes would be slow for the situation you describe.

  • How to reduce execution time of this SQL?

    This SQL will output only 2 rows. I tried using hints (an index) but to no avail.
    http://www.freeimagehosting.net/uploads/cf214afcf1.jpg
    Or, is it NOT possible, limit of query optimization has reached?

    Rakesh jayappa wrote:
    Hi,
    Run the sql tuning advisory.
    Let me know recommendation.
    Kind Regards,
    Rakesh************************** Here is my tuning request **************************
    1.) The following SQL statement has been identified to perform poorly. It currently takes up to 12 seconds to execute, but it's supposed to take a second at most.
    This is the statement:
    select DISTINCT trunc(c.sst_post_date) as post_date
    from ac_t_sessn b , ac_t_ssntr c
    where
           b.ses_status = 0
              and b.ses_profit_center = c.sst_profit_center
              and b.ses_acct_year = c.sst_acct_year
              and b.ses_acct_period = c.sst_acct_period
              and b.ses_sessn_no = c.sst_sessn_no
       AND
             C.sst_post_mtd||C.sst_post_TYPE IN
           (SELECT Y.pst_post_mtd||Y.pst_post_type
            FROM ac_r_post_functions Y
           WHERE Y.pst_post_status IN (0,'2'))
    order by trunc(c.sst_post_date);It should return data from a table in a specific order.
    2.) The version of the database is Oracle9i Enterprise Edition Release *9.2.0.6.0*
    3.) These are the parameters relevant to the optimizer:
    UAT_UML@umltest>show parameter optimizer
    NAME                                 TYPE        VALUE
    optimizer_dynamic_sampling           integer     1
    optimizer_features_enable            string      9.2.0
    optimizer_index_caching              integer     0
    optimizer_index_cost_adj             integer     100
    optimizer_max_permutations           integer     2000
    optimizer_mode                       string      CHOOSE
    UAT_UML@umltest>show parameter db_file_multi
    NAME                                 TYPE        VALUE
    db_file_multiblock_read_count        integer     16
    UAT_UML@umltest>show parameter db_block_size
    NAME                                 TYPE        VALUE
    db_block_size                        integer     8192
    UAT_UML@umltest>show parameter cursor_sharing
    NAME                                 TYPE        VALUE
    cursor_sharing                       string      EXACT
    UAT_UML@umltest>column sname format a20
    UAT_UML@umltest>column pname format a20
    UAT_UML@umltest>column pval2 format a20
    UAT_UML@umltest>select
      2             sname
      3           , pname
      4           , pval1
      5           , pval2
      6      from
      7           sys.aux_stats$;
    no rows selected4.) Here is the output of EXPLAIN PLAN:
    UAT_UML@umltest>select * from table(dbms_xplan.display);
    PLAN_TABLE_OUTPUT
    | Id  | Operation              |  Name                | Rows  | Bytes |TempSpc| Cost  |
    |   0 | SELECT STATEMENT       |                      |   454 | 22700 |       |  5391 |
    |   1 |  SORT UNIQUE           |                      |   454 | 22700 |       |  5072 |
    |   2 |   HASH JOIN            |                      | 69384 |  3387K|  2592K|  4478 |
    |   3 |    INDEX FAST FULL SCAN| INDX_AC_T_SESSN      |   110K|  1294K|       |   244 |
    |   4 |    HASH JOIN           |                      |   416K|    15M|       |  3877 |
    |   5 |     TABLE ACCESS FULL  | AC_R_POST_FUNCTIONS  |    23 |   253 |       |     2 |
    |   6 |     TABLE ACCESS FULL  | AC_T_SSNTR           |  1790K|    46M|       |  3866 |
    Note: cpu costing is off, PLAN_TABLE' is old version5.) Here is the output of SQL*Plus AUTOTRACE including the TIMING information:
    UAT_UML@umltest>set autotrace traceonly arraysize 100
    UAT_UML@umltest>
    UAT_UML@umltest>select DISTINCT trunc(c.sst_post_date) as post_date
      2  from ac_t_sessn b , ac_t_ssntr c
      3  where
      4  b.ses_status = 0
      5  and b.ses_profit_center = c.sst_profit_center
      6  and b.ses_acct_year = c.sst_acct_year
      7  and b.ses_acct_period = c.sst_acct_period
      8  and b.ses_sessn_no = c.sst_sessn_no
      9  AND
    10  C.sst_post_mtd||C.sst_post_TYPE IN (SELECT         Y.pst_post_mtd||Y.pst_post_type FROM ac_r_po
    st_functions Y
    11  WHERE Y.pst_post_status IN (0,'2'))
    12  order by trunc(c.sst_post_date);
    Execution Plan
       0      SELECT STATEMENT Optimizer=CHOOSE (Cost=5391 Card=454 Bytes=
              22700)
       1    0   SORT (UNIQUE) (Cost=5072 Card=454 Bytes=22700)
       2    1     HASH JOIN (Cost=4478 Card=69384 Bytes=3469200)
       3    2       INDEX (FAST FULL SCAN) OF 'INDX_AC_T_SESSN' (NON-UNIQU
              E) (Cost=244 Card=110433 Bytes=1325196)
       4    2       HASH JOIN (Cost=3877 Card=416304 Bytes=15819552)
       5    4         TABLE ACCESS (FULL) OF 'AC_R_POST_FUNCTIONS' (Cost=2
               Card=23 Bytes=253)
       6    4         TABLE ACCESS (FULL) OF 'AC_T_SSNTR' (Cost=3866 Card=
              1790555 Bytes=48344985)
    Statistics
              0  recursive calls
              0  db block gets
          42741  consistent gets
            171  physical reads
              0  redo size
            425  bytes sent via SQL*Net to client
            507  bytes received via SQL*Net from client
              2  SQL*Net roundtrips to/from client
              1  sorts (memory)
              0  sorts (disk)
              2  rows processed
    UAT_UML@umltest>DISCONNECT
    Disconnected from Oracle9i Enterprise Edition Release 9.2.0.6.0 - Production
    With the Partitioning, OLAP and Oracle Data Mining options
    JServer Release 9.2.0.6.0 - Production6.) The TKPROF output snippet
    TKPROF: Release 11.2.0.1.0 - Development on Wed Oct 27 12:47:35 2010
    Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
    Trace file: umltest_ora_1604.trc
    Sort options: prsela  exeela  fchela 
    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
    select DISTINCT trunc(c.sst_post_date) as post_date
    from ac_t_sessn b , ac_t_ssntr c
    where
    b.ses_status = 0
    and b.ses_profit_center = c.sst_profit_center
    and b.ses_acct_year = c.sst_acct_year
    and b.ses_acct_period = c.sst_acct_period
    and b.ses_sessn_no = c.sst_sessn_no
    AND
    C.sst_post_mtd||C.sst_post_TYPE IN (SELECT         Y.pst_post_mtd||Y.pst_post_type FROM ac_r_post_functions Y
    WHERE Y.pst_post_status IN (0,'2'))
    order by trunc(c.sst_post_date)
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.01       0.00          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           0
    Fetch        2      3.20       4.38        171      42741          0           2
    total        4      3.21       4.39        171      42741          0           2
    Misses in library cache during parse: 1
    Optimizer mode: CHOOSE
    Parsing user id: 445 
    Rows     Row Source Operation
          2  SORT UNIQUE
         24   HASH JOIN 
         11    INDEX FAST FULL SCAN OBJ#(62817) (object id 62817)
    2293715    HASH JOIN 
         31     TABLE ACCESS FULL OBJ#(67305)
    1790555     TABLE ACCESS FULL OBJ#(62828)
    alter session set sql_trace true
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        0      0.00       0.00          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           0
    Fetch        0      0.00       0.00          0          0          0           0
    total        1      0.00       0.00          0          0          0           0
    Misses in library cache during parse: 0
    Misses in library cache during execute: 1
    Optimizer mode: CHOOSE
    Parsing user id: 445 
    OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.01       0.00          0          0          0           0
    Execute      2      0.00       0.00          0          0          0           0
    Fetch        2      3.20       4.38        171      42741          0           2
    total        5      3.21       4.39        171      42741          0           2
    Misses in library cache during parse: 1
    Misses in library cache during execute: 1
    OVERALL TOTALS FOR ALL RECURSIVE STATEMENTS
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        0      0.00       0.00          0          0          0           0
    Execute      0      0.00       0.00          0          0          0           0
    Fetch        0      0.00       0.00          0          0          0           0
    total        0      0.00       0.00          0          0          0           0
    Misses in library cache during parse: 0
        2  user  SQL statements in session.
        0  internal SQL statements in session.
        2  SQL statements in session.
    Trace file: umltest_ora_1604.trc
    Trace file compatibility: 9.02.00
    Sort options: prsela  exeela  fchela 
           1  session in tracefile.
           2  user  SQL statements in trace file.
           0  internal SQL statements in trace file.
           2  SQL statements in trace file.
           2  unique SQL statements in trace file.
          51  lines in trace file.
          10  elapsed seconds in trace file. Any help would be greatly appreciated?

  • How can i create time charateristic queries in BEx

    I don't know how iam allowed to create a time characteristic query in BEx
    Iam also looking for a solution to change query settings during the runtime

    hey thanks for the answer
    i changed the query design into an other order and now it looks better. But i still have a problem.
    I just want to select a intervall from a year.
    For instance its may 2007 now so i want to show all values for may 2007 to may 2008
    But i am only allowed to filtering for each info object so my filters for the year are
    2007, 2008 and for month may, juni, july......may
    The result is i get all values for 2007 and 2008 i need a refrence from month for each year.

  • How to check running time of program in real time?

    Hello Experts,
    I am currently creating a report wherein I need to check how long the program is running.
    For example, If it currently runs in almost 10 minutes, I need to terminate the report or create
    a message informing the user to please limit the selection of records.
    Are there any FMs to do this? Thank you guys and take care!

    Get runtime in two phases:
    DATA: t1 type i, t2 type i, delta type i.
    GET RUNTIME FIELD t1.
    ..... evaluation .....
    GET RUNTIME FIELD t2.
    delta = t2 - t1.  "Microseconds!
    .... check the delta and send message if necessary!
    Hope this helps, R.

  • How to check logout time

    Hello,
    I am developing a site using JSP, in which I have to store login and logout time in database. I have noted the logout time when the client is properly logged off. But, if client just closes the browser, how can I note the time?
    Please guide me.
    Regards

    Hi,
    You need to define a class, say Timeout,which implements javax.servlet.http.HttpSessionBindingListener. Create a Timeout object and add it to the user session. When the session is removed, Timeout.valueUnbound() will be called by the Servlet engine. You can implement valueUnbound() to do the required operation.The logout time that was getting recorded depended on the timemout set on the server.
    Refer servlet API : http://java.sun.com/products/servlet/2.2/javadoc/index.html
    Hope this helps.
    Thanks,
    Senthil_Slash

Maybe you are looking for

  • Can I allow two attempts and after the first attempt have a new window open to a url?

    I would like to allow the user two attempts to answer a question. However, after the first attempt, if they get it wrong, I would like a new window to open that takes them to a tutorial Web site we have, where they can find the answer. Then I would l

  • Tables for XI messages

    Hi all, Can any one please give me list of DB tables which are used for XI messages. Any links, docs, threads would help me reg,

  • US7ASCII Characterset - Need to support Special Characters & Symbols

    Dear All, My database characterset is 'US7ASCII' Some of Special Characters / Symbols are not supported by 'US7ASCII'. But those symbols need to be supported by 'US7ASCII'. Do we have any option to make 'US7ASCII' Characterset to support such Symbols

  • Exchange 2010 data grwoth

    My company migrate to exchange 2010 for sometime, but we found that the exchange data keep growing E.g. One of the DB around is around 290 GB now, has been growing in 5GB per month for 1+ year. I can see the mail DB has record full back lately, the l

  • Traveling to Iceland with my MacBook Pro

    Are there any special considerations i should take into account. I know that Iceland uses 220 volts, 50Hz AC, and plugs have two prongs. How do I most safely use my MAC?