calculate the time required to perform 100 procedures simultaneously...

roceduresHello,

I wrote a Java program that creates multiple threads, each son establishes a connection, and then each of them calls (simultaneously) a procedure stored in the Oracle database.

I want to know how can I measure the execution time (all) simultaneously stored procedures.

Can I do this using Java or sql, sql developer, maybe?

My idea: in java, difference between time system after discussions started and join in discussions. But which also includes the time to connect to the database... so...?

If each thread calls the stored procedure, where should I call a method called System.getNanoTime ()? Before the call to the procedure? Threads run simultaneously...

Your help would be very appreciated.

> ... Should I start measuring when the son begin to run until they are all nearby?

Yes, if you want to measure the time from start to finish all procedures in the database, you can work this way.

If the creating connection is significant with regard to the duration of the procedure of database, you can use the connection pool.

Kind regards

Zlatko

Tags: Database

Similar Questions

  • How to identify the time required to run a package

    Hi all

    Is the method without TKPROFF to find the time to run a package that calls a procedure.

    for the examples

    Lets say I run a packaage to SQLplus window

    SQL > Execute my_pack.bal_proc;

    (It took some time may be 4 hrs according to my watch).

    At this point if I want to find the time by a sql command that after running the package, which was the time.

    can someone help me find a query which tell what was the time required to run a package.

    Thanks n rgds
    Saaz

    Before execution:
    SET TIMING ON

    Then run your procedure. For example:

    SQL> SET TIMING ON
    
    SQL> Execute my_pack.bal_proc;
    
    PL/SQL procedure successfully completed.
    
    Elapsed: 00:00:00.00
    

    Miguel

  • cannot update Windows XP (KB2345886). What is the time required to download "fix It."

    I downloaded the fix to resolve the problem. It is said that difficulty it will not work with our runtime. Q - What is the time required for an alternative for the update above. Thank you

    Hi TorahHavurah,

    For two updates install, have you tried to download directly to install.  You can go here for KB2718704 and you can go here for KB2345886.

    For the .NET error, I suggest to try for the .NET Framework cleanup tool to see if that helps.

    I hope this helps!

  • calculate the time difference.

    Hello

    How to calculate the time difference by using javascript.

    Example 15.05 and18.35 difference is 2 h 30 min

    BTW: it isn't ~ 2h30min is 3h30min

    Maybe something like this works:

    // result is 3.300000000000002 ~ 3h 30min
    (parseFloat((18.35 - 15.05) / 3600) * 3600)
    
  • Calculate the time (time zones)

    Hello

    I'm trying to calculate the time (hours and minutes) needs to travel between point a and point b in terms of the time difference between the time zones.

    IE: A flight leaves New York at 17:00 and arrives in Frankfurt the next at 07:00

    Thanks for your help!

    SELECT TZ_OFFSET('America/New_York') new_york, TZ_OFFSET('Europe/Berlin') Frankfurt,

    TO_TIMESTAMP_TZ ('20140818170000-04:00 ','yyyymmddhh24misstzh:tzm ') flight_start,

    TO_TIMESTAMP_TZ ('20140819070000 + 02:00 ','yyyymmddhh24misstzh:tzm ') flight_end,

    TO_TIMESTAMP_TZ ('20140819070000 + 02:00 ','yyyymmddhh24misstzh:tzm ') - to_timestamp_tz ('20140818170000-04:00 ','yyyymmddhh24misstzh:tzm ') flight_duration

    OF THE DOUBLE

    NEW_YORK FRANKFURT FLIGHT_START FLIGHT_END FLIGHT_DURATION
    -04:00 + 02:00 18 AUGUST 14 05.00.00.000000000 PM - 04:00 AUGUST 19, 14 07.00.00.000000000 + 02:00 AM + 08:00:00.000000000 000000000

    Concerning

    Etbin

  • How to calculate the time to SELECT

    I want to know how to calculate the time taken by the SELECT query.

    For example: I run a select statement in TOAD (oracle version 9i) who takes 40 seconds to run, but in the output window, it displays few records. It says "list 1 of 500 records, more records exist". This table has total 20 million records.

    Now my question is: have you my SELECT query took 40 seconds? or it took 40 seconds to SELECT 500 records.

    If it took 40 seconds to SELECT 500 records then how to calculate the total amount?

    Any help would be much appreciated.

    To avoid the exit which is probably not really need you can make

    begin
      for c in (select * from xy /*your query */)
      loop
        null;
      end loop;
    end;
    /
    

    This gives an estimate of the time to recover all the lines.

  • Is there an easy way to calculate the time difference?

    I am trying to find a way to calculate the time difference between

    here at a certain time

    var settime:Number = 02:35

    and

    now would be getDate();

    I tried something rediculus, but it does not work when I entered a date less than 24 hours, is there a class out there who can just this kind of things

    or y at - it something on the internet that could tell me the difference between different time

    Thank you

    My attempt

    var date: Date = new Date();

    Set timer to what would I like to call the function
    var lastcallH:Number = 22;
    var lastcallM:Number = 50;
    var lastcallS:Number = 0;

    Set up of the 24-hour clock
    var tHour:Number = 24;
    var tMinute:Number = 60;
    var tSecond:Number = 60;

    Get the current time
    var cHour:Number = date.getHours ();
    var cMinutes:Number = date.getMinutes ();
    var cSeconds:Number = date.getSeconds ();

    Set the first variable
    var fH:Number;
    var fM:Number;
    var fS: Number;

    A second set of Variable
    var sH: number;
    var sM:Number;
    var sS:Number;

    Final conversion for the Timer
    var finalMil:Number;

    Time variables that will need to be converted

    If (lastcallH < Thur)
    {
    fH = chorus - Thur;
    fM = cMinutes - tMinute;
    fS = cSeconds - tSecond.
    finalMil = (sH * 60) + (sM * 60) + (sM * 60);
    }
    ElseIf (cMinutes > 0 | cSeconds > 0) {}
    ++ Choir;
    ++ cMinutes;
    fH = chorus - Thur;
    fM = cMinutes - tMinute;
    fS = cSeconds - tSecond.
    }
    else {}
    fH = chorus - Thur;
    fM = cMinutes - tMinute;
    fS = cSeconds - tSecond.
    }

    sH = fH + lastcallH;
    sM = fM + lastcallM;
    sS = fS + lastcallM;

    If (< 0 sH: sM < 0 | sS < 0)
    {
    sH = sH * (-1);
    sM = sM * (-1);
    sS = sS * (-1);
    }
    finalMil = (sH * 60) + (sM * 60) + (sM * 60);

    Allows you to implement a timer
    var yahooTime:Timer = new Timer (finalMil, repeat);
    var repeat: Number = 1;

    yahooTime.start ();

    yahooTime.addEventListener (TimerEvent.TIMER, displayCall);

    function displayCall(event:TimerEvent):void
    {
    trace ("well let's success");
    }

    your first trace() statement is almost certainly not what you want.

    dtDate2 is 08/08/2009

    and it's probably not what you want.  Flash months are zero-based.  That is to say, January corresponding to month 0 and December is the month 11.

  • How to calculate the time

    I want to calculate the time. I want to subtract ' 01:00:00 ' AM currently, but I am getting error.

    SQL > /.
    Select to_char('01:00:00','HH24:MI:SS')-to_char(sysdate,'HH24:MI:SS') double
    *
    ERROR on line 1:
    ORA-01722: invalid number

    can someone help me

    Thank you

    Not sure what you mean. If you want to subtract an hour from a date, keep in date arithmetic spirit uses day as a unit. To subtract an hour from a date, you need to subtract 1/24:

    SQL> alter session set nls_date_format = 'MM/DD/YYYY HH24:MI:SS'
      2  /
    
    Session altered.
    
    SQL> select sysdate,sysdate - 1/24 from dual
      2  /
    
    SYSDATE             SYSDATE-1/24
    ------------------- -------------------
    08/09/2009 09:55:28 08/09/2009 08:55:28
    
    SQL> 
    

    SY.

  • calculate the time in seconds, the day of the year and year

    I have a data file where they record three columns, the seconds elapsed since midnight, day of the year and the year.  I am creating a timestamp of LabVIEW from these three numbers.  Of seconds elapsed since midnight, I can create seconds, minutes and hours.  If I feed in a cluster of time with the day of the year and the year, the timestamp of output is 0.  Does not work.  Although an input of the day of the year element, the Date and time with seconds function apparently requires day for months and months to work.

    The only solution I can imagine at this stage is to calculate the month and the day of the day of the year, which would imply a choice of the month table and a check of the leap year.

    Smart solutions, I'm missing?

    DaveT

    Dave,

    I found a Julian Georgian so far.

  • "Database of the time spent waiting (%) "is 100 for the class of events 'competition '.

    Hello

    When start Enterprise Manager in Oracle 10 g, I have the following warning:

    'Database time spent waiting (%) "represent 100 for the class of events 'competition '.

    I'm new to the topic of listening, what I do with the warning?

    Greetings,

    >
    When start Enterprise Manager in Oracle 10 g, I have the following warning:

    'Database time spent waiting (%) "represent 100 for the class of events 'competition '.

    I'm new to the topic of listening, what I do with the warning?
    >

    Are there conclusions ADDM OEM homepage? If so, click it and let ADDM say the cause of competition and let make you a recommendation. If this is not the case, go to the ADDM (Central Advisor-> ADDM) page and click 'Run ADDM to analyze current performance of proceedings'. It then (probably) will give you findings and recommendations.

    Kind regards
    Uwe

    http://uhesse.WordPress.com

  • QML: calculate the time interval between the touch events

    I create a custom button that is activated by a key event, in this way:

    Container {
        property bool pressed
        signal clicked...
        onTouch: {
            if (enabled && ! event.isMove()) {
                if (event.isUp() && pressed) clicked()
                pressed = event.isDown()
            }
        }
    }
    

    The problem with this approach is that if the user clicks the custom button several times in a short period of time the click signal is triggered several times too. This does not happen if I use a regular button or an ImageButton.

    I was thinking about getting the timestamp of the event and fire the only if clicked event grit touch after at least x milliseconds since the previous event. The DIF is that I couldn't find a way to calculate this difference in QML.

    Any suggestions?

    You could also follow the time of the last event with the Javascript date.

    lastTouched = new Date().valueOf();
    

    -Check if time has passed...

  • I am dual-boot between Windows 7 and Windows 8, but fear the time required to start,

    I am concerned about the time it takes my computer to start
    I have a system dual boot with Windows 7 and Windows 8, and it takes several minutes to decide to show me the screen to decide which OS to use, and then it restart and takes some time to start [the chosen OS
    Isn't time that Microsoft has put some of their skills as computers immediately when starting lit instead of focus on trying to outdo all other systems with stuff
    By the way, I have the same comment on the closure, it takes some time to completely close down--another point for Microsoft to put the attention

    Unfortunately, the processor is just at the level of the minimum required. In addition, RAM is 4 GB, in which folder page size will be approximately 8 GB. Norton 360 scans all files prior to execution, even if it's a system file. This is the reason for the delay.

    Try to upgrade the processor and the rest will be solved.
  • How to calculate the time difference

    Hi friends,

    I want to calculate and the sum of the time difference.

    I have two fields in a table. Inside and OUTSIDE. for example.

    OUT IN DIFFERENT

    01:46 15:30?

    01:47 15:45?

    02:50 17:30?

    I want less above figure and the result will appear in different column.

    Help, please

    Kind regards

    Hello

    Assuming that the two columns are the VARCHAR2 data type and "represent" the hours and minutes:

    WITH sample_data AS (SELECT ' 01:46 ' in_col, 15:30 ' out_col FROM DUAL)

    UNION ALL

    SELECT ' 01:47 ' 15:45 ' OF THE DOUBLE

    UNION ALL

    SELECT ' 02:50 ', 17:30 ' OF THE DOUBLE

    )

    SELECT in_col,

    out_col,

    TO_CHAR (TO_DATE ((TO_DATE(out_col, 'HH24:MI')-TO_DATE(in_col, 'HH24:MI')) * 86400, «SSSSS»), "HH24") differ))

    OF sample_data;

    SQL > WITH sample_data AS (SELECT ' 01:46 ' in_col, 15:30 ' out_col FROM DUAL)

    2. ANY TRADE UNION

    3. SELECT ' 01:47 ' 15:45 ' OF THE DOUBLE

    4 UNION ALL

    5. SELECT ' 02:50 ', 17:30 ' OF THE DOUBLE

    6                      )

    7. SELECT in_col,

    out_col 8,.

    9 to_char (TO_DATE ((TO_DATE(out_col, 'HH24:MI')-TO_DATE(in_col, 'HH24:MI')) * 86400, «SSSSS»), "HH24") differ))

    10 FROM sample_data;

    IN_COL OUT_COL DIFFER

    ------ ------- ------

    01:46 15:30 13:44

    01:47 15:45 13:58

    02:50 17:30 14:40

    SQL >

  • Estimate the time required to upgrade the h/w VM

    Hello

    It is finally time to upgrade my VI3.5.

    I expect the downtime required for virtual machines.

    Could someone advise, your past experience, the amount of time required to upgrade each VM h/w?

    Or which could be used to estimate as a point of departure for me?

    Appreciate your help.



    ~ ~ ~ Live is to die ~ ~ ~

    mbx369,

    We passed one of our sites from 3.5 to 4 last week. We had planned for 1 hour of downtime, and in the end, there were about the same downtime as a reboot. There should be minimum downtime for your virtual machine, if you want to be upgrading the current hosts using the same hardware, you can put all your guests on a single host... upgraded to another, and then add the virtual machine to the new inventory of the hosts. I hope this helps!

  • Calculate the time period

    I want to calculate the date to end date of beginning period, but I have problem
    For example, my start date is 'August 21, 2011' and my End Date is "August 21, 2012".
    So I want to result as months of the year and days like this is "2 YEARS".
    I wrote this command from pl/sql, but I figured it
    "TWO YEARS AND SIX DAYS."
    Please tell me how to calculate this period
    I have enclosed my query

    ----------------- QUERY ----------------------
    Declare
    number of mtot_days;
    number of mdays;
    number of myears;
    number of mmonths;
    V_Month Varchar2 (10);
    V_Year Varchar2 (10);
    V_Days Varchar2 (10);
    Start
    break;
    mtot_days: days = (: from_date,: to_date);
    myears: = floor(mtot_days/365);
    mmonths: = floor(mtot_days/30);
    If mmonths = 12 then
    mmonths: = 0;
    end if;
    Mdays: = mod(mtot_days,30);
    If mmonths = 1 then
    V_Month: = "MONTHS";
    on the other
    V_Month: = "MONTHS";
    End If;

    If myears = 1 then
    V_Year: = "YEAR";
    on the other
    V_Year: = "YEARS";
    End If;
    If mdays = 1 then
    V_Days: = "DAY";
    on the other
    V_Days: = "DAYS";
    End If;

    If myears = 0 and mmonths! = 0 and mdays! = 0 then
    : period: = mmonths | ' ' || V_Month | «AND» | Mdays | ' ' || V_DAYS;
    ELSIF
    Mdays = 0 and mmonths! = 0 and myears! = 0 then
    : period: = myears | ' ' || V_Year | «AND» | mmonths | ' ' || V_Month;
    ELSIF
    mmonths = 0 and myears! = 0 and mdays! = 0 then
    : period: = myears | ' ' || V_Year | «AND» | Mdays | ' ' || V_Days;
    ELSIF
    myears = 0 and = 0 and mdays mmonths! = 0 then
    : period: = mdays | ' ' || V_Days;
    ELSIF
    Mdays = 0 and = 0 and myears mmonths! = 0 then
    : period: = myears | ' ' || V_Year;
    ELSIF
    Mdays = 0 and = 0 and mmonths myears! = 0 then
    : period: = mmonths | ' ' || V_Month;
    ELSIF
    Mdays! = 0 and myears! = 0 and mdays! = 0 then
    : period: = myears | » ' || V_Year | » ' || mmonths | » ' || V_Month | ' AND ' | Mdays | » ' || V_Days;
    on the other
    : period: not = "ANY TIME."
    End If;

    end;

    not every month has 30 days. Use ADD_MONTHS() instead:

    SET SERVEROUTPUT ON
    
    DECLARE
       v_start DATE := TO_DATE('21-AUG-2011', 'DD-MON-RRRR');
       v_end DATE := TO_DATE('22-JUN-2014', 'DD-MON-RRRR');
       v_cnt_years NUMBER := 0;
       v_cnt_months NUMBER := 0;
       v_cnt_days NUMBER := 0;
       v_date DATE;
    BEGIN
       v_date := v_start;
    
       WHILE ADD_MONTHS(v_date, 1) <= v_end
       LOOP
           v_date := ADD_MONTHS(v_date, 1);
           v_cnt_months := v_cnt_months + 1;
           IF v_cnt_months = 12 THEN
              v_cnt_years := v_cnt_years + 1;
              v_cnt_months := 0;
           END IF;
       END LOOP;
       v_cnt_days := v_end - v_date;
       --
       DBMS_OUTPUT.PUT_LINE(
           TO_CHAR(v_start, 'DD-MON-RRRR') || ' - ' ||
           TO_CHAR(v_end, 'DD-MON-RRRR') || ': ' ||
           v_cnt_years || ' Years, ' || v_cnt_months || ' Months, ' || v_cnt_days || ' Days');
    END;
    /
    

    outpupt vor several ranges:

    21-AUG-2011 - 20-AUG-2012: 0 Years, 11 Months, 30 Days
    
    21-AUG-2011 - 21-AUG-2012: 1 Years, 0 Months, 0 Days
    
    21-AUG-2011 - 22-AUG-2012: 1 Years, 0 Months, 1 Days
    
    21-AUG-2011 - 22-JUN-2014: 2 Years, 10 Months, 1 Days
    

    Published by: Serge the 25.03.2011 10:46

Maybe you are looking for