Procedure/Function execution time

I want to get my procedure/function total execution time which is running inside of application.
I think that I can use PLSQL_EXEC_TIME column of v$sql time. Please confirm this if I can or not.

Hi;
Please see:
http://www.orafaq.com/maillist/oracle-l/2004/01/27/0522.htm
http://www.dbforums.com/microsoft-sql-server/1625184-how-catch-stored-procedure-execution-time.html
http://www.geekinterview.com/talk/9466-procedure-execution-time.html
Regard
Helios

Similar Messages

  • "IMAQdxOpenCamera" function execution time is particularly long,why?

    I install VAS2011 in CVI2010 environment, running IMAQdx the samples  <Grab and AttributesSetup>,  "IMAQdxOpenCamera" function execution time is particularly long, more than 7 seconds,why?
    Thanks!
    Solved!
    Go to Solution.

    Thank you for your answers!
    I capture video using VFW initialization faster, only use IMAQdx speed slow.
    thanks!

  • Procedure/function execution sequence

    Hi,
    I've a package that has about 20 stored procedures & functions and I know these are executed sequentially but don't know which procedure/function is called when and in what order.
    Is there a way for me to query some Oracle table to check the sequence in which these procedures or functions are called during the last execution?
    I understand, it can also be achieved by logging messages but am wondering if there's a Oracle table that stores this information.
    Thanks in advance.

    If you can start the dbms_profiler before the procedure is executed and stop the dbms_profiler after the procedure is finished. It will give you each statement which gets executed in sequenc.
    NOTE: The source code should be unwrapped.
    Please follow the Forums Etiquette and tag the answers helpful or correct.

  • CVI XML Functions Execution Times Increase When Looped

    I have written multiple functions using CVI that read XML files. I have confirmed in the Resource Tracking utility that i have cleaned up all of my lists, elements, documents, etc. I have found that when I loop any of the functions I have created, the execution times increase. The increase is small but it is noticable and does effect my execution.
    Are there any other sources of memory that I need to deallocate? It seems that there is a memory leak somewhere but I am unable to see where this increase is located.
    I am currently running LabWIndows/CVI 2009 on Windows 2008 Server. I have looped my functions using TestStand 4.2.1. Any help would be appreciated!
    Thanks in advance,
    Kyle
    Solved!
    Go to Solution.

    HI Daniel,
    Thanks for the quick response.
    It is indeed slow down in execution speed when we loop. When looped, the XML reader is overwriting variables, not adding to an array. Our application is structured differently than my test case. We run a CVI function from TestStand that contains a series of commands, which contains the XML reading. The XML looping is really done in CVI. I used TestStand in my test case just to get execution times. Our psuedocode for the CVI function is as followed:
    For loop (looping over values, like amplitude or frequency)
    Reading the XML
    Applying the data from the XML to set up some instrument(s)
    Do something...
    End loop
    I can confirm that the instrument set up is not the cause of the slow down. We have written the same XML reading in C# and applied the values to the instrument setup and do not experience the slow down.
    I tested with On-The-Fly Reporting enabled and the execution time continued to slow down.
    I hope that answers all of your questions!
    Thanks,
    Kyle

  • Get Stored Procedure Last Execution time.

    Hi,
    I am looking to get last execution of store proc(My cache is flushed off). So would like to know all the store proc execution times.
    sys.dm_exec_query_stats( as I known gets from cache, now all my cache is flushed)
    Is there any way out.
    N_14
    Naveen| Press Yes if the post is useful.

    You may need to look at sys.dm_exec_procedure_stats.
    As your cache is flushed, you will be unlikely to get this information without manual logging.

  • How to find out the execution time of a sql inside a function

    Hi All,
    I am writing one function. There is only one IN parameter. In that parameter, i will pass one SQL select statement. And I want the function to return the exact execution time of that SQL statement.
    CREATE OR REPLACE FUNCTION function_name (p_sql IN VARCHAR2)
    RETURN NUMBER
    IS
    exec_time NUMBER;
    BEGIN
    --Calculate the execution time for the incoming sql statement.
    RETURN exec_time;
    END function_name;
    /

    Please note that wrapping query in a "SELECT COUNT(*) FROM (<query>)" doesn't necessarily reflect the execution time of the stand-alone query because the optimizer is smart and might choose a completely different execution plan for that query.
    A simple test case shows the potential difference of work performed by the database:
    Oracle Database 10g Express Edition Release 10.2.0.1.0 - Production
    Session altered.
    SQL>
    SQL> drop table count_test purge;
    Table dropped.
    Elapsed: 00:00:00.17
    SQL>
    SQL> create table count_test as select * from all_objects;
    Table created.
    Elapsed: 00:00:02.56
    SQL>
    SQL> alter table count_test add constraint pk_count_test primary key (object_id)
    Table altered.
    Elapsed: 00:00:00.04
    SQL>
    SQL> exec dbms_stats.gather_table_stats(ownname=>null, tabname=>'COUNT_TEST')
    PL/SQL procedure successfully completed.
    Elapsed: 00:00:00.29
    SQL>
    SQL> set autotrace traceonly
    SQL>
    SQL> select * from count_test;
    5326 rows selected.
    Elapsed: 00:00:00.10
    Execution Plan
    Plan hash value: 3690877688
    | Id  | Operation         | Name       | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT  |            |  5326 |   431K|    23   (5)| 00:00:01 |
    |   1 |  TABLE ACCESS FULL| COUNT_TEST |  5326 |   431K|    23   (5)| 00:00:01 |
    Statistics
              1  recursive calls
              0  db block gets
            419  consistent gets
              0  physical reads
              0  redo size
         242637  bytes sent via SQL*Net to client
           4285  bytes received via SQL*Net from client
            357  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
           5326  rows processed
    SQL>
    SQL> select count(*) from (select * from count_test);
    Elapsed: 00:00:00.00
    Execution Plan
    Plan hash value: 572193338
    | Id  | Operation             | Name          | Rows  | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT      |               |     1 |     5   (0)| 00:00:01 |
    |   1 |  SORT AGGREGATE       |               |     1 |            |          |
    |   2 |   INDEX FAST FULL SCAN| PK_COUNT_TEST |  5326 |     5   (0)| 00:00:01 |
    Statistics
              1  recursive calls
              0  db block gets
             16  consistent gets
              0  physical reads
              0  redo size
            412  bytes sent via SQL*Net to client
            380  bytes received via SQL*Net from client
              2  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
              1  rows processed
    SQL>As you can see the number of blocks processed (consistent gets) is quite different. You need to actually fetch all records, e.g. using a PL/SQL block on the server to find out how long it takes to process the query, but that's not that easy if you want to have an arbitrary query string as input.
    Regards,
    Randolf
    Oracle related stuff blog:
    http://oracle-randolf.blogspot.com/
    SQLTools++ for Oracle:
    http://www.sqltools-plusplus.org:7676/
    http://sourceforge.net/projects/sqlt-pp/

  • Oracle Execution Time for function inside view

    Hi Guys,
    i would like to ask if i call a function inside a view , how does it behave in term of execution time and performance
    For Example i have a view as below
    create or replace view CUST.CUST_VIEW
    select a.nice , a.getCustomDisplay(a.name,a.pin,a.dos,b.master_key) as custom from CUST.customer as a , CUST.master as b
    where a.idno = b.main_id_no
    AND the function look like this
    create or replace function getCustomDisplay(a varchar2,b varchar2,c varchar2,d varchar2)
    begin
    select * from CUST.MAPPING_MATRIX order by idno asc;
    for loop
    //logic goes here to determine the result return from matrix
    end
    My Question is for example
    1. If i do select * from CUST.CUST_VIEW ( return 1000 records for example ) , so the function getCustomDisplay will be executed 1000 times also right ( that means select * from CUST.MAPPING_MATRIX order by idno asc; will also be executed 1000 times ) ?
    2. If i do select * from CUST.CUST_VIEW where rownum <= 20 , how many times getCustomDisplay() function will be executed ?
    The reason i ask this because recently we saw a few million execution times per day from AWR report for this query
    "select * from CUST.MAPPING_MATRIX order by idno asc;"
    But when i investigate , and put a logger whenever it call getCustomDisplay , the query above as mention in item no 2 only will be executed as many as the record that will be returned from ( view + where condition ).
    3. will it affect performance if my view return a lot of records ? or is there any way to improve it?
    Thanks

    Hi
    i have other solutions that seems work for reducing number of execution times but do you think its scalable and feasible ?
    CREATE OR REPLACE package body ACER.TYPE_CAT_PASS_UTIL_TEST as
    */* Private package data */*
    TYPE g_rec IS RECORD (
    id_no               VARCHAR2 (4),
    type_pass            VARCHAR2 (3),
    scheme_ind           VARCHAR2 (5),
    cat_pass             VARCHAR2 (2),
    entrepass            VARCHAR2 (2),
    display_type_pass        VARCHAR2 (15),
    display_cat_pass         VARCHAR2 (5),
    display_type_pass_desc    VARCHAR2 (80),
    rule_id                  VARCHAR2 (5)
    TYPE g_tab_type IS TABLE OF g_rec INDEX BY BINARY_INTEGER;
    g_tab   g_tab_type;
    i       BINARY_INTEGER;
    procedure initializeTypePassMatrix(test  IN varchar2) as
    begin
    if(g_tab.COUNT < 1)then
    FOR appln_rec in (
    SELECT tb_type_cat_pass_matrix.id_no,
    tb_type_cat_pass_matrix.type_pass,
    tb_type_cat_pass_matrix.scheme_ind,
    tb_type_cat_pass_matrix.cat_pass,
    tb_type_cat_pass_matrix.entrepass,
    tb_type_cat_pass_matrix.display_type_pass,
    tb_type_cat_pass_matrix.display_cat_pass,
    tb_type_cat_pass_matrix.display_type_pass_desc,
    tb_type_cat_pass_matrix.rule_id
    FROM tb_type_cat_pass_matrix ORDER BY id_no asc)
    LOOP
    dbms_output.put_line('g_tab.COUNT before insert: ' || g_tab.COUNT);
    i := g_tab.COUNT + 1;
    g_tab (i).id_no         := appln_rec.id_no;
    g_tab (i).type_pass         := appln_rec.type_pass;
    g_tab (i).scheme_ind        := appln_rec.scheme_ind;
    g_tab (i).cat_pass          := appln_rec.cat_pass;
    g_tab (i).entrepass        := appln_rec.entrepass;
    g_tab (i).display_type_pass     := appln_rec.display_type_pass;
    g_tab (i).display_cat_pass     := appln_rec.display_cat_pass;
    g_tab (i).display_type_pass_desc:= appln_rec.display_type_pass_desc;
    g_tab (i).rule_id         := appln_rec.rule_id;
    DBMS_OUTPUT.put_line ('g_tab.count after insert: ' || g_tab.COUNT);
    END LOOP;
    else
    DBMS_OUTPUT.put_line ('g_tab>=1, no need to initialize');
    end if;
    exception
    when others then
    dbms_output.put_line('error happen'||DBMS_UTILITY.format_error_backtrace);
    Logger.ERROR('TYPE_CAT_PASS_UTIL.initializeTypePassMatrix',SQLCODE,SQLERRM || ' ' ||DBMS_UTILITY.format_error_backtrace,'SYSTEM');
    end initializeTypePassMatrix;
    procedure populateTypeCatPassFullDesc(typePass  IN varchar2, schemeInd IN varchar2,catPass IN varchar2,entrePass IN varchar2, displayTypePass IN OUT varchar2,displayTypePassDesc IN OUT varchar2, displayCatPass IN OUT varchar2 )is
    v_displayTypePass varchar2(15) :='-';
    v_displayTypePassDesc varchar2(100) :='-';
    v_displayCatPass   varchar2 (2):='-';
    v_type_pass  varchar2(3)  := '';
    v_scheme_ind  varchar2(5) := '';
    v_cat_pass  varchar2(2);
    v_entrepass  varchar2(2);
    v_flag_valid_1 boolean:=false;
    v_flag_valid_2 boolean:=false;
    v_flag_valid_3 boolean:=false;
    v_flag_valid_4 boolean:=false;
    v_appln_rec g_rec;
    begin
    dbms_output.put_line('line 1');
    initializeTypePassMatrix('test');
    FOR nomor in g_tab.FIRST .. g_tab.LAST
    LOOP
    v_appln_rec := g_tab(nomor);
    dbms_output.put_line('line 2.1');
    v_flag_valid_1 :=false;
    v_flag_valid_2 :=false;
    v_flag_valid_3 :=false;
    v_flag_valid_4 :=false;
    v_type_pass     := v_appln_rec.type_pass;
    v_scheme_ind    := v_appln_rec.scheme_ind;
    v_cat_pass     := v_appln_rec.cat_pass;
    v_entrepass    := v_appln_rec.entrepass;
    dbms_output.put_line('line 2.2');
    if(typePass =  v_type_pass or v_type_pass = 'NA') then
    v_flag_valid_1:= true;
    end if;
    if(schemeInd = v_scheme_ind or v_scheme_ind='NA') then
    v_flag_valid_2 := true;
    elsif(schemeInd is null and v_scheme_ind is null) then
    v_flag_valid_2 := true;
    end if;
    if(catPass = v_cat_pass or v_cat_pass='NA') then
    v_flag_valid_3 := true;
    elsif(catPass is null and v_cat_pass is null) then
    v_flag_valid_3 := true;
    end if;
    if(entrePass = v_entrepass or v_entrepass='NA') then
    v_flag_valid_4 := true;
    end if;
    if(v_flag_valid_1 = true and v_flag_valid_2 = true and v_flag_valid_3 = true and v_flag_valid_4 = true) then
    v_displayTypePass     := v_appln_rec.display_type_pass;
    v_displayCatPass     := v_appln_rec.display_cat_pass;
    v_displayTypePassDesc   := v_appln_rec.display_type_pass_desc;
    dbms_output.put_line('rule id got :'||v_appln_rec.rule_id);
    dbms_output.put_line('rule no got :'||v_appln_rec.id_no);
    exit when (0 = 0);
    end if;
    END LOOP;
    displayTypePass := v_displayTypePass;
    displayCatPass  := v_displayCatPass;
    dbms_output.put_line('1type:' || v_displayTypePassDesc);
    displayTypePassDesc :=    v_displayTypePassDesc;
    dbms_output.put_line('2type:' || displayTypePassDesc);
    dbms_output.put_line('type:' || v_displayTypePass);
    dbms_output.put_line('cat :' || v_displayCatPass);
    exception
    when others then
    dbms_output.put_line('error happen'||DBMS_UTILITY.format_error_backtrace);
    Logger.ERROR('TYPE_CAT_PASS_UTIL.populateTypeCatPass',SQLCODE,SQLERRM || ' ' ||DBMS_UTILITY.format_error_backtrace,'SYSTEM');
    end populateTypeCatPassFullDesc;
    function getDisplayTypePass(typePass  IN varchar2, schemeInd IN varchar2,catPass IN varchar2,entrePass IN varchar2) return varchar2 is
    v_displayTypePass varchar2(15) :='-';
    v_displayTypePassDesc varchar2(100) :='-';
    v_displayCatPass varchar2(2) :='-';
    begin
    populateTypeCatPassFullDesc(typePass,schemeInd,catPass,entrePass,v_displayTypePass,v_displayTypePassDesc,v_displayCatPass);
    return  v_displayTypePass;
    exception
    when others then
    dbms_output.put_line('error happen'||DBMS_UTILITY.format_error_backtrace);
    Logger.ERROR('TYPE_CAT_PASS_UTIL.populateTypeCatPass',SQLCODE,SQLERRM || ' ' ||DBMS_UTILITY.format_error_backtrace,'SYSTEM');
    end getDisplayTypePass;
    end TYPE_CAT_PASS_UTIL_TEST;
    By Using like above even i do query on select * from <some_view) it will be only one execution for
    SELECT tb_type_cat_pass_matrix.id_no,*
    **tb_type_cat_pass_matrix.type_pass,**
    **tb_type_cat_pass_matrix.scheme_ind,**
    **tb_type_cat_pass_matrix.cat_pass,**
    **tb_type_cat_pass_matrix.entrepass,**
    **tb_type_cat_pass_matrix.display_type_pass,**
    **tb_type_cat_pass_matrix.display_cat_pass,**
    **tb_type_cat_pass_matrix.display_type_pass_desc,**
    **tb_type_cat_pass_matrix.rule_id**
    **FROM tb_type_cat_pass_matrix ORDER BY id_no asc*
    the key point is the initializeTypePassMatrix function but it seems the variable only works for one session ?
    if i open new session it will be reset again .

  • Need to know how to find the last execution time for a function module

    HI all
    I need to know
    1) How to find out the last execution time of the function module ?
      say for eg. I have executed a func. module at 1:39pm. How to retrieve this time  (1:39pm)
    2) I have created 3 billing document in tcode VF01 i.e 3 billing doucment no. would be created in SAP TABLE "VBRP" b/w 12am to 12:30 am.
    How to capture the latest SAP database update b/w time intervals?
    3) Suppose I am downloading TXT file using "GUI_DOWNLOAD" and say in 20th record some error has happened. I can capture the error using the exception.
    Is it possible to run the program once again from 21st records ? All this will be running in background...
    Kindly clarify....
    Points will be rewarded
    Thanks in advance

    1.Use tcode STAT input as Tcode of Fm and execute .
    2. See the billing documents are created in table VBRk header and there will always be Creation date and time.
    VBRk-Erdat "date ., u can check the time field also
    So now if u talk the date and time we can filter then display the records in intervals.
    3. with an error exeption how is my txt download finished .
    once exception is raised there will not be a download .
    regards,
    vijay

  • Execution Times of Stored Procedures Called from Other Stored Procedures

    If I execute sys.dm_exec_procedure_stats, it will produce execution times of my stored procedures executed recently.
    However, stored procedures called from other stored procedures do not show up.
    Is there code that can return the execution times of stored procedures even though they are called from other stored procedures.

    Look at the example. It is counting nested execution.
    CREATE PROC z1SP AS SELECT * FROM Production.Product;
    GO
    CREATE PROC z2SP AS SELECT * FROM Production.Product WHERE Color is not null; EXEC z1SP;
    GO
    SELECT object_name(2002822197), object_name(2034822311);
    --z1SP z2SP
    EXEC z1SP; EXEC z2SP;
    GO 10
    SELECT * from sys.dm_exec_procedure_stats
    database_id object_id type type_desc cached_time last_execution_time execution_count
    16 2002822197 P SQL_STORED_PROCEDURE 2014-12-16 13:02:45.170 2014-12-16 13:02:46.717 20
    16 2034822311 P SQL_STORED_PROCEDURE 2014-12-16 13:02:45.460 2014-12-16 13:02:46.687 10
    Kalman Toth Database & OLAP Architect
    SQL Server 2014 Database Design
    New Book / Kindle: Beginner Database Design & SQL Programming Using Microsoft SQL Server 2014

  • Procedure execution time difference in Oacle 9i and Oracle 10g

    Hi,
    My procedure is taking time on
    Oracle Database 10g Enterprise Edition Release 10.2.0.1.0 is 14 min.
    same procedure is taking time on oracle Release 9.2.0.1.0 is 1 min.
    1) Data is same in both environment.
    2) Number of records are same 485 rows for cursor select statement.
    3)Please guide me how to reduce the time in oracle 10g for procedure?
    i have checked the explain plan for that cursor query it is different in both enviroment.
    so i have analysis that procedure is taking time on cursor fetch into statement in oracle 10g.
    example:-
    create or replace procedure myproc
    CURSOR cur_list
    IS select num
    from tbl
    where exist(select.......
    EXECUTE IMMEDIATE 'ALTER SESSION SET SQL_TRACE = TRUE';
    EXECUTE IMMEDIATE 'ALTER SESSION SET TIMED_STATISTICS = TRUE';
    OPEN cur_list;
    LOOP
    FETCH cur_list INTO cur_list; -----My procedure is taking time in this statement only for some list number. there are 485 list number.
    end loop;
    TRACE file for oracle 10g is look like this:-
    call count cpu elapsed disk query current rows
    Parse 1 0.00 0.00 0 0 0 0
    Execute 1 0.37 0.46 0 2 0 0
    Fetch 486 747.07 730.14 1340 56500700 0 485
    total 488 747.45 730.60 1340 56500702 0 485
    ORACLE 9i EXPLAIN PLAN FOR cursor query:-
    Plan
    SELECT STATEMENT CHOOSECost: 2 Bytes: 144 Cardinality: 12                                         
         18 INDEX RANGE SCAN UNIQUE LISL.LISL_LIST_PK Cost: 2 Bytes: 144 Cardinality: 12                                    
              17 UNION-ALL                               
                   2 FILTER                          
                        1 TABLE ACCESS FULL SLD.P Cost: 12 Bytes: 36 Cardinality: 1                     
                   16 NESTED LOOPS Cost: 171 Bytes: 141 Cardinality: 1                          
                        11 NESTED LOOPS Cost: 169 Bytes: 94 Cardinality: 1                     
                             8 NESTED LOOPS Cost: 168 Bytes: 78 Cardinality: 1                
                                  6 NESTED LOOPS Cost: 168 Bytes: 62 Cardinality: 1           
                                       4 TABLE ACCESS BY INDEX ROWID SLD.L Cost: 168 Bytes: 49 Cardinality: 1      
                                            3 INDEX RANGE SCAN UNIQUE SLD.PK_L Cost: 162 Cardinality: 9
                                       5 INDEX UNIQUE SCAN UNIQUE SLD.SYS_C0025717 Bytes: 45,760 Cardinality: 3,520      
                                  7 INDEX UNIQUE SCAN UNIQUE SLD.PRP Bytes: 63,904 Cardinality: 3,994           
                             10 TABLE ACCESS BY INDEX ROWID SLD.P Cost: 1 Bytes: 10,480 Cardinality: 655                
                                  9 INDEX UNIQUE SCAN UNIQUE SLD.PK_P Cardinality: 9           
                        15 TABLE ACCESS BY INDEX ROWID SLD.GRP_E Cost: 2 Bytes: 9,447 Cardinality: 201                     
                             14 INDEX UNIQUE SCAN UNIQUE SLD.PRP_E Cost: 1 Cardinality: 29                
                                  13 TABLE ACCESS BY INDEX ROWID SLD.E Cost: 2 Bytes: 16 Cardinality: 1           
                                       12 INDEX UNIQUE SCAN UNIQUE SLD.SYS_C0025717 Cost: 1 Cardinality: 14,078      
    ORACLE 10G EXPLAIN PLAN FOR cursor query:-                                   
         SELECT STATEMENT ALL_ROWSCost: 206,103 Bytes: 12 Cardinality: 1                                         
         18 FILTER                                    
              1 INDEX FAST FULL SCAN INDEX (UNIQUE) LISL.LISL_LIST_PK Cost: 2 Bytes: 8,232 Cardinality: 686                               
              17 UNION-ALL                               
                   3 FILTER                          
                        2 TABLE ACCESS FULL TABLE SLD.P Cost: 26 Bytes: 72 Cardinality: 2                     
                   16 NESTED LOOPS Cost: 574 Bytes: 157 Cardinality: 1                          
                        14 NESTED LOOPS Cost: 574 Bytes: 141 Cardinality: 1                     
                             12 NESTED LOOPS Cost: 574 Bytes: 128 Cardinality: 1                
                                  9 NESTED LOOPS Cost: 573 Bytes: 112 Cardinality: 1           
                                       6 HASH JOIN RIGHT SEMI Cost: 563 Bytes: 315 Cardinality: 5      
                                            4 TABLE ACCESS FULL TABLE SLD.E Cost: 80 Bytes: 223,120 Cardinality: 13,945
                                            5 TABLE ACCESS FULL TABLE SLD.GRP_E Cost: 481 Bytes: 3,238,582 Cardinality: 68,906
                                       8 TABLE ACCESS BY INDEX ROWID TABLE SLD.L Cost: 2 Bytes: 49 Cardinality: 1      
                                            7 INDEX UNIQUE SCAN INDEX (UNIQUE) SLD.PK_L Cost: 1 Cardinality: 1
                                  11 TABLE ACCESS BY INDEX ROWID TABLE SLD.P Cost: 1 Bytes: 16 Cardinality: 1           
                                       10 INDEX UNIQUE SCAN INDEX (UNIQUE) SLD.PK_P Cost: 0 Cardinality: 1      
                             13 INDEX UNIQUE SCAN INDEX (UNIQUE) SLD.SYS_C0011870 Cost: 0 Bytes: 13 Cardinality: 1                
                        15 INDEX UNIQUE SCAN INDEX (UNIQUE) SLD.PRP Cost: 0 Bytes: 16 Cardinality: 1      
    so Please guide me how to reduce the time in oracle 10g for procedure?
    1) Is this envrionment setting parameter?
    2) I have to tune the query? but which is executing fine on oracle 9i?
    so how to decrease the execution time?
    Thanks in advance.

    SELECT l_nr
    FROM x.ls b
    WHERE b.cd = '01'
    AND b.co_code = '001'
    AND EXISTS (
    SELECT T_L
    FROM g.C
    WHERE C_cd = '01'
    AND C_co_code = '001'
    AND C_flg = 'A'
    AND C_eff_dt <= sysdate
    AND C_end_dt >=
    sysdate
    AND C_type_code <> 1
    AND C_type_code <> 1
    AND targt_ls_type = 'C'
    AND T_L <> 9999
    AND T_L = b.l_nr
    UNION ALL
    SELECT l.T_L
    FROM g.C C,
    g.ep_e B,
    g.ep ep,
    g.e A,
    g.lk_in l
    WHERE l.cd = '01'
    AND l.co_code = '001'
    AND l.cd = C.C_cd
    AND l.co_code = C.C_co_code
    AND l.C_nbr = C.C_nbr
    AND l.targt_ls_type = 'C'
    AND lk_in_eff_dt <=
    sysdate
    AND lk_in_end_dt >=
    ( sysdate
    + 1
    AND ( (logic_delte_flg = '0')
    OR ( logic_delte_flg IN ('1', '3')
    AND lk_in_eff_dt <> lk_in_end_dt
    AND l.cd = ep.C_cd
    AND l.co_code = ep.C_co_code
    AND l.C_nbr = ep.C_nbr
    AND l.ep_nbr = ep.ep_nbr
    AND l.cd = A.e_cd
    AND l.co_code = A.e_co_code
    AND l.e_nbr = A.e_nbr
    AND l.cd = B.cd
    AND l.co_code = B.co_code
    AND l.C_nbr = B.C_nbr
    AND l.ep_nbr = B.ep_nbr
    AND l.e_nbr = B.e_nbr
    AND l.ep_e_rev_nbr = B.ep_e_rev_nbr
    AND B.flg = 'A'
    AND EXISTS (
    SELECT A.e_nbr
    FROM g.e A
    WHERE A.e_cd = B.cd
    AND A.e_co_code = B.co_code
    AND A.e_nbr = B.e_nbr
    AND A.e_type_code ^= 8)
    AND C_type_code <> 10
    AND C.C_type_code <> 13
    AND l.T_L = b.l_nr)
    --yes index is same                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                           

  • Execution time of procedures

    How can find out the execution time of procedures.
    I've debug and find why a procedure takes so much time for its execution.
    Could someone please help me with tips or links to useful info.

    First you can use the SQLPlus feature "set timing on" This will print the run time of each SQL or pl/sql procedure executed in the session.
    Second you can modify the pl/sql code to include timing information so as the code runs it dumps and/or calculates step and procedure run time.
    Third look at the dbms_profiler package Oracle provides.
    HTH -- Mark D Powell --

  • How to know child procedure Execution time with in parent procedure

    Hi Team,
    I've a requirement in which I need to get the execution time of a child procedure while its running in a parent procedure in PLSQL. While the child process is running, I want to know its execution time so that if it execution time exceeds more than 5 seconds than I want to through an error. Please let me know by what means this can be achieved in plsql.
    Regards,
    Tech D.

    TechD wrote:
    Hi Team,
    I've a requirement in which I need to get the execution time of a child procedure while its running in a parent procedure in PLSQL. While the child process is running, I want to know its execution time so that if it execution time exceeds more than 5 seconds than I want to through an error. Please let me know by what means this can be achieved in plsql.
    Regards,
    Tech D.PL/SQL is NOT a Real Time programming language.
    The procedure that invokes the child procedure is effectively dormant while the child runs.
    Plus there is no easy way to know when 5 seconds has elapsed.

  • Execution time for Call Library Function Node

    I am experimenting with the Call Library Function Node block in LabVIEW and am curious if it should be running faster than what I'm seeing.  For testing purposes, I have compiled and transfered to my RT target the .out file from the KB article http://digital.ni.com/public.nsf/allkb/81D1172E3C28A5E4862575CC0076A230 (I'm using the vxworks 6.1 version).  The function in the .out file just multiplies two inputs together, adds a constant, and returns the result.  I have put this inside a 1 kHz timed loop with a commanded period of 1 ms and via the Ticks(ms) block and shift registers I calculate the amount of time per loop execution.  This process is apparently taking 5 ms per cycle and to me that seems slow.  Is that roughly the correct execution time for this kind of setup?  I will attach my test .vi file.
    What I'm using:
    Windows 7
    LabVIEW 2009 SP1
    NI-cRIO 9024 with NI-RIO 3.4.0
    Solved!
    Go to Solution.
    Attachments:
    test DLL.vi ‏31 KB

    First off, the way you are doing timing isn't necessarily accurate because you don't know when the tick count VI is being called. For example, if it gets called on one iteration after your call library node executes, and the next iteration it gets called before the CLFN it executes, the subtraction doesn't include the call of the CLFN so you aren't seeing the true time it is taking for the dll to be called.
    Where it says "error" on the top left hand corner of your loop. left click and choose previous iteration timing. Also, do you have the ability to choose a 1 Mhz clock? Are you sure it's actually being run on the RT and not on your PC? Running it on the PC would definitely make it difficult to execute at a 1 kHz rate.
    CLA, LabVIEW Versions 2010-2013

  • Measure procedure execution time..

    Hi,
    Is there any possibility to measure how long each of a procedure in database take?? Is that possible for Oracle's V$ views or by performance report like AWR? On the other hand, is that possible to measure execution time for SQL statements, but without using "set timing on".
    Best,
    tutus

    This is just an add-on to Satish's reply. You may want to chck this link to see how Profiler works,
    http://www.oracle-base.com/articles/9i/DBMS_PROFILER.php
    HTH
    Aman....

  • Long procedure execution time

    Hello,
    I hav a procedure which consists of select and insert statements(includes Union, Minus, DataType conversions etc.). Three tables of around 27 fields each, are involved in procedure. Table has around 87-90 lakhs of records. This procedure is taking around 7-8 hours for execution.
    There is another almost exactly same procedure with tables of almost same fields, takes less than 5 minutes for execution. How can I optimize the previous procedure so that execution time is reduced.
    Thanks.

    Table has around 87-90 lakhs of records. 1 lakh is 100,000 records.
    How can I optimize the previous procedure so that execution time is reduced.Without even knowing how the procedure looks, we can't comment or even able to help you. Apart from the number of columns and rows, we don't have any other information regarding your procedure or data or index.
    Please elaborate so that anyone can help you.
    Cheers
    Sarma.

Maybe you are looking for

  • Scheduling Error

    Hello, I am getting the following error when trying to schedule a report: oracle.apps.xdo.servlet.scheduler.ProcessingException: Error occurred while scheduling the job.      at oracle.apps.xdo.servlet.ui.scheduler.SchedulerServlet.getDateObject(Sche

  • SAP PI 7.1 Mapping resource not found

    Hello Gururs, We have been experiencing the issue on our QA SAP PI system after upgrade to 7.1 eHP1. We just imported new set of components under new SWCV and namespace. While trying to process the message, getting below error. I already checked all

  • How do you make an array of image icons and then call them?

    How do you make an array of image icons and then call them, i have searched all over the internet for making an array of icons, but i have found nothing. Below is my attempt at making an array of icons, but i cant seem to make it work. Basically, i w

  • How to remove app that I don't use from ipad, icloud, everywhere?

    I bought some app a long time ago that I do not want to use ever. I have already remove the icon from the ipad and from my iphone, but it is saved in icloud. I want it to go away from icloud so that it would free up my icloud memory for other storage

  • Tax code and price list not appear automatic

    Hi My Dear, i work in R12.1.1 (solution beacon) -I assigned tax out classification code to an item from the master item,when navigate to sales order and enter the item,the tax code dose not joined with item ,it should be selected from the LOV - also