Remaining time for a query

Hi,
I wonder how much remains for a long sql query to be completed since the oracle views?
I kown that OEM give this information, but unfortunatly i don't have this tool :-(
Any idea..
Thanks in advance.

If, for example, you have an update statement that requires a full scan of a large table, the full scan may appear in v$session_longops along with total work and time remaining etc. But that would be a fairly simple example. Index lookups such as range scan don't appear in this view, along with a number of other operations such as nested loops, so if your execution plan contains these operations, you're not going to get much from v$session_longops. Even if you do have operations that all appear in v$session_longops you would need to cross reference it with the execution plan to determine which operatios have completed but until the operation begins, you won't be able to get an estimate of the run time.
Also remember that OEM is just querying the same views so it can't give you anything more than what's available in the v$session_longops and the supporting plan tables etc.
HTH
David
Edited by: Bravid on Sep 21, 2011 3:33 PM

Similar Messages

  • How to get remaining time for baton after setting timeOut property

    Hello,
    Is it possible to get the remaining time for baton after setting timeOut, or do I have to maintain a separate Timer for that?
    Been following this excellent tutorial here http://tv.adobe.com/watch/adc-presents/create-shared-forms-in-livecycle-collaboration-serv ice/

    Thanks Nigel, before reading your reply, I came up with something like this, but it seems extending the Baton class is not enough, as I would need my own BatonProperty as well that uses this extended Baton class...
    Also attempted to get some help here http://stackoverflow.com/questions/7116814/actionscript3-lccs-how-to-access-property-paren t-class-protected-var/7116882#7116882
    Could this be made into a feature request for Baton and BatonProperty, se we could easily get the remaining time please?   I guess I can wait for a future release.
    /custom as file /
    package com.mysite.BatonExtender
         import com.adobe.rtc.sharedModel.Baton;
         import flash.events.TimerEvent;
         public class BatonExtender extends Baton
              public function BatonExtender()
              super();
              _autoPutDownTimer.addEventListener(TimerEvent.TIMER,countDown);    
              trace("CURRENT TIMER:"+_autoPutDownTimer.currentCount);
              trace("BATONEXTENDER added");
              public function countDown(p_evt:TimerEvent):void {
                   trace("TRACING START countDown....");
                   if (_autoPutDownTimer.running) {
                        trace(_autoPutDownTimer.currentCount);
                        //sharedTimer.value = String(90 - _autoPutDownTimer.currentCount);
                   trace("TRACING END....");

  • Significant difference in response times for same query running on Windows client vs database server

    I have a query which is taking a long time to return the results using the Oracle client.
    When I run this query on our database server (Unix/Solaris) it completes in 80 seconds.
    When I run the same query on a Windows client it completes in 47 minutes.
    Ideally I would like to get a response time equivalent on the Windows client to what I get when running this on the database server.
    In both cases the query plans are the same.
    The query and plan is shown below :
    {code}
    SQL> explain plan
      2  set statement_id = 'SLOW'
      3  for
      4  SELECT DISTINCT /*+ FIRST_ROWS(503) */ objecttype.id_object
      5  FROM documents objecttype WHERE objecttype.id_type_definition = 'duotA9'
      6  ;
    Explained.
    SQL> select * from table(dbms_xplan.display('PLAN_TABLE','SLOW','TYPICAL'));
    PLAN_TABLE_OUTPUT
    | Id  | Operation          | Name      | Rows  | Bytes |TempSpc| Cost (%CPU)|
    |   0 | SELECT STATEMENT   |           |  2852K|    46M|       | 69851   (1)|
    |   1 |  HASH UNIQUE       |           |  2852K|    46M|   153M| 69851   (1)|
    |*  2 |   TABLE ACCESS FULL| DOCUMENTS |  2852K|    46M|       | 54063   (1)|
    {code}
    Are there are configuration changes that can be done on the Oracle client or database to improve the response times for the query when it is running from the client?
    The version on the database server is 10.2.0.1.0
    The version of the oracle client is also 10.2.0.1.0
    I am happy to provide any further information if required.
    Thank you in advance.

    I have a query which is taking a long time to return the results using the Oracle client.
    When I run this query on our database server (Unix/Solaris) it completes in 80 seconds.
    When I run the same query on a Windows client it completes in 47 minutes.
    There are NO queries that 'run' on a client. Queries ALWAYS run within the database server.
    A client can choose when to FETCH query results. In sql developer (or toad) I can choose to get 10 rows at a time. Until I choose to get the next set of 10 rows NO rows will be returned from the server to the client; That query might NEVER complete.
    You may get the same results depending on the client you are using. Post your question in a forum for whatever client you are using.

  • Run time for a query

    Hello all,
    Can you please tell me how can I see the total running time for a query?
    What other transactions besides ST03 and RSRT with statistics on?
    Points will be assigned
    Thanks
    Ramona

    Hi........
    You can use ST03N -> BW System Load
    Depending on the time frame you select, you get historical data or
    current data.
    To get to a specific query you need to drill down using the InfoCube
    name
    Use Aggregation Query to get more runtime information about a
    single query. Use tab All data to get to the details.
    (DB, OLAP, and Frontend time, plus Select/ Transferred records,
    plus number of cells and formats)
    Also You can get it in RSRT,RSRTQ...
    WE07  IDoc statistics 
    DB20  Update DB Statistics 
    Regards,
    Debjani........
    Edited by: Debjani  Mukherjee on Sep 25, 2008 2:42 PM

  • How to change the view criteria at run time for af:query

    Hi,
    I've a usecase where I need to change the view criteria of the af:query at run time.
    Use case:
    =======
    1) Consider a check box (Show Emps Under Dept 10) in the query panel when user selects and clicks 'Search' button should show the employees under dept 10. If user searches without selecting the check box, the results should show all the employees in all the departments.
    2) I need to have a check box always in the query panel. Its mandatory.
    The way I implemented:
    ==============
    1) Created a transient variable 'Show Emps Under Dept 10' in the EmployeeVO and also created a bind variable bind_DeptNo.
    2) Create a view criteria 'AllEmployees' which has only the transient attribute as the view criteria item and whose value set to 'false' by default.
    3) Created another view criteria 'EmpUnderDept' which has 'DepartmentId' as the view criteria item and whose value set to the bind variable 'bind_DeptNo'.
    4) Dropped the view criteria 'EmpUnderDept' as the 'af:query' panel in the jspx page.
    5) Overridden the queryListener as '#{EmpBean.empSearch}'
    6) Has the below code in the empSearch method as below. When user selects the check box, applying the other criteria 'EmpUnderDept' and setting the bind variable to '10'.
    public void empSearch(QueryEvent queryEvent) {
    // Add event code here...
    QueryDescriptor queryDesc = (QueryDescriptor) queryEvent.getDescriptor();
    ConjunctionCriterion conCrit = queryDesc.getConjunctionCriterion();
    List<Criterion> criterionList = conCrit.getCriterionList();
    List criterionValues = new ArrayList();
    Object criteriaValue = null;
    int criteriaNo = 0;
    DCBindingContainer bc = (DCBindingContainer)BindingContext.getCurrent().getCurrentBindingsEntry();
    FacesContext facesContext = FacesContext.getCurrentInstance();
    for (Criterion criterion : criterionList) {
    AttributeDescriptor attrDescriptor = ((AttributeCriterion)criterion).getAttribute();
    System.out.println("============== attrDescriptor.getName() =================== " + attrDescriptor.getName());
    criteriaValue = ((AttributeCriterion)criterion).getValues().get(0);
    if(criteriaNo==0) {
    Boolean val = (Boolean) ((AttributeCriterion)criterion).getValues().get(0);
    if (val.equals(true)) {
    OperationBinding method = (OperationBinding) ADFUtil.findOperation("ExecuteWithParams");
    if(method!=null) {
    Map params = method.getParamsMap();
    //params.put(key, value)
    method.getParamsMap().put("bind_DeptId", 10L);
    method.execute();
    ADFUtil.invokeMethodExpression( "#{bindings.EmpUnderDeptCriteiaQuery.processQuery}", queryEvent);
    } else {
    //ADFUtil.invokeEL("#{bindings.ExecuteWithParams.execute}");
    ADFUtil.invokeMethodExpression( "#{bindings.AllEmployeesCriteriaQuery.processQuery}", queryEvent);
    But this approach is not working and its always showing all the employees in all the departments.
    Please let me know if there is a way to change the view criteria at run time depending on the values set at run time for one of the view criteria items.
    JDev version am using is '11.1.1.5'
    Thanks,
    Lakshman

    Hi Shay,
    It worked for me without overriding the executeQuery() method in the ViewImpl.java.
    Instead of creating 2 view criteria, I created only one which has both transient variable and the DepartmentId = <bind_DeptId>. With the above code, it worked properly. Now I am using only one view criteria.
    Thank you.

  • Query Execution Time for a Query causing ORA-1555

    dear Gurus
    I have ORA-01555 error , earlier I used the Query Duration mentioned in Alert Log and increased the Undo Retention as I did not find th UnDOBLKS column of v$undostat high for the time of occurence of ORA-01555..
    But new ORA-01555 is coming whose query duration exceeds Undo Retention time..
    My question -
    1. Is it possible to accurately find the query duration time besides the Alert Log file ?

    abhishek, as you are using an undo tablespace and have already increased the time that undo data is retained via undo_retention then you might want to consider the following ideas which were useful with 1555 error under manual rbs segment management.
    1- Tune the query. The faster a query runs the less likely a 1555 will occur.
    2- Look at the processing. If a process was reading and updating the same table while committing frequenctly then the process under manual rbs management would basically create its own 1555 error rather than just being the victum of another process changing data and the rbs data being overlaid while the long running query was still running. With undo management the process could be generating more data than can be held for the undo_retention period but because it is committed Oracle has been told it doesn't really have to keep the data for use rolling back a current transaction so it gets discarded to make room for new changes.
    If you find item 2 is true then separating the select from the update will likely eliminate the 1555. You do this by building a driving table that has the keys of the rows to be updated or deleted. Then you use the driver to control accessing the target table.
    3- If the cause of the 1555 is or may be delayed block cleanout then select * from the target prior to running the long running query.
    Realistically you might need to increase the size of the undo tablespace to hold all the change data and the value of the undo_retention parameter to be longer than the job run time. Which brings up back to option 1. Tune every query in the process so that the job run time is reduced to optimal.
    HTH -- Mark D Powell --
    dear mark
    Thanks for the excellent advise..I found that the error is coming because of frequent commits..which is item 2 as u righly mentioned ..
    I think I need to keep a watch on the queries running , I was just trying to find the execution time for the queries..If there is any way to find the query duration without running a trace ..
    regards
    abhishek

  • Reducing the time for select query

    Hi
    Please advise why the query is taking too much time to execute when the cost involved in the joins is less.
    Here is the explain plan for the same
    | Id | Operation | Name | Rows | Bytes |TempSpc| Cost (%CPU)| Time |
    | 0 | SELECT STATEMENT | | 4989 | 984K| | 295K (1)| 00:59:09 |
    | 1 | SORT ORDER BY | | 4989 | 984K| 2120K| 295K (1)| 00:59:09 |
    |* 2 | FILTER | | | | | | |
    |* 3 | HASH JOIN | | 4989 | 984K| | 12975 (1)| 00:02:36 |
    |* 4 | HASH JOIN | | 4989 | 862K| | 11943 (1)| 00:02:24 |
    | 5 | TABLE ACCESS FULL | tedy_hf | 993 | 22839 | | 17 (0)| 00:00:01 |
    |* 6 | HASH JOIN | | 4989 | 750K| | 11925 (1)| 00:02:24 |
    |* 7 | TABLE ACCESS FULL | tedy_hf453 | 145 | 2465 | | 7 (0)| 00:00:01 |
    |* 8 | HASH JOIN | | 4989 | 667K| | 11917 (1)| 00:02:24 |
    |* 9 | INDEX SKIP SCAN | tedy_ehf33 | 4987 | 116K| | 4992 (1)| 00:01:00 |
    |* 10 | TABLE ACCESS FULL| tedy_7nl | 43367 | 4785K| | 6925 (1)| 00:01:24 |
    | 11 | TABLE ACCESS FULL | tedy_hfeei | 89616 | 2187K| | 1032 (1)| 00:00:13 |
    |* 12 | TABLE ACCESS FULL | tedy_hf455 | 2 | 32 | | 113 (0)| 00:00:02 |
    --------------------------------------------------------------------------------------------------

    Because the cost is internally calculated by the Cost Based Optimizer using the data available when parsing the query (tables, columns, constraints, cardinalities, etc...). If you feed it bad information (stale statistics, not using NOT NULL constraints, check constraints, foreign key constraints, etc..) it chooses inappropriate access methods.
    Based on what you've posted, not much help is possible.
    When your query takes too long ...
    and
    HOW TO: Post a SQL statement tuning request - template posting
    Will get you started on providing meaningful information with which we can help you.

  • Is it possible to limit the execution time for a query?

    I have an application that will run a query to gather statistics. The time window is defined by the user. Since the polling period for data collection varies, it is not possible to say that a large time window will result in a large resultSet. I may have a polling period of 1 minute or a polling period of 1 hour.
    I want to avoid a user executing a query that will consume too many resources and inpact the system's performce in general. Could I stop a query after it takes more that x secs? Is there a way to write an sql statement indicating the max response time? similar to rownum?

    You can also create an Oracle profile with limited resources and assign it to the Oracle account running the queries (this profile will be used for all queries run by the corresponding user). Resources can only specifed in cpu time (not elapsed time) or logical reads.
    See http://download-uk.oracle.com/docs/cd/B10501_01/server.920/a96521/users.htm#15451
    and http://download-uk.oracle.com/docs/cd/B10501_01/server.920/a96540/statements_611a.htm#2065932

  • Estimated time for a query execution -- URGENT PLEASE

    Hi,
    I am interested in knowing the time of execution of a query before actually running it. Is there any stored procedures/methods that gives us this feature.
    Thanks.

    Without actually running the query, there's no way to find out how long it will take to run. I'm not even sure that there's a theoretical way to do this.
    You can use the v$long_ops table to see roughly how far along a long-running query is while it's running.
    Justin

  • Delay time for Cancel query dialog

    Hi Folks.
    I have a form where the property Interaction Mode is set to NONBLOCKING.
    When a slow query is initiated, the cancel query dialog is displayed after approx. 5 secs.
    Can anyone tell me if it's possible to alter the delay time before this dialog is shown e.g., to 30 secs?
    Regards
    Carsten Nielsen

    super

  • Last night i tried to update to yosemite 10.10.3. At 10 o'clock the remaining time for installing was less than one minute... This morning it's the same!! What can i do?

    update to 10.10.3 doesn't work

    Avoid the App Store and download from here.
    OS X Yosemite 10.10.3 Combo Update
    its faster and more secure

  • Response time for Error Messages - Please Help

    Hi
    I have a PRO C application talking to an Oracle database.
    The Response time for successful query is within desirable limits.
    But when there is a error condition (eg SQLError -3113,or connection refused) it takes more than 9 minutes for the database to respond with the error code.
    This condition is observed with only one database while the others are working fine.
    What is the reason for this? Can’t it be reduced?
    Regards
    David

    ever been faced with the same problem ?
    Why deleting ? It that only one way to fix this problem ?
    What are the others doing in such cases. Or am I the only one person
    where has this special problem on the world. Becides I dont believe
    in solving the problem through removing mentioned directory and
    reinstalling. Nevertheless I will try it. I let you know about the result.
    bye
    sas

  • Setting time for different interactions

    How can I set timing throughout different interactions and
    show remaining time for all of them altogether?

    You do not set anything on a TC.. it is an incredibly dumb box.. that is a backup target.
    If you mean Time Machine, no it has no controls.. you can download a utility to set a different period than the normal TM 1 hour..
    http://www.klieme.com/TimeMachineScheduler.html
    There is probably several of these.. I found it not particularly reliable.. and in the end just left the 1hr as TM sorts out its files very well and does not expand the backup overmuch... you should read up how TM actually works.
    http://pondini.org/TM/Works.html

  • Longer songs stopping before finishing, next song playing in the remaining time of the previous song?

    Hello apple communities, it's been a while.
    So, problem, with the music app (or the particular albums/artists/songs) this time.
    Longer songs are stopping before the end of the songs, it's almost like it skips, but the wierd part is this:
    In the remaining time for that song, the next song starts playing.
    Make sense?
    No?
    Well, here's an example.
    The song deadman goes for 12.04, 12 minutes and 4 seconds.
    The song after that, change goes for 10.47, 10 minutes and 47 seconds.
    What happens is deadman will play for about 3 minutes, then skip to change, however, the ipod still says it is playing deadman, which has about 9 minutes left.
    It is only the one artist it is doing this with as well. Both albums. However, they play fine on itunes, on the CD's, on the Ps3 and my mp3.
    I have tried deleting them and re-adding them to my ipod but it doesn't fix it.
    The fact that is only one artist, out of 38 or so, makes me think it's the files, but if they play fine everywhere else, it makes me think something has gone wrong in the syncing process, but there have been no error pop-ups.
    My ipod is a 4th generation ipod touch, currently Version 6.1.3.
    Itunes is version 10.7.0.21.
    Thank you for your help.

    Try:
    - Reset the iOS device. Nothing will be lost
    Reset iOS device: Hold down the On/Off button and the Home button at the same time for at
    least ten seconds, until the Apple logo appears.
    - Unsync all music and resync
    - Reset all settings      
    Go to Settings > General > Reset and tap Reset All Settings.
    All your preferences and settings are reset. Information (such as contacts and calendars) and media (such as songs and videos) aren’t affected.
    - Restore from backup. See:                                 
    iOS: How to back up                                                                
    - Restore to factory settings/new iOS device.             

  • Time remaining for a query

    Hi,
    I want to find the estimated time remaining for the SQL that is running, when I try to query from v$sesion_longops, it is not returning anything even though i see the session running in v$session. Why am not getting any output from v$session_longops? Is there any way i can find how much time remaining and how much work done?
    Thanks,
    GK

    Yeahh this is the third a little different question about the same topic. So even if the operation is in v$session_longops, you can use the time remaining as a rough guideline because:
    1) Oracle thinks that long operations are linear and calculates remaining time accordingly
    2) it may not be the only long operatin for this particular query i.e. there may other remaining time that might be or might not be shown up there.
    I'm even a bit tired of copying link to my article describing all this :)
    http://www.gplivna.eu/papers/v$session_longops.htm
    Gints Plivna
    http://www.gplivna.eu

Maybe you are looking for

  • Problems when creating a new "Maintenance optimicer transaction"

    Hi! When I'm creating a new maintenance transaction in the field product version I have no choice it shows "Not available": I´ve already defined the Solution manager. I´ve followed the spro conf. steps. My Solution manager is 7.0 patched at: SAP_BASI

  • ABAP FI: Validation for the Txn Code F-28 & F-29

    Hi, I am looking to issue a Error Message in the Txn Code F-28 & F-29, in case the Document Currency is not same as the Customer Master Sales Area Currency (KNVV-WAERS). I am trying to achieve this by using SAP FI Validation's but I am only Getting t

  • Hooking up DSLR to Laptop

    Need to know how to conect my Nikon D7000 to my lap top so that I can view the photos instantly. However I would also like to have the pictures go directly to my PSE. Any help???

  • Place of EP in Netweaver?

    hi,   i am new with this netweaver platform. SAP Netweaver is a integration platform with different modules. ofcourse XI is data adopting,accessing from one landscape to another landscape. remaining for information modules. i want simple words ..Wher

  • Raw video file( Or loss less file ) from I Phone and I Pad ?

    How can we bypass the compression of video shot through I phone and I Pad?