TIme taken to execute query

Hi,
HOW TO FIND OUT TIME TAKEN TO EXECUTE SELECT QUERY IN SAP, SAY FOR EXAMPLE
SELECT * FROM MARA WHERE MATNR BETWEEN '100' AND '1000'.
HOW TO PRINT TIME TAKEN TO EXECUTE ABOVE QUERY i.e. TIME IN MICROSECONDS...
IF YOU HAVE SAMPLE PROGRAM THEN PLEASE LET ME KNOW.
THANKS,
JOHN.

just declare.
END-OF-SELECTION.
  GET TIME.
  end_dt = sy-datum.
  end_tm = sy-uzeit.
<b>ex--</b>
select * from ekko into table ekko.
get time.
t1 = sy-uzeit.
select * from ekko into table ekko.
get time.
t2 = sy-uzeit.
write :/ t1.
write :/ t2.
diff = t2 - t1.
write :/ 'Time Taken : ' , diff.

Similar Messages

  • How to identify time taken to execute a package

    Hi all,
    Is the method without TKPROFF to find the time taken to execute a package that calls a procedure.
    for examples
    Lets says I execute a packaage at SQLplus window
    SQL> Execute my_pack.bal_proc;
    (It took some time may be 4 hrs to excecute according to my watch).
    At this stage if I want to find the time by some sql command that after executing the package what was the time.
    can someone help me in finding a query that tell what was the time taken to execute a package.
    thanks n rgds
    saaz

    You can check start and end time
    Then end time -start time
    SQL> select systimestamp start_time from dual;
    START_TIME
    11-AUG-09 11.30.47.758282 AM -04:00
    SQL> Execute my_pack.bal_proc;
    SQL> select systimestamp end_time from dual;
    END_TIME
    11-AUG-09 11.31.11.207530 AM -04:00Edited by: user5495111 on Aug 11, 2009 8:32 AM

  • How to analyse the time taken for a query

    Hey gurus ,
                          How to find the time taken for a query to execute .
    Regards,
    Venkatesh

    Hi,
    Time taken to execute a query = FRONT END TIME + OLAP TIME + DB TIME.
    front end time is time taken to do format in BEX.
    olap time is time taken to aggegate data in OLAP buffer.
    db time is tme taken to collect data at data target.
    to fine all these information
    goto RSRT -> give query name -> execute+debug -> it will display all the fields > check fields what ever u want.
    Regards,
    Haritha.

  • Time taken to execute my report?

    Hi Expects,
    I want to print in the output how much time taken to execute my report. Please help on this.
    regards,
    vijay

    Hi vijay,
    1. simple
    2. we have to use two things to get Current time.
       GET TIME
       SY-UZEIT.
    3.
    report abc.
    data : t1 type sy-uzeit.
    data : t2 type sy-uzeit.
    data : diff type i.
    data : ekko like table of ekko with header line.
    get time.
    t1 = sy-uzeit.
    select * from ekko into table ekko.
    select * from ekko into table ekko.
    get time.
    t2 = sy-uzeit.
    write :/ t1.
    write :/ t2.
    diff = t2 - t1.
    write :/ 'Time Taken : ' , diff.
    regards,
    amit m.

  • Time taken to execute code vs time taken to render to screen....

    Hello Experts,
    I noticed something strange while debugging some of my code.
    I have a for loop in which I'm creating and adding node elements. Above the for loop I'm creating a modal window, and after the for loop I'm destroying the modal window. In the modal window I have a timedtrigger element with a delay of one second.
    Here is the pseudocode:
    createModalWindow();
    for(int i=0; i<200; i++)
        // create and add node elements
    destroyModalWindow();
    Inside the modal windows wdDoInit() method I enable the timedTrigger, inside the wdDoExit() method, I disable the timedTrigger.
    When I execute this code I get a null pointer exception because the application is trying to destroy a window instance that doesn't exist!!! ie the modal window. When I comment out the destroyModalWindow() line, I noticed that the modal window get rendered after the loop has finished its processing not before like I'd expect. Could this mean the line destroyModalWindow(); is being called too early? Once the loop has processed there might be some clinet / server delay?? Another thing I noticed was the timed trigger event, even though its set to a 1 second delay, takes about 6 seconds on a round trip from the client to Web Application Server!!!! So even though on the WAS its processing it every second, it takes almost 6-7 seconds for it to render on the client browser!
    Has anyone else noticed this delay in rendering to code execution? Is it possible the Web Dynpro may terminate earlier than expected or sometimes we might not even see the results because time taken to render is slower than time taken to process request?
    What are peoples' thoughts?
    MM

    Sorry if I misinterpret your question...
    Remember Web Dynpro is server side technology. So no actual rendering happens at all until all code has been executed, then wdDoModify is called, and then output is generated and sent to the browser for rendering. Of course I can't see your code in it's completion, but the modal window should never display under any circumstances, as the call to create() and then destroy() happen within the same execution cycle, from what I can tell of your snippet.

  • Profile Parameter : Time out for executing query on the web

    Hi gurus,
    I am executing queries on the web directly. This can be done from query designer with the button that says "Execute query on web". The problem is that for queries that take more than 600 Secs to run, I get an Application timed out error. Queries that take less than this run smoothly.
    Can anyone please tell me the profile parameter associated with this particular setting. It is not rdisp/max_wprun_time, I know for sure since the value for this profile parameter in my system is 9999. Please help.
    Thanks & rgds,
    Sree

    Issue resolved.
    Profile Paramter - icm/server_port_0
    Current Value - PROT=HTTP,PORT=8000,TIMEOUT=60,PROCTIMEOUT=600
    Changed to - PROT=HTTP,PORT=8000,TIMEOUT=60,PROCTIMEOUT=3600
    rgds,
    Sree

  • Query Execution time - Elapsed time v Actual time taken

    Hi All,
    I have this scenario where I am querying a single table with the following results. It is a very heavy query in that there are multiple aggregate functions and multiple unions on it. Even if the query is written poorly (i doubt it is) why would the actual
    time taken to execute the query be much more than the statistics provided through the following commands?
    SET STATISTICS IO ON;
    SET STATISTICS TIME ON;
    Attached are the stats provided for the relevant query in question.
    Table '123456789_TEMP_DATA'. Scan count 178, logical reads 582048, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
    Table 'Worktable'. Scan count 0, logical reads 0, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
    SQL Server Execution Times:
       CPU time = 936 ms,  elapsed time = 967 ms.
    2014-01-06 17:36:41.383
    Now, although the CPU Time/Elapsed time shows that it takes less than a second, it actually takes more than 15 seconds to fetch the results. (This is the actual time that you get on the bottom bar of the Query pane as well.)
    What is the reason? Why is it that there is such a big discrepancy between the numbers? How can I improve this situation?
    Thanks!

    Yes. I am returning a huge number of rows to the client. 
    The query is simply against a single table. 
    Select
     'First Record',AVG(COLUMN1),STDEV(COLUMN1
    ),COUNT(COLUMN1)
    FROM [TABLE1] WHERE (SOME CONDITION)
    UNION ALL
    Select  'Second Record',AVG(COLUMN2),STDEV(COLUMN2),COUNT(COLUMN2) FROM [TABLE1]
    WHERE (SOME OTHER CONDITION)
    Imagine there are 178 records fetched in this manner with 178 UNIONs. The WHERE clause will always change for each SELECT statement.
    Now, the question is not so much about the query itself, but why the execution time is actually 15 seconds whilst the SQL STATISTICS show it to be 936ms (<1 second)
    Thanks!

  • Time taken for a method to run. ?

    I have a query regarding ascertaining the time taken
    for a method to execute
    I have a SQL statement that I reads 10,000 rows.
    String a_SQL = "Select.....from TableA";
    try {
         IQuery query = m_UC.createQuery();
         SimpleTableModel stm = query.executeSelect(a_SQL);
       }catch(SQLException se){
       // Query Over.
       private void displayJTable(){
       // display rows read from the query above.
       }          As the query is executing,I want to display a progress bar
    showing the status of the query.
    Now I cant use this :
    start = System.currentTimeMillis();
    try {
         IQuery query = m_UC.createQuery();
         SimpleTableModel stm = query.executeSelect(a_SQL);
       }catch(SQLException se){
    end = System.currentTimeMillis();
    System.out.println(" Time taken  to display " + (end - start)/1000);
                  The above will give me the time elapsed in seconds for the SQL query to execute,but
    this is not what I want.
    What i want is to use this :
           // Progress BAR executing,so I need to get to know the time
           // taken for the query to run
            try {
            the SQL execution
            }cach(){
            // Query over.
            // Stop Progres Bar.
            // Display JTable.       How can I know when to stop the Progress Bar as I have no handle
    on the time taken to execute the query?
    Any help will be appreciated

    You can have a separate thread (or maybe it's just part of the regular GUI update thread? I don't know details about GUIs) that puts up an hourglass or spinning clock hands or dancing hamster or whatever to indicate that something is going on, but like the man says, you can't know ahead of time how long it will take to run a query, so you can't show percent done. You also don't in general know ahead of time how many rows will be returned so that doesn't help you.
    You might be able to do something for the processing of the returned data, once the query completes, because then you can often get a count of the number of rows, so you process each row in a loop, and update the % done counter each time through the loop.

  • How we can store start time & end time taken by execution of scenerio?

    Hi
    i want to store starting time and ending time taken by executing of any scenerio and date also on which scenerio will be executed.
    plz assist me regards the same
    thanks

    when you say store , you want to capture in some file ,email or table.
    If table , you can have a small sql linking SNP_SESSION and SNP_SCEN and fetching the required detail accordingly.

  • How to Measure time taken for a some lines of code in a program?

    Hi
    I have one requirement to measure time taken for executing a  block of code in report . How we can find it ?
    Is there any way to code something in report to caluculate it ?
    Please send solution as early as possible
    thank u

    Ok.. try this code...
    DATA : t1 TYPE i,
    t2 TYPE i,
    delta(16) TYPE p.
    GET RUN TIME FIELD t1.
    PERFORM get_data. "your block of code
    GET RUN TIME FIELD t2.
    delta = t2 - t1.
    delta = delta / 1000000.
    WRITE :/ 'Time elapsed : ', delta , 'Secs'. "time in secs.

  • OWB 10g - The time taken for data load is too high

    I am loading data on the test datawarehouse server. The time taken for loading data is very high. The size of data is around 7 GB (size of flat files on the OS).
    The time it takes to load the same amount of data on the production server from the staging area to the presentation area(datawarehouse) is close to 8 hours maximum.
    But, in the test environment the time taken to execute one mapping (containing 300,000 records)is itself 8 hours.
    The version of Oracle database on both the test and production servers is the same i.e., Oracle 9i.
    The configuration of the production server is : 4 Pentium III processors (2.7 GHz each), 2 GB RAM, Windows 2000 Advanced Server, 8 kilobyte primary memory cache, 512 kilobyte secondary memory cache, 440.05 Gigabytes Usable Hard Drive Capacity, 73.06 Gigabytes Hard Drive Free Space
    The configuration of the test server is : 4 Pentium III processors (2.4 GHz each), 1 GB RAM, Windows 2000 Advanced Server, 8 kilobyte primary memory cache,
    512 kilobyte secondary memory cache, 144.96 Gigabytes Usable Hard Drive Capacity, 5.22 Gigabytes Hard Drive Free Space.
    Can you guys please help me to detect the the possible causes of such erratic behaviour of the OWB 10g Tool.
    Thanks & Best Regards,
    Harshad Borgaonkar
    PwC

    Hello Harshad,
    2 GB of RAM doesn't seem to be very much to me. I guess your bottleneck is I/O. You've got to investigate this (keep an eye on long running processes). You didn't say very much about your target database design. Do you have a lot of indexes on the target tables and if so have you tried to drop them before loading? Do your OWB mappings require a lot of lookups (then apropriate indexes on the lookup table are very useful)? Do you use external tables? Are you talking about loading dimension or fact tables or both? You've got to supply some more information so that we can help you better.
    Regards,
    Jörg

  • Need  the query to calculate the time taken to excute it.

    hi all,
    i need the query to calculate the time taken to excute it.
    for ex:
    select * from emp;
    how much time it will take to give o/p
    Thanks in advance
    satya

    Just to add to what was said - the execution can each time be DIFFERENT as the factors that governs performance are NOT CONSTANT.
    If Oracle has no idea how long the query is going to take before executing it, then how can you and your code know?
    Oracle's CBO estimates the cost (expense) of the query. This is an indication of how expensive a query is - and the more expensive the query, the more resources need to be used, the longer the query will take. The less expensive the query, the fewer resources it need, the faster it will take.
    And that is it. How fast or how slow? Oracle does not know. How much faster a query with a cost of 10,000 versus a query with a cost of 1? Oracle does not know.
    Why? Because the platform is not constant. Just what data is at this exact moment in the db buffer cache? Just how much CPU capacity is available for the new few seconds? Just what will the sustained throughput be of the I/O subsystem and channels for the next minute? Just how many memory pages need to be swapped between cache and memory? Etc. etc.
    All these factors change every single second. So forget about attempting to accurately calculate up-front the time it will take for a query. IT IS NOT POSSIBLE.

  • Execute query time

    I wrote that JPQL in my code
    SELECT u.paramValue FROM ParameterEntity u WHERE u.paramTag = :TAG AND u.paramType = :TYPE
    when I set parameters that : TAG = MEN and TYPE = NAME it is executed 4-5 ms
    but when I set parameter that : TAG =MEN and TYPE = SURNAME it is executed 30 - 45 ms
    what are you thinking about it

    Are you publishing the resultset after execute the query? If yes, then i say the time taken is for publishing the result set.
    You could check the DB execution time by executing the query on directly on DB. And check the query plan.
    As many suggests you should use the indexed/primary columns in where clause.
    Mr Babakishiyev wrote:
    I wrote that JPQL in my code
    SELECT u.paramValue FROM ParameterEntity u WHERE u.paramTag = :TAG AND u.paramType = :TYPE
    when I set parameters that : TAG = MEN and TYPE = NAME it is executed 4-5 ms
    but when I set parameter that : TAG =MEN and TYPE = SURNAME it is executed 30 - 45 ms
    what are you thinking about it

  • CMD=Ping&log query is taking long time-taken when checked in IIS logs.... Exchange 2010 SP3..

    Query regarding the ActiveSync and parameter time-taken from ActiveSync IIS logs.
    Here what I see for from the logs.
    [email protected] 45.101.90.185 Apple-iPad2C3/1202.410 200 0 0 1501129
    443 [email protected] 45.101.90.185 Apple-iPad2C3/1202.410 200
    0 0 22105
    443 [email protected] 45.101.90.185 Apple-iPad2C3/1202.410 200
    0 0 452
    443 [email protected] 45.101.90.185 Apple-iPad2C3/1202.410 200
    0 0 936
    443 [email protected] 45.101.90.185 Apple-iPad2C3/1202.410 200
    0 0 656238 
    In the above log, highlighted are the time-taken and I just want to check what is the ideal time-taken value, some value above should be causing some problem, like the one of the top 1501129 ?
    ?AND I see its for POST event and CMD=Ping&log query.......
    We have Mobile Iron in the environment and we are seeing few timeout errors on MobileIron server and for users intermittently. They usually see below error... However we don't see any end users issues, but just want to get rid of below error. MobileIron guys
    are pointing it to time-taken value which is high intermittently.
    IOException connection to server [email protected] -- java.io.IOException:
    awaitUninterruptibly was stopped by timeout
    @BALA

    Hi,
    To understand more about the issue, I’d like to confirm the following information:
    1. What’s your Exchange 2010 version? 
    http://support.microsoft.com/kb/2536517/en-us
    2. Do you install other software, like SQL, on the same Exchange Server?
    3. Change another admin account to access EMS.
    Thanks,
    Angela Shi
    TechNet Community Support

  • Why JRC executes query two times? (reports.queryengine(?:?) - Executing query: ...)

    Hello! Using JRC. While creating the report for viewing, I noticed one interesting thing. Why JRC executes query two times AND first time is executed with default parameters AND if default parameters are NULL the query can be invalid (even if it is marked to convert all database NULLs to defaults in Report Options).
    <!break>
    1. Why do you need to execute query the first time with these default parameters, which are later set to the others? We need to make some valid default parameters to make everything work. Also it is not efficient to execute unnecessary query.
    2. If I'm wrong could you explain please? If I'm right, is it a bug and when do you fix it?
    Waiting for answer,
    Anton Stalnuhhin
    Java-developer, Webmedia AS

    .

Maybe you are looking for

  • Error in adding A/R Invoice - 'No Matching Records Found'

    Hi Folks, This one is related to 'thunderclap8's post last month (June 01, 2011) As we create an A/R Invoice, we have encountered an error that says: [A/R Invoice  Rows  Warehouse Code] [line: 0] , 'No matching records found  'Inventory Log Message'

  • WS_DELIVERY_UPDATE_2 - picked quantity with negative values

    Hello All, I have a problem when I call function WS_DELIVERY_UPDATE_2. I have to update picked quantity from the delivery. If I have to update qty from 2 to 3, there is no problem. The corresponding parameter (pikmg) will contain '1' and the new valu

  • How to change the entry screen for Fast entry

    Hi, My scenario is that I want to allow my user to enter the cost assignment as well for infotype 14, 15 and 2010 in the fast entry. I noticed that there is actually a screen in the module pool mp001400, mp001500 and mp200000 which include those 'cos

  • CCMS,CMS and alert configuration guides

    hi, can I have CCMS,CMS and ALERT configuration pdf guides or links please. I have searched for them on SDN but can't find the exact documents. thank you for your help.

  • Car holder for Lumia 920 - Recommendations?

    I had an official Nokia car holder that suited my Lumia 800 just fine.   However since getting the 920 it is redundant, I need another suitable one for the new beast to sit nicely above my dashboard for Nokia Drive ease of use etc. Can anybody recomm