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
Similar Messages
-
Calculate execution time of procedure
hiii
I create procedure that insert data in multiple tables i want to calculate execution time of procedure the start time
and the end time to insert them in a table .
and i want to calculate the start&end time that the procedure take to insert in each table
i use DBMS_UTILITY.GET_TIME but it gives me in millisecond i want the format DD/MM/YYYY HH:MI:SS
i also use sysdate but it gives un un reasonable time
like the start time more than the end time
how to calculate execution time of procedure???????
thanksLook at the docs for DBMS_PROFILER.
http://www.evdbt.com/2004_presentation_Q10.ppt
Bye Alessandro -
How can i calculate execution time for methods?
I'm making a project that i want to calculate execution time for a
method in "miliseconds" or "microseconds".You see,I have a sort algorithm and i want to calculate execution time of this algorithm.How can i do?
Thanks...Just remembered.
The answer you get isn't trustworthy below a hundred millis, so you may need to sort a hundred or a thousand times to get a reasonable elapsed time. You also need to run the test five or ten times and take an average. In Windows you should fire up the Task Manager and be sure that your other CPU usage is as near to zero as you can get. -
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 calculate the time between start trigger,first scan and first A/D in DAQ
Environment: Labview 6.1, N6052E DAQ board(max scan rate=333KHz, max channel rate=333KHz, settling time=3.5usec+1LSB)
I am using external scan clock 10K scan/s collecting data on 16 AI channels, and external channel clock 200KHz.
Could show me how to calculate the time betweent he start trigger, the first scan and the first A/D conversion?
ThanksI read the one you give to me. still cannot work out. I am using Labview 6.1 DAQ vi, including AI config.vi. clock config.vi, AI control.vi, AI read.vi, working on colect data on 16 AI channels. So I belong to SCAN function and external scan and sampling timing, right?
But it says the T1 and T2 are determined by external signals. How can I calculate that?
T1=1/10KHz or T1=1/160Khz?
T2=1/200KHz?
Is the above correct? -
I want to know how to calculate time taken by SELECT query.
For example: I am running one select statement in TOAD(oracle version 9i) which takes 40 seconds to run but in output window it display few records. It says "showing 1 of 500 records, more records exist". That table has total 20 million records.
Now my question is: Did 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 total amount?
Any help would be very much appreciated.Where I will find trace file?
Toon Koppelaars wrote:
What you could do is this.
Say your current query is Q1. Then instead of executing Q1 in toad execute this in Toad:
select count(*)
from (Q1)
/This is not totally safe, since the CBO could decide to alter the execution plan given that you now are not interested in any of the columns you had in the SELECT list of Q1.
Other alternative is to use sqlplus.
Set pages 0
alter session set sql_trace=true;
Run your Q1.
alter session set sql_trace=false;
Find the trace file, tkprof it, and see exactly what happened and how much time it took.
I'm assuming that timed_statistics is set to true in your instance.Edited by: user639946 on Dec 3, 2010 1:00 PM -
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_displayI 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 elapsed time based on user input
I'm not sure what to do next in this program. Basically, I'm not sure exactly how to get the time to output accurately, as in what forumla I should be using.
This is the question:
What comes 13 hours after 4 o'clock? Create an ElaspedTimeCalculator application that prompts the user for a starting hour, whether it is am or pm, and the number of elapsed hours. The application then displays the time after that many hours have passed. Application output should look similar to:
Enter the starting hour: 7
Enter am or pm: pm
Enter the number of elapsed hours: 10
The time is: 5:00 amHere's the code I have so far:
import java.util.Scanner;
public class ElapsedTimeCalculator
public static void main(String[] args)
int starting_hour;
int starting_minutes; /*This is added in case the user wants to add minutes as well.*/
String am_or_pm;
int elapsed_hours;
int elasped_minutes;
int time_hours;
int time_minutes;
System.out.println("Welcome. This application will give you the time based on your input.");
System.out.println(" ");
Scanner input = new Scanner(System.in);
System.out.print("Enter the starting hour: ");
starting_hour = input.nextDouble();
System.out.print("Enter the starting minutes: ");
starting_minutes = input.nextDouble();
System.out.print("Enter either 'am' or pm': ");
am_or_pm = input.nextString();
System.out.print("Enter the number of elapsed hours: ");
elapsed_hours = input.nextDouble();
input.close();
time_hours =
time_minutes =
if(am_or_pm = "am" || am_or_pm = "a.m." || am_or_pm = "AM" || am_or_pm = "A.M.")
System.out.println("The time is " + time_hours + ":" + time_minutes + "am");
if(am_or_pm = "pm" || am_or_pm = "p.m." || am_or_pm = "PM" || am_or_pm = "P.M.")
System.out.println("The time is " + time_hours + ":" + time_minutes + "pm");
}To calculate time_hours should I just calculate this by adding the elapsed hour to the starting hour? I doubt it will be accurate for all situations.
Same for the time_minutes For example, if the starting minutes and the elapsed minutes were 50, it would be greater than 60. Also, not sure if it makes sense to separate hours and minutes like this, it's not required to in the question. I initally thought it would be easier to approach like this instead of allowing the user to input a double for the starting hour. ex. 5.7
I get the feeling that this is extremely simple, but nonetheless, I'm stuck, so any help would be appreciated.Well thanks to both of you. I did a little reading up on the modulus operator and coupled it with some logic (although, truthfully, I'm not really using to there actually being an application for the remainder of a division operation, since it's never really used very much in any of my Math courses) and the hours portion works perfectly now:
import java.util.Scanner;
public class ElapsedTimeCalculator
public static void main(String[] args)
int starting_hour;
//int starting_minutes; /*This is added in case the user wants to add minutes as well.*/
String am_or_pm;
int elapsed_hours;
//int elasped_minutes;
System.out.println("Welcome. This application will give you the time based on your input.");
System.out.println(" ");
Scanner input = new Scanner(System.in);
System.out.print("Enter the starting hour: ");
starting_hour = input.nextInt();
//System.out.print("Enter the starting minutes: ");
//starting_minutes = input.nextInt();
System.out.print("Enter either 'am' or pm': ");
am_or_pm = input.next();
System.out.print("Enter the number of elapsed hours: ");
elapsed_hours = input.nextInt();
input.close();
int time_hours = 0;
//int time_minutes;
String meridien;
if(am_or_pm.equals("am"))
time_hours = (starting_hour + elapsed_hours) % 24;
//time_minutes = (starting_minutes + elapsed_minutes) % 60;
else if(am_or_pm.equals("am"))
time_hours = (starting_hour + elapsed_hours) % 24;
//time_minutes = (starting_minutes + elapsed_minutes) % 60;
else if(am_or_pm.equals("AM"))
time_hours = (starting_hour + elapsed_hours) % 24;
//time_minutes = (starting_minutes + elapsed_minutes) % 60;
else if(am_or_pm.equals("A.M."))
time_hours = (starting_hour + elapsed_hours) % 24;
//time_minutes = (starting_minutes + elapsed_minutes) % 60;
else if(am_or_pm.equals("pm"))
time_hours = (starting_hour + elapsed_hours + 12) % 24;
//time_minutes = (starting_minutes + elapsed_minutes) % 60;
else if(am_or_pm.equals("p.m."))
time_hours = (starting_hour + elapsed_hours + 12) % 24;
//time_minutes = (starting_minutes + elapsed_minutes) % 60;
else if(am_or_pm.equals("PM"))
time_hours = (starting_hour + elapsed_hours + 12) % 24;
//time_minutes = (starting_minutes + elapsed_minutes) % 60;
else if(am_or_pm.equals("P.M."))
time_hours = (starting_hour + elapsed_hours + 12) % 24;
//time_minutes = (starting_minutes + elapsed_minutes) % 60;
if(time_hours < 12)
meridien = "A.M.";
System.out.println("The time is: " + time_hours + ":00 " + meridien);
else if(time_hours > 12)
meridien = "P.M.";
System.out.println("The time is: " + time_hours + ":00 " + meridien);
}Now the only thing is the minutes. My teacher did say she wants the user to have the option to input minutes also if he/she desires, so I do need it. However, the only problem is that if say the user inputs a "starting minute" of 14 for example, and 66 minutes elapsing, then (14 + 66) int/ 60 = 1r20 but using the modulus operator would only give me 20. So how will I be able to add any extra hours if it is necessary? -
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 advancePlease Read before Posting in the Performance and Tuning Forum
Thread locked.
Thomas -
How to calculate Response time in HH:MM:SS format ?
Hi,
How can we calculate reponse time in HH:MM:SS format?
I have tried this formula but doesnt really seems to be providing desired output
CAST (FLOOR (TIMESTAMPDIFF (SQL_TSI_HOUR, "Service Request"."Opened Date and Time" , "Service Request"."Closed Date and Time" ) /24) as CHAR) || ' Days, ' || CAST (FLOOR((TIMESTAMPDIFF (SQL_TSI_MINUTE, "Service Request"."Opened Date and Time" , "Service Request"."Closed Date and Time" ) - FLOOR (TIMESTAMPDIFF (SQL_TSI_HOUR, "Service Request"."Opened Date and Time" , "Service Request"."Closed Date and Time" ) /24) *1440)/60) as CHAR) || ' Hours, ' || CAST (TIMESTAMPDIFF(SQL_TSI_MINUTE, "Service Request"."Opened Date and Time" , "Service Request"."Closed Date and Time" ) - (FLOOR (TIMESTAMPDIFF (SQL_TSI_HOUR, "Service Request"."Opened Date and Time" , "Service Request"."Closed Date and Time" ) /24) *1440) - (FLOOR((TIMESTAMPDIFF (SQL_TSI_MINUTE, "Service Request"."Opened Date and Time" , "Service Request"."Closed Date and Time" ) - FLOOR (TIMESTAMPDIFF (SQL_TSI_HOUR, "Service Request"."Opened Date and Time" , "Service Request"."Closed Date and Time" ) /24) *1440)/60)*60) as CHAR) || ' Minutes'
Output for this formula :
Opened Time Closed Time Response Time
16/10/2008 08:50:00 21/10/2008 11:33:21 5 Days, 2 Hours, 43 Minutes
16/10/2008 08:57:00 24/10/2008 15:17:38 8 Days, 6 Hours, 21 Minutes
16/10/2008 09:55:00 27/11/2008 10:44:36 42 Days, 0 Hours, 50 Minutes
16/10/2008 10:13:00 21/10/2008 13:53:38 5 Days, 3 Hours, 41 Minutes
16/10/2008 11:18:00 20/10/2008 09:11:29 3 Days, 21 Hours, 53 Minutes
I just need time difference between Closed Time and Open time in HH:MM:SS format.
Regards
AhmedWITH m AS
SELECT [Minutes] = CAST(21.52 * 60 AS int)
SELECT CAST([Minutes] / 60 AS varchar) + ':' + RIGHT(100 + [Minutes] % 60, 2)
FROM m
Best Regards,Uri Dimant SQL Server MVP,
http://sqlblog.com/blogs/uri_dimant/
MS SQL optimization: MS SQL Development and Optimization
MS SQL Consulting:
Large scale of database and data cleansing
Remote DBA Services:
Improves MS SQL Database Performance
SQL Server Integration Services:
Business Intelligence -
How to calculate Average time from a date field
Hi All,
I have a date type field in my table .
I want to calculate average time for a given country in a select query. Date has to be exculded. Only time has to be taken into consideration.
Kindly help me.
Sample data
india 25-JUN-09 08:12:45
india 25-JUN-09 09:01:12Take which one you want.WITH dates AS
(SELECT sysdate x FROM dual
UNION
SELECT sysdate + 1 +1/24 FROM dual
SELECT TO_CHAR(to_date(AVG(to_number(TO_CHAR(to_date(TO_CHAR(x,'HH24:MI:SS'),'HH24:MI:SS'),'sssss'))),'sssss'),'hh24:mi:ss')
FROM dates;
WITH dates AS
(SELECT sysdate x FROM dual
UNION
SELECT sysdate + 1 +1/24 FROM dual
SELECT floor(24 * AVG(x- TRUNC(x)))
|| ':'
|| floor(mod(24 * AVG(x- TRUNC(x)),1) * 60)
|| ':'
|| floor(mod(mod(24 * AVG(x- TRUNC(x)),1) * 60,1) * 60)
FROM dates;By
Vamsi -
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!
MikeI 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. -
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.0Hi,
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 calculate total time of mouse movement
Hi Everyone.
I am doing project on gesture recognition with touchpad. I need to find out the total time of completion of gesture on touchpad. For that I need to calculate total time of cursor movement on laptop touchpad. When cursor starts moving, that time I need to capture time and when it stops also. I need to find out difference between the start time and stop time. Please help me to do this task. Presently I am trying with event structure and timed structure but I am getting only present time only. I tried with counter but unable to get the difference.I missed the mouse move event when I saw this earlier, and for some reason I thought the first attempt would give you what you wanted.
Here is a different VI. It uses mouse move event with some logic that remembers the first mouse move event. Otherwise, you won't get the correct time.
Attachments:
Mouse Move Time.vi 11 KB -
How to Calculate the Time Between two days in ABAP
Hi,
I have one scenario like i need to calculate the time between two days please can you suggest me.
Thanks,
HarinathHi Peeleti,
Check this code,
DATA : DATE1 LIKE SY-DATUM VALUE '19830125',
DATE2 LIKE SY-DATUM VALUE '20070219',
DAYS1 TYPE I,
WEEK1 TYPE I,
MONTH1 TYPE I,
YEAR1 TYPE I,
C_YEARS1 TYPE I.
CALL FUNCTION 'HR_99S_INTERVAL_BETWEEN_DATES'
EXPORTING
BEGDA = DATE1
endda = DATE2
TAB_MODE = ' '
IMPORTING
DAYS = DAYS1
C_WEEKS =
C_MONTHS = C_YEARS1
C_YEARS = C_YEARS1
WEEKS = WEEK1
MONTHS = MONTH1
YEARS = YEAR1.
D_MONTHS =
MONTH_TAB =
*WRITE : / 'DAYS = ', DAYS1,
/ 'WEEKS = ',WEEK1,
/ 'MONTHS = ', MONTH1,
/ 'YEARS = ', YEAR1.
Using this code you can calculate the No Of Days Between two dates. Based On days you will easily calculate the Hour. [ No of days * 24 ].
Thanks.
Reward If helpful.
Maybe you are looking for
-
I've just purchased my very first audiobook from itunes as I'm driving from the midlands to Newcastle this afternoon. I thought a book would make the journey more manageable. But now I can't find how to pay the book back! I can see it in my itunes
-
i have been using my hp c5580 all in one for years. i scan all my documents as pdf files. i have recently bought a new laptop with windows 8.1. when i scan documents it saves them as jpegs it will not give me the option to save as pdf now. i also do
-
how can i get itunes to quit skipping to the currently playing song when i'm working on the library somewhere else?
-
Hi All, I am trying to make connection between ebs suit & ipm11g through axf. i have followed EBS Admin giude for this & followed all the mentioned steps but from EBS i am not able to call IPM viewlist. It is throwing error which says : "Not able to
-
Best router to hook up a G4 (ethernet cable) and a Macbook (Airport Xpress)
I have a Macbook that is running on an Airport Xpress base station that is plugged into my Cable modem. I also have a G4 that I would like to connect to the Cable Modem, but there is only one slot. I assume that I need a router of some sort, but I ha