Calculation actual and average execution time

Hi guru,.

I have a scenario where I connect my moment of execution in a Table, and my batch


Batch_id Scenario_Name

1 Scen1

1 Scen2

1 Scen3

2 Scen1

2 Scen2

2 Scen3

3 Scen1

3 Scen2

3 Scen3

Now my question is I want to calculate the duration of actual execution and the execution time of the Avg, while Avg running time calculation, I current Batch_ID to exclusion of

Select scenario_name, count (scenario_name).

sum (MOD (FLOOR ((END_DATE-START_DATE) * 24 * 60 * 60), 60)) Total.

sum (MOD (FLOOR ((date_fin-START_DATE) * 24 * 60 * 60), 60)) count (scenario_name) Avg

of Execution_Log

-where batch_id = 1

Scenario_name group

This query will give me the result, but it's also including current Batch_Id

OK, try this query. I dropped the group by clause as the avg is the only present aggregation, and who is now handled through the analytical counterpart (with more partition by clause).

SELECT

A.BATCH_ID,

A.SCENARIO_NO,

A.SCENARIO_NAME,

C.TGT_TABLE_NAME,

A.START_DATE,

A.END_DATE,

A.EXECUTION_STATUS,

Decode(A.EXECUTION_STATUS,'COMPLETED','No Error','FAILED',A.ERROR_MESSAGE,null) ERROR_MESSAGE

MOD (G ((A.END_DATE-A.)) START_DATE) * 24 * 60 * 60), 60) TEMPS_REEL.

AVG (MOD (FLOOR ((A.END_DATE-A.START_DATE) * 24 * 60 * 60), 60)) on (A.scenario_name partition) AVG_TIME

To exec_log1 A

INNER JOIN exec_log2 B

ON A.BATCH_ID = B.BATCH_ID

AND A.BATCH_ID = 2

INNER exec_log3 C

ON A.SCENARIO_NO = C.SCENARIO_NO

AND A.SCENARIO_NAME = C.SCENARIO_NAME

ORDER BY A.SCENARIO_NAME ASC

I hope this helps.

Tags: Business Intelligence

Similar Questions

  • Host VI and cRIO execution time

    Hello

    I have a cRIO 9014, I run an application real-time with two loops and a host of VI in my PC, the host VI is slow kynda, but I would like to know if there is a way to check if the cRIO rotates at the speed it should run.

    Thank you.

    -Luis

    Luis,

    Here are the two methods for timing your code that I described in my last post. The top then loop uses a shift for you register say how long (ms) takes of each iteration of the loop. The structure of the bottom flat sequence will measure how much time (ms) a section of code takes to run.

  • calculation of the average value of the sorted data and polar route drawing

    Hello

    I did a VI that calculates the average value of the wind rotor/speed-ratio in the sections of 30 degrees (wind direction). He also called the polar plot of calculated data. Everything works, but I would like to make more detailed calculations and drawings, by increasing the resolution to 1 degree, or...

    Problem is VI, I did, is not easy on a large scale. At the moment, I have 12 parallel structures of switch-box to calculate the average value and build the array function to collect data calculated for Polar plot to draw the image in real time. I know it's probably the worst way to do it, but since I have done a few things with LV, it was the only way I managed to do what I wanted.

    Now, if I continue in same way to reach my goal, I have to create 360 Parallels switch-case structures... that are crazy.

    Something like the calculation of the average of the table or matrix (zero/empty values should not be calculated on average) inside the loop or similar way would probably be the best solution.

    So, polar plot drawing is not a problem, but creating a reasonalbe average metering system is. Any ideas?

    I would also like to rotare northward to the top (0 deg), and degrees of increase in a clockwise direction on polar ground dial plate (as on the compass).

    VI on the attachment. (simplified version of the complete system)

    I have signals:

    -Wind speed

    -wind direction

    -Rotor speed

    I want to:

    -calculate the average value of the speed of the wind / rotor - ratio in sections (5 degrees, 1 degree)

    -Draw a polar path of the wind rotor/speed-ratio of averages in propotion of wind direction

    I'm using LabView 2009

    Thank you very much.

    It is closer to what you're looking for?

  • How to calculate average daily time of the Start_Time and End_Time fields

    I am using ORACLE 11 G on Red Hat Linux, I have calculated the average daily time of multiple transactions for each day. The followign is the querry that shows the difference between the fields end_time start_ time and time.

    Select TRIP_LOAD_STARTED AS START_TIME, TRIP_LOAD_ENDED'RE END_TIME.

    ceil ((TRIP_LOAD_EDDT-TRIP_LOAD_STDT) * 1440) "time difference Bw Start and End.
    of GATE2GATE_ACTIVITY_VW
    Where TRIP_LOAD_STARTED > = February 1, 14 '
    AND TRIP_LOAD_ENDED < 3 February 14 '
    ORDER BY TRIP_LOAD_STARTED;

    The querry above gives me the result as follows:

    Start_Time End_Time time Diff bw begins and ends

    1 FEBRUARY 14 FEBRUARY 1, 14 18

    1 FEBRUARY 14 FEBRUARY 1, 14 18

    1 FEBRUARY 14 FEBRUARY 1, 14 18

    1 FEBRUARY 14 FEBRUARY 1, 14 18

    1 FEBRUARY 14 FEBRUARY 1, 14 18

    1 FEBRUARY 14 FEBRUARY 1, 14 18

    1 FEBRUARY 14 FEBRUARY 1, 14 12

    FEBRUARY 2, 14 2 FEBRUARY 14 29

    FEBRUARY 2, 14 2 FEBRUARY 14 29

    FEBRUARY 2, 14 2 FEBRUARY 14 29

    FEBRUARY 2, 14 2 FEBRUARY 14 29

    FEBRUARY 2 FEBRUARY 2, 14 14 19

    FEBRUARY 2 FEBRUARY 2, 14 14 19

    FEBRUARY 2 FEBRUARY 2, 14 14 19


    It shows two dates for which I want to get the average duration in minutes for each group to date by the start time.


    I use the following querry that probably gives me the average two days mentioned in where clause


    Select the floor (avg ((TRIP_LOAD_STARTED-TRIP_LOAD_ENDED) * 1440)) 'average of Minutes of time.

    of gate2gate_activity_vw

    Where TRIP_LOAD_STDT > = February 1, 14 '

    AND TRIP_LOAD_STDT < 3 February 14 ';

    Average duration in Minutes

    29

    Can someone help me to a daily average time calculated between start and end.

    Kind regards

    mhamidch

    Is that what you want:

    SELECT trunc (TRIP_LOAD_STARTED), trunc (TRIP_LOAD_ENDED).

    floor (avg (ceil ((TRIP_LOAD_ENDED-TRIP_LOAD_STARTED) * 1440))) Diff

    OF GATE2GATE_ACTIVITY_VW

    WHERE TRIP_LOAD_STARTED > = to_date('01/FEB/2014','dd/MON-YYYY')

    AND TRIP_LOAD_ENDED<>

    Trunc GROUP (TRIP_LOAD_STARTED), trunc (TRIP_LOAD_ENDED)

    Always the example of create table and insert statements to verify the results and use the to_date with date format function.

    Post edited by: Elya

  • Help please - issue of calculation of execution time

    Hello

    Version of DB: database Oracle 11 g Enterprise Edition Release 11.2.0.3.0
    Previous thread (RE: help please - issue of calculation of execution time) mode lock, therefore open new thread.

    Karthick_Arp thanks for your great help with the merge code.

    I modified my code with Merge statement instead of loops and internal loops.

    PFB code and output. But still I am negitive values over time of execution because end_time < start_time is coming. Please suggest me how to solve this problem.

    1 CREATE OR REPLACE PROCEDURE my_proc
    2 EAST
    3 sql_string VARCHAR2 (4000);
    4 v_start_time TIMESTAMP;
    5 v_end_time TIMESTAMP;
    6 v_rowcnt NUMBER;
    7. START
    8 FOR c1 IN (SELECT ROWNUM tab_no, tablename, TYPE
    9 FROM stored_ddl_policies by tablename) / * mourning tablename order * /.
    10 LOOP
    11 sql_string: = q']
    12 merge into #tablename # b
    13 using (select empkey, id, dt
    14de emp_base) on (a.empkey = b.empkey)
    15when matched then update set b.id = a.id, b.dt = a.dt] ";
    16 sql_string: = REPLACE (sql_string, "#tablename #", c1.tablename);
    17 v_start_time: = SYSTIMESTAMP;
    18
    19 sql_string EXECUTE IMMEDIATE.
    20
    21 v_end_time: = SYSTIMESTAMP;
    22 v_rowcnt: = SQL % ROWCOUNT;
    23 DBMS_OUTPUT.put_line (c1.tablename); / * added for display * /.
    24 DBMS_OUTPUT.put_line (v_start_time);
    25 DBMS_OUTPUT.put_line (v_end_time);
    26 INSERT INTO exec_time (TABLE_NAME, START_TIME, END_TIME, EXCUTION_TIME, NO_OF_RECORDS_PROCESSED)
    27 VALUES (c1.tab_no |) ' ' || C1. TableName, v_start_time, v_end_time, v_end_time - v_start_time, v_rowcnt);
    28 END LOOP;
    29
    30 COMMIT;
    31EXCEPTION
    32 THEN THAN OTHERS
    33 THEN
    34 DBMS_OUTPUT.put_line (SQLERRM);
    35END;
    16 m

    OUTPUT:
    select * from exec_time by start_time desc
    TABLE_NAME START_TIME, END_TIME EXCUTION_TIME NO_OF_RECORDS_PROCESSED

    6 TAB6 31/05/2013 3:07:00.282065 AM 31/05/2013 3:06:47.103731 AM - 00 33 00:00:13.178334
    23 TAB23 31/05/2013 3:06:56.159271 AM 31/05/2013 3:06:56.342313 AM + 00 00:00:00.183042 1013
    20 TAB20 31/05/2013 3:06:47.104115 AM 31/05/2013 AM + 00 00:00:09.054770 158169 3:06:56.158885
    13 TAB13 31/05/2013 3:06:41.668578 AM 31/05/2013 3:06:31.690199 AM - 00 28 00:00:09.978379
    7 TAB7 31/05/2013 3:06:41.624134 AM 31/05/2013 3:06:41.668468 AM + 00 00:00:00.044334 0
    12 TAB12 31/05/2013 3:06:31.690582 AM 31/05/2013 3:07:00.281522 AM + 00 00:00:28.590940 240715
    3 TAB 3 31/05/2013 3:06:24.669461 AM 31/05/2013 3:06:41.623421 AM + 00 00:00:16.953960 47426
    2 TAB2 31/05/2013 3:06:24.182326 AM 31/05/2013 AM + 00 00:00:00.486723 5242 3:06:24.669049
    8 RAB8 31/05/2013 3:06:21.416823 AM 31/05/2013 3:06:24.181956 AM + 00 00:00:02.765133 28636
    1 TAB1 31/05/2013 3:06:16.320679 AM 31/05/2013 AM + 00 00:00:05.095731 132633 3:06:21.416410
    16 TAB16 31/05/2013 3:06:07.446056 AM 31/05/2013 AM + 00 00:00:08.874227 421215 3:06:16.320283
    11 TAB11 31/05/2013 3:06:07.442987 AM 31/05/2013 3:05:55.361263 AM - 00:00:12.081724-00 60273
    19 TAB19 31/05/2013 3:06:03.683463 AM 31/05/2013 3:06:07.445630 AM + 00 00:00:03.762167 77549
    15 TAB15 31/05/2013 3:06:00.291696 AM 31/05/2013 3:06:03.683017 AM + 00 00:00:03.391321 77117
    10 TAB10 31/05/2013 3:05:57.787733 AM 31/05/2013 AM + 00 00:00:09.654601 517960 3:06:07.442334
    18 TAB18 31/05/2013 3:05:56.742873 AM 31/05/2013 3:06:00.291274 AM + 00 00:00:03.548401 105630
    24 TAB24 31/05/2013 3:05:55.361707 AM 31/05/2013 3:05:56.742506 AM + 00 00:00:01.380799 15115
    4 TAB4 31/05/2013 3:05:18.873303 AM 31/05/2013 3:05:06.966972 AM - 00:00:11.906331-00 49078
    21 TAB21 31/05/2013 3:05:13.609759 AM 31/05/2013 3:05:18.872878 AM + 00 00:00:05.263119 56525
    22 TAB22 31/05/2013 3:05:09.070048 AM 31/05/2013 AM + 00 00:00:48.717139 451439 3:05:57.787187
    5 TAB5 31/05/2013 3:05:06.967411 AM 31/05/2013 3:05:09.069642 AM + 00 00:00:02.102231 773
    25 TAB25 31/05/2013 3:05:05.198282 AM 31/05/2013 AM + 00 00:00:08.410911 308670 3:05:13.609193
    14 TAB14 31/05/2013 3:04:59.575951 AM 31/05/2013 3:05:05.197701 AM + 00 00:00:05.621750 12118
    17 TAB17 31/05/2013 3:04:43.740910 AM 31/05/2013 3:04:59.575503 AM + 00 00:00:15.834593 529
    9 TAB9 31/05/2013 3:04:38.286041 AM 31/05/2013 3:04:59.011404 AM + 00 00:00:20.725363 65921

    Thanks in advance.

    Published by: 1008545 on May 31, 2013 01:40
  • Pavilion 17-F001dx: 'Windows 8 using 100% of the HARD drives with high average response time and low write speed '.

    It turns out that it is a pretty known issue windows 8.1 users infestation since at least 2013 and there is not a simple fix, then it cannot be * completely * lack of hp. but I've had two of these laptops, both the same model, one needing to be returned and exchanged for a problem absolutely no report with (hardware failure: ethernet port does not work with lights taped). Both are renovated. Both have been extreemly slow and unresponsive even compared to the lower Brazos powered by the laptop that I had before, but I recently decided to investigate why.

    So if there is something specific HP going on here, I hope that there is a simple fix. My average response time went upward as well more than a minute (> 60, 000ms), so that I'm an aberrant case here against this problem of reactivity/band bandwidth hardrive typical windows 8.1.

    Edit: there is a case with another HP pavilion laptop (intel powered, so there may be a problem of storage driver intel described in the first link) being much worse.

    Did not want to resort to that, but,.
    Going to a new facility to clean up an image of Windows Pro 8.1 from DreamSpark for my school.

    Disappointed by the lack of response. Given the odd subdomain name (h30434), I'm wondering if this forum has been abandoned.

  • How to calculate the execution time of a SCTL in FPGA VI?

    Hello

    Can someone guide me that how to calculate the execution time of a SCTL for an iteration in the FPGA VI?

    Thank you and best regards,

    Rashid

    Hello r,.

    A SCTL will always run in a beat the clock it has been linked to.  So, if you use a 40 MHz clock, this loop will run in 25 ns.  If the code cannot complete in that, or if it requires two graduations of the watch to do the calculation, your code does not compile, then you have the guarantee that this will always be how long it takes this piece of code to run.

  • SQL execution time

    Hello

    I was wondering if anyone could advise on the best way to capture the following in an 11g database.

    Say that we have;

    -a piece of SQL execution by up to 50 times per minute.

    -unique execution times vary.

    Aside from dba_hist_sqlstat and generate a sort of average over a period of 30 min.

    What would be the best way to get the execution time of this piece of SQL in real-time.

    say I want the individual execution time of this last of 100 executions.

    Any help would be appreciated

    Thank you

    Draw the session (with events of waiting if you want) that executes SQL and tkprof the trc file.

    ORACLE-BASE - Oracle Trace and TKPROF

    Oracle related things: basic SQL statement diagnostic performance - HOW TO, step-by-step instructions

  • How to shorten the execution time of the NXT (TETRIX &amp; MATRIX toolkit) brick

    Hello

    How to shorten the execution time of the NXT brick?

    (TETRIX & MATRIX toolkit, running time)

    The software is 2012 LabVIEW for LEGO MINDSTORMS

    Thank you.

    Hi 40123157,

    You use the module in an appropriate manner, and there is no simple way to improve the time of loop iteration beyond what you've done. Here are my suggestions:

    (1) the i2c commands take a long time. In your application, it may speed up if you run only move the engine only when the engine speed has changed.

    (2) for this particular example, you do not use the release of the report engine. If this VI does not need to run it can be removed.

    (3) If you need to speed up execution other than that, as a user advanced LabVIEW, you can create a copy of the VI of engines to move and change it as you choose. All you have to to the "DC motors' entry is use cluster to array on the cluster, as shown below. I think you can speed it up by running all the settings before the loop (type sensor and fixed connection configuration), and removing the value of power if you send only the values between-100 and 100.

    (4) drawing on the screen can be slow you down here.

  • Get the Max values and average of the different cycles in the single channel

    Hello

    I'm trying to get the Max values and average of the single channel that has different cycles it contains. I tried to use commands such as Chnclasspeak3 and chnpeakfind, but they were not useful for me. What I need is the Max values and average of the different cycles numbers saved in the data channel.

    Exampld if the string contains 5 numbers of repetitive cycles, then we must find the maximum values and the average of these 5 cycles in the single channel. Attached reference data. This is the .raw file and I have the plugin for it to use in diadem 11.1.

    Kind regards

    X. Ignatius

    Hello, Ignatius,.

    Sorry, it took some time to provide a replacement based on the script for the function. Please take a look at the attached script. I changed the script to use my function if the tiara-version is less than 12. My script function is not as fast and more stable than the implementation of tiara, but for now, it does the job

    Andreas

  • How to measure the execution time of a specific to a VI process?

    Hello! My VI has two processes: compression and edge detection image and I'm trying to measure the execution time for the process of detection of edge of my VI, but I don't know how to do. Please give me some ideas on how to do it. Thank you!

    There are several ways that you can do.

    -L' one is using the number of cycles before and after your vi to get time like here: http://digital.ni.com/public.nsf/allkb/6F6B9F4E149C80578625652800784764

    - or use the profiling: https://zone.ni.com/reference/en-XX/help/371361H-01/lvhowto/profiling_vis/

    Edit: If you're open to suggestions:

    -You have not to load the image inside the loop instead, make him outside of the loop.

    - And I see of many IMAQ buffers are not removed properly. You can have everything at once by Images (No) by logging in to Boolean TRUE: http://zone.ni.com/reference/en-XX/help/370281P-01/imaqvision/imaq_dispose/

  • Detect the PEAK, mount and average

    I use a loop in LabVIEW 8.5 to capture the signals emitted continuously by a card, peak detector.VI is used to detect the signal peaks, then fit.VI nonlinear curve is used to climb the summits, signal now capture, detection of peaks, mount and display pics are all works very well permanently, but there are still some problems annoying me.
    1. the received signals is not very stable, so editing results expected on average for 100 times, then how can I averaged the results of fitting on the condition that the capture of signal is not interrupted, this is the time loop does not stop, when the average is made this time, average is reset for the next 100 fitting results can be average again?
    2. There is another way, that's 100 results of fitting is automatically saved to excel, then the results is an average manually in excel, then how to store results like this: the first 100 results of connection are stored in an excel file and the next 100 results for other excel connector or they are stored in an excell , but in different columns? Of course the thses are subject to the capture of signal is not interrupted.
    3. There is a threshold for the detector.VI peak, but the captured signals entry isn't very stable, so the number of peaks detected is not the same every time, like this time, the number of vertices is 40, next will be 39, this will affect the results of fitting slightly, then how do to detect the same number of vertices every time such as the number is 40 each time?

    Any advice will be appreciated!

    Maybe the pic attached detect.vi 'test' can help you. "medium signal.vi" is a sub VI on average the signal in a way online.

    There are three methods using the input signal:

    1. no average.

    2. average exponential.

    3. linear average.

    Your problem is when the input signal is damaged by some noise, and you want the input signal before the detection of peaks on average. I use white noise to simulate a noisy environment.

    By default, the average mode is 'Linear', and the number of averages is 50. The more averages, the best on the result, but more time to update.

    Swith mode between 'Linear' and 'No way' to compare the difference before average and average.

    Average exponential is not appropriate in your case.

    Let me know if it works for you.

  • How to calculate the execution time of a loop?

    Hello

    Can someone guide me that how to calculate the execution time of a loop to iterate?

    Thank you and best regards,

    Rashid

    I hope I have your question! See attached screenshot

  • too low execution time

    I tried to measure the execution time. The rate is 1KS/s through to read 100 per channel in a loop of 10 and samples. The time should be about 1000 ms, but it is only 500-600 ms. And when I changed the rate/number of samples, the run time does not change... How could it happen?

    Well,.

    The task inside the loop compensation is something of a problem.  (The error handler must jump on the second iteration)

  • Why the execution time increases with a while loop, but not with "run continuously?

    Hi all

    I have a problem of severe weather that I don't know how to fix it because I don't know exactly where it comes from.

    I order two RF switches via a data acquisition card (NI USB-6008). One job at the same time can be selected on each switch. Basically, the VI created for this feature (by a colleague) resets all the outputs of acquisition data and active then those desired. It has three entrances, two chain simp0le controls and a cluster table, that contains the list of all the outputs and some practical information to know what is connected (specific to my application).

    I use this VI in a complex application, and I have some problems with the execution time, which increased whenever I said the VI, so I did a test VI (TimeTesting.vi) to determine where the problem came. In this special VI I record the execution time in a csv file to analyze then with excel.

    After several tries, I found that if I run this criterion VI with the while loop, execution on every cycle time increases, but if I remove the while loop and use the funtionnality "Continuous run", the execution time remains the same. In my high level application, I have while loops and events, and so the runtime increases too.

    I someone could explain to me why execution time increases and how can we avoid this? I have attached my VI test and the necessary subVIs, as well as an image of a graph that shows the execution time with a while loop and «run permanently»

    Thanks a lot for your help!

    Your SetReset_DO VI creates a channel whenever it is called.  And that you never delete a task.

    When running continuously, that it's as if it only runs once and LabVIEW has internal mechanisms to close references that will not be used again.  When a VI is used as a Subvi, LV does not know if she will be called again, and lacks these things until the first level VI stops. You have a memory leak.

    Just as you open and close your file outside the loop for, create your channel out of the loop.

    Lynn

Maybe you are looking for

  • Canon Rebel T3 busy

    I have a Canon Rebel T3 two years, with the two kit objectives accompanying.  Suddenly today, after I take one or two shots in a row he said busy for a second or two and continues to delay the shooting, saying busy.  The battery said full, but I put

  • Slow first printing with LBP6000

    I've just implemented a new LBP6000 on my OSX Maverick iiMac running. The first printed page lasts 25 to 30 seconds. In the name of selling on Amazon Cannon wrote several times first impression takes 8 seconds or less. Is it possible I can get 25 to

  • HP Envy 4500: HP Envy 4500 printer problem

    I have a HP Envy 4500 printer which has worked very well for a while. Recently I converted to NBN with a new router and well that the laptop has had no problem with the printer connectitivity. The printer works fine for about 10 days, then do not pri

  • Mark exclamtion on pc

    exclamation point

  • Torch of blackBerry Smartphones start problem

    Hey guys,. I got my flashlight for more than a year updates now, just installed evernote and nobex radio, click on the restart button now app World, and now unit will not start normally... it goes up to about 75% and it starts all over again, I have