Huge total time(wait time) in SQL statements on NRIV

Hi experts,
I found our system has huge total time(wait time exceeeds more than
20%) and I find a note 840901 is recommended using parallel buffering
on number range object: RF_BELEG. Unfortunately, our financial
department insists RF_BELEG should be continuous, chronological order.
Does SAP has any other solution to fix this issue?
                                                 |               |23,555,002,826 |11,112,702,332,000
SELECT TOP 1 "CLIENT" AS c ,"OBJECT" AS c ,"SUBOBJ
NRIV
2,611,244
2,313,824,602,000

hello Sir,
               You can check for t-db02-->table analysis and alos look for sapnote : 56987
Bye

Similar Messages

  • How to get the time for executing an SQL statement?

    hi all...
    How can I get the total execution time for a given SQL statement to a ViewObject which is created dynamically for this SQL so that the end user knows it before hand and try to stop it or go further..?
    Please post any ideas if you have got..!!!
    thanx in advance..
    grüss
    K°vi

    This is not really a question for the JDeveloper forum, but rather for the DB forum.
    Since Oracle9i there is a way to estimate how long a query will take, before executing it.
    Check it out in the Oracle DB documentation or ask on the DB forum.
    There is no built-in functionality for this in JDeveloper, but you should be able to call out to the DB from your Java code to get the estimate.

  • Time of execution of SQL statement

    Hi,
    I executed some DML statements and Select statements as user SYS for user U1. How can I find the time of execution of these statements?
    Regards,
    Mathew

    You have a couple of options to time queries.
    SET TIMING ON has already been mentioned. I'll add that spooling the session to a file helps keep those timings for later reference.
    You can use DBMS_UTILITY.GET_TIME to get start and end times in microseconds for PL/SQL evaluation. DBMS_PROFILER will time lines of PL/SQL code as they execute. Trace/tkprof has also already been mentioned, although tkrpof times tend to vary a bit between reported and real times and don't take OS activity into account as much as the other timings do.

  • The best way to do paging and get total rows count given a sql statement

    Hi,
    Just got a quick question.... what is the best way to do paging as well as the total rows count given by a sql statement.
    e.g. "select * from emp"
    1. I need to know the total row count for this statement.
    2. I also need to do a 10 rows per page....
    Is there a way to do it in a SINGLE statement for best performance?
    Thanks experts.

    Sounds more like a "formatting" problem...
    If Sql*plus is your reporting tool, check out the guide:
    http://download-west.oracle.com/docs/cd/B10501_01/server.920/a90842/toc.htm

  • Comparintg times  in a dynamic sql statement

    I am working on a coversion procedure from one database to another. I have a move procedure that calls functions and the like .
    I am trying to use dynamic sql and my where clause is giving me errors. What am I missing here ? TIA....
    DEFINE DATECUTOFF ='11-JAN-05' of type date
    DES_DATE is a date column in the 2nd database .... type date
    I am building strings to do a create table from the 2nd database ...
    Testwhere := q'[where to_char("des_date", 'DD-MM-YY') < '01-JAN-05]'; === works but I want to pass in date variable
    Teststring := 'Create table '|| table_name || ' as select * from '|| second_table||'@'Linkname
    execute immediate teststring || ''|| testwhere;
    Testwhere := q'[where to_char("des_date", 'DD-MM_YY') <  to_char(DATECUTOFF, 'DD-MON-YY')]; gives me errors like invalid number, or invalid type depending on where the quotes are or how I define DATECUTOFF
    Any ideas of what I am doing wrong in comparing the two dates ?
    Thanks.

    Sorry if I confused anyone ... we're working a duo effort here and get confused ourselves. Here's a summary of the effort.
    We're on 11G Linux.
    We're writing scripts, procedures and functions that will help us transition from a remote database (Ingres) to oracle. We plan to do this for many dbs, so we are using variables for the table names, links, etc ....
    The Where clase that we are developing is pretty
    complex, so our initial attempts to build it is
    to make it into two sections as a "literal" , join them and do a execute immediate. A date fields seem to be the issue...
    Our main procedure calls a datamove function to do the select from the remote data base....
    DATECUTOFF is date;
    TESTWHERE is varchar2(600);
    TESTSTRING varchar2(600);
    TestString := 'Create table '|| table_name_temp|| as select * from '||remote_table_name||'@'Linkname;
    TestWhere :=q'[ Where ||des_date < 'DATECUTOFF'];
    execute immediate Teststring || '' ||Testwhere;
    Can I do this in dynamic plsql ? the des_date is the column from the remote database. DATACUTOFF comes from the main procedure passed in.
    I do a DBMS_OUTPUT.Put_Line{teststring);
    DBMS_OUPUT.Put_Line(testwhere);
    and get the following on my screen
    Create Table AC_KEY_TEMP as select * from ACK_KEY2@DBLINK2
    where "des_date" = 11-Jan-05
    DECLARE
    Error at line 1;
    ORA-00904 "JAN" invalid identfier
    ORA- 06512 at datamove.datamove, line 146
    ORA-06512 at line 49, which is the line for
    the TestWHERE string.
    so in the procedure, if DBMS_OUTPUT is correct, the execute immediate is operating on the where clause and it
    thinks the JAN field is incorrect. I have put single quotes around it as well ...

  • Statspack Total Wait time

    hi -
    using v 9.2
    I'm wondering about the Total Wait Time (s) in the Top 5 wait Events list.
    I took a snapshot for 10.55(min) but some of the Time (s) exceeds this, so i'm clearly interpreting something incorrectly:
    Top 5 Timed Events
    ~~~~~~~~~~~~~~~~~~                                                     % Total
    Event                                               Waits    Time (s) Ela Time
    db file scattered read                            587,895       1,464    37.24
    CPU time                                                        1,205    30.66
    SQL*Net message from dblink                        22,597         609    15.49
    db file sequential read                           478,006         554    14.11
    log file parallel write                             6,335          28      .72
              -------------------------------------------------------------For example the db file scattered read is 1,464(s) which is more than the 10.55(min) of the snapshot.
    how correlate this Time(s) to clock time?
    My assumption is that multiple sessions are added and this number can exceed snapshot time?
    Edited by: stg on Oct 17, 2008 9:50 AM

    rocr wrote:
    the time is per processor so if you have 8 processors and the clock time of the report is 6 minutes but 5 cpus use 3 minutes of processing each then the total time is 15 minutes.rocr,
    You're thinking of the "CPU time" component only.
    The wait time can be much greater than "snapshot interval * CPU_count". It can be as large as "snapshot interval * number of sessions".
    For example:
    I lock a table in exclusive mode for 15 minutes.
    100 other users try to update that table, and have to wait for me to release my lock.
    Elapsed time = 15 minutes
    Wait time = 100 * 15 minutes = 1,500 minutes.
    Regards
    Jonathan Lewis
    http://jonathanlewis.wordpress.com
    http://www.jlcomp.demon.co.uk
    "The greatest enemy of knowledge is not ignorance, it is the illusion of knowledge." Stephen Hawking.

  • CPU Time Wait Event

    I am running perfstat in Oracle9i Enterprise Edition Release 9.2.0.4.0. When I create a perfstat report using the standard scripts I see a wait event called "CPU time." I don't understand what this means. The OEM server monitoring tool does not indicate that the CPU is being used more than 50%, often more like 20%. The top 5 wait events is below.
    What does "CPU time" time mean?
    the following top 5 wait events:
    Top 5 Timed Events
    ~~~~~~~~~~~~~~~~~~ % Total
    Event Waits Time (s) Ela Time
    CPU time 2,200 61.88
    db file sequential read 113,042 639 17.96
    control file parallel write 9,345 471 13.24
    log file sync 4,722 122 3.44
    db file scattered read 13,375 67 1.87

    Hi,
    Below is part of my Statspack
    ```````
    Snap Id Snap Time Sessions Curs/Sess Comment
    Begin Snap: 13805 26-Mar-08 08:00:03 85 173.2
    End Snap: 13806 26-Mar-08 09:00:05 98 154.4
    Elapsed: 60.03 (mins)
    Cache Sizes (end)
    ~~~~~~~~~~~~~~~~~
    Buffer Cache: 1,024M Std Block Size: 8K
    Shared Pool Size: 400M Log Buffer: 2,048K
    Load Profile
    ~~~~~~~~~~~~ Per Second Per Transaction
    Redo size: 183,878.75 16,898.36
    Logical reads: 61,602.61 5,661.25
    Block changes: 1,255.54 115.38
    Physical reads: 7,370.56 677.35
    Physical writes: 55.64 5.11
    User calls: 341.11 31.35
    Parses: 56.26 5.17
    Hard parses: 0.32 0.03
    Sorts: 56.43 5.19
    Logons: 0.80 0.07
    Executes: 712.67 65.49
    Transactions: 10.88
    % Blocks changed per Read: 2.04 Recursive Call %: 82.56
    Rollback per transaction %: 9.29 Rows per Sort: 1043.63
    Instance Efficiency Percentages (Target 100%)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Buffer Nowait %: 99.98 Redo NoWait %: 100.00
    Buffer Hit %: 88.06 In-memory Sort %: 100.00
    Library Hit %: 99.96 Soft Parse %: 99.42
    Execute to Parse %: 92.11 Latch Hit %: 99.95
    Parse CPU to Parse Elapsd %: 69.60 % Non-Parse CPU: 99.64
    Shared Pool Statistics Begin End
    Memory Usage %: 89.25 89.26
    % SQL with executions>1: 40.51 39.68
    % Memory for SQL w/exec>1: 29.05 29.45
    Top 5 Timed Events
    ~~~~~~~~~~~~~~~~~~ % Total
    Event Waits Time (s) Ela Time
    CPU time 9,272 43.73
    db file sequential read 5,203,772 7,027 33.14
    db file scattered read 2,198,721 1,547 7.30
    log file parallel write 20,935 1,126 5.31
    log file sync 10,277 759 3.58
    ``````````````````
    From my observation I found that it seems CPU is bottneck on this Server. I have gathered few SQLs to find out whether any scope for tuning but still I believe that by reducing the cache size also I can divide the load or can say transfer the load from CPU to I/O. Am I correct or do I need to look over else ?
    Thanks
    MJ

  • Time selection in the select statement

    Hi,
    I need to extract data from Oracle DB to a flat file. We just have a runtime license and hence I cannot create any DB views or procedures. So I generate the extract by writing SQL commands in a flat file and then triggering it using a batch file.
    I need a selection on time period in the SQL statement. This selection should as per the logic:
    For each day between May 1st to May 15th Selection should be in the range April 1st to April 15th
    For each day between May 16st to May 31st Selection should be in the range April 16st to April 30th
    For each day between June 1st to June 15th Selection should be in the range May 1st to May 15th and so on..
    How can I achieve this, please provide me some guidance.
    Thank you,
    Raja

    This is an example how to get dates are asking you for :
    SELECT CASE WHEN TO_CHAR(SYSDATE,'DD') <= 15
             THEN TRUNC(ADD_MONTHS(SYSDATE,-1),'MM')
             ELSE TRUNC(ADD_MONTHS(SYSDATE,-1),'MM')+15
           END start_date,
           CASE WHEN TO_CHAR(SYSDATE,'DD') <= 15
             THEN TRUNC(ADD_MONTHS(SYSDATE,-1),'MM')+14
             ELSE TRUNC(LAST_DAY(ADD_MONTHS(SYSDATE,-1)))
           END end_date
    FROM DUALSome comments to help understand it
    ADD_MONTHS => With negative numbers you substract then
    LAST_DAY => Get last day month (how function name selfexplains)
    TRUNC( ,'MM') => Get first month day and remove time
    TRUNC() => Without second parameter remove time from day
    Mind to bear with time if your database DATE columns include it.
    Salut,
    Manel
    Edited by: Manel Sànchez i Ruiz on 26/05/2009 08:25

  • Getting Long time to execute select count(*) statement.

    Hi all,
    My table have 40 columns and it doesn't have the primary key column. it contain more than 5M records. it's taking long time to execute simple sql statement.
    Such as select (*) take 1min and 30 sec. If i use select count(index_colunm) then it finished with in 3s. i did the following workarounds.
    Analyzed the table.
    created required indexes.
    yet getting the same performance issues. please help me to solve this issue
    Thanks

    BlueDiamond wrote:
    COUNT(*) counts the number of rows produced by the query, whereas COUNT(1) counts the number of 1 values.Would you care to show details that prove that?
    In fact, if you use count(1) then the optimizer actually re-writes that internally as count(*).
    Count(*) and Count(1) are have identical executions.
    Re: Count(*)/Count(1)
    http://asktom.oracle.com/pls/asktom/f?p=100:11:6346014113972638::::P11_QUESTION_ID:1156159920245

  • DB wait time in daily basis.

    hi ,
    i am using 10.2.0.4.0 version of oracle. I want to get total DB wait time for comparing since last two weeks of DB perfromance , in daily basis. I have AWR report but i have go through each and every report for comparing results of each day. But, is there any script , using which i can get the total DB wait time in daily basis. please help.
    Edited by: 930254 on Nov 5, 2012 5:15 AM

    hi i am using below query for getting the total waits in daily basis. Is it the correct one? or i need to use dba_hist_active_sess_history?
    select  TO_CHAR (MIN (s.end_interval_time), 'DD-MON-YYYY DY HH24:MI')
             sample_end,
             trunc(sum(time)/360000) hrs
    FROM dba_hist_waitstat q, dba_hist_snapshot s
    WHERE   s.snap_id = q.snap_id
          AND s.dbid = q.dbid
          AND s.instance_number = q.instance_number
          AND s.end_interval_time >=
                 TO_DATE (TRIM ('1-nov-2012'), 'dd-mon-yyyy hh24:mi')
          AND s.begin_interval_time <=
                 TO_DATE (TRIM ('5-nov-2012'), 'dd-mon-yyyy hh24:mi')
    GROUP BY trunc(s.end_interval_time)
    ORDER BY trunc(s.end_interval_time)Edited by: 930254 on Nov 5, 2012 6:07 AM

  • Capture all SQL statements and archive to file in real time

    Want to Capture all SQL statements and archive to file in real time?
    Oracle Session Manager is the tool just you need.
    Get it at http://www.wangz.net
    This tools monitor how connected sessions use database instance resources in real time. You can obtain an overview of session activity sorted by a statistic of your choosing. For any given session, you can then drill down for more detail. You can further customize the information you display by specifying manual or automatic data refresh, the rate of automatic refresh.
    In addition to these useful monitoring capabilities, OSM allows you to send LAN pop-up message to users of Oracle sessions.
    Features:
    --Capture all SQL statement text and archive to files in real time
    --Pinpoints problematic database sessions and displays detailed performance and resource consumption data.
    --Dynamically list sessions holding locks and other sessions who are waiting for.
    --Support to kill several selected sessions
    --Send LAN pop-up message to users of Oracle sessions
    --Gives hit/miss ratio for library cache,dictionary cache and buffer cache periodically,helps to tune memory
    --Export necessary data into file
    --Modify the dynamic system parameters on the fly
    --Syntax highlight for SQL statements
    --An overview of your current connected instance informaiton,such as Version, SGA,License,etc
    --Find out object according to File Id and Block Id
    Gudu Software
    http://www.wangz.net

    AnkitV wrote:
    Hi All
    I have 3 statements and I am writing some thing to a file using UTL_FILE.PUT_LINE after each statement is over. Each statement takes mentioned time to complete.
    I am opening file in append mode.
    statement1 (takes 2 mins)
    UTL_FILE.PUT_LINE
    statement2 (takes 5 mins)
    UTL_FILE.PUT_LINE
    statement3 (takes 10 mins)
    UTL_FILE.PUT_LINE
    I noticed that I am able to see contents written by UTL_FILE.PUT_LINE only after statement3 is over, not IMMEDIATELY after statement1 and statement2 are done ?
    Can anybody tell me if this is correct behavior or am I missing something here ?Calling procedure must terminate before data is actually written to the file.
    It is expected & correct behavior.

  • AWR   SQL ordered by Cluster Wait Time

    I am beginner in Oracle Performance issue, I am working on sql query which appear on the top of queries list in the section SQL ordered by Cluster Wait Time
    have any one an explanation for this ?
    Thanks,
    Edited by: BIJGA on 19 sept. 2011 09:44

    ====================SQL ordered by Elapsed Time
    Elapsed Time (s)     Executions      Elapsed Time per Exec (s)      %Total     %CPU     %IO     SQL Id     SQL Module     SQL Text
    1,769.05     2     884.53     3.51     64.30     35.91     acgncjwd5hmjc      MYPROG      BEGIN MY_PROC (15400...
    ==============================SQL ordered by Cluster Wait Time
    Cluster Wait Time (s)     Executions     %Total     Elapsed Time(s)     %Clu     %CPU     %IO     SQL Id     SQL Module     SQL Text
    33.60     12     3.78     888.29     25.96     35.07     61.61     284532152m5up      MYPROG      SELECT 1 FROM MYTABLE L WHERE (..
    Remrak the query 284532152m5up was executed by
    OPEN myLock for SELECT 1 FROM MYTABLE L WHERE... for update;
    close myLock;
    Thanks,

  • Java.sql.SQLException: No available resource. Wait-time expired.

    Hi all,
    The application platform is SunONE Application Server 7, and the database is ORACLE 9i. My Website application will raise the SQLException once a few days' running. Everything will be ok once the Application server has been restarted. The detail about the Exception is :
    [12/Aug/2003:10:41:03] WARNING (25931): CORE3283: stderr: java.sql.SQLException: No available resource. Wait-time expired.
    [12/Aug/2003:10:41:03] WARNING (25931): CORE3283: stderr:      at com.sun.enterprise.resource.JdbcDataSource.internalGetConnection(JdbcDataSource.java:251)
    [12/Aug/2003:10:41:03] WARNING (25931): CORE3283: stderr:      at com.sun.enterprise.resource.JdbcDataSource.getConnection(JdbcDataSource.java:98)
    [12/Aug/2003:10:41:03] WARNING (25931): CORE3283: stderr:      at com.tsp.gdgpo.ejbm.util.EnvUtil.getDSConnection(EnvUtil.java:72)
    [12/Aug/2003:10:41:03] WARNING (25931): CORE3283: stderr:      at com.tsp.gdgpo.ejbm.util.DirectDSUtil.getObjectsFromDS(DirectDSUtil.java:103)
    [12/Aug/2003:10:41:03] WARNING (25931): CORE3283: stderr:      at com.tsp.gdgpo.ejbm.jcsms.dam.JcsmsDDSA.getSpecialistByPage(JcsmsDDSA.java:388)
    [12/Aug/2003:10:41:03] WARNING (25931): CORE3283: stderr:      at com.tsp.gdgpo.ejbm.jcsms.sessionbeans.SpecialManagerEJBBean.listSpecialist(SpecialManagerEJBBean.java:1941)
    [12/Aug/2003:10:41:03] WARNING (25931): CORE3283: stderr:      at com.tsp.gdgpo.ejbm.jcsms.sessionbeans.SpecialManagerEJBBean_EJBObjectImpl.listSpecialist(SpecialManagerEJBBean_EJBObjectImpl.java:702)
    [12/Aug/2003:10:41:03] WARNING (25931): CORE3283: stderr:      at com.tsp.gdgpo.ejbm.jcsms.sessionbeans._SpecialManagerEJBBean_EJBObjectImpl_Tie._invoke(Unknown Source)thanks for any help
    Niu

    Ther is a related Bug i n Oracle: Bug No. 4420032
    PROBLEM STATEMENT: ------------------
    The Oracle client file ojdbc_14.jar is not handling exceptions correctly. The connection pool slowly runs out of connections and hits the oracle db limit of max_sessions. Increasing the db max_sessions does not help as the number of sessions continue to increase.
    The vendor developers of ct's application have identified a code problem with the Oracle client file ojdbc_14.jar. Their description follows.
    The following is a technical description of the Oracle JDBC client library issue. The jar file in question is: ojdbc_14.jar. This issue is also present in the 9.2.05 and 9.2.06 versions of the client code.
    The socket.close() call in TcpNTAdapter.disconnect() does not properly handle network exceptions. Where the exception should be handled within the code segment calling socket.close(), the class instead throws an exception without ensuring the socket is closed. The socket is not subsequently closed by clients of the class. This ultimately results in a connection leak. Overtime, the maximum number of Oracle database sessions is reached. The only work around for this issue in production, is to restart the effected processes.
    The code segment:
    public void disconnect()
    throws IOException { 
    socket.close();
    socket = null; }
    should be along the lines of:
    public void disconnect()
    throws IOException { 
    try{  socket.close();  }
    catch(IOException ioe){  throw ioe;  }
    finally{  socket = null;  } }
    The original code segment will not execute the statement "socket = null" when . an exception occurs. Given the fact that the exception is not subsequently processed properly, the object is never dereferenced, and the socket remains open for the life of the process. Adding this statement in the finally block . ensures the object will ultimately be destroyed by the garbage collector. . ct tested this change in their lab and found that the recommended modification successfully resolved the issue.
    This problem has occurred with the previous ct's application releases, but the vendor has only recently been able to isolate the root cause. The JDBC connection pool slowly runs out of connections and hits the oracle db limit of max_sessions.
    Increasing the db max_sessions does not help as the number of sessions continue to increase. This problem has been occuring in Production over the past few releases of the application, but usually the connections leak slowly. This problem can be duplicated under heavy load in just a few minutes . in the Loadtest environment.

  • New sessions every time an sql statement is issued

    Hi, I have a problem with using oraoledb (v 10.1.0) with VB6 accessing an Oracle database 9i (v 9.2.0.6). Every time an sql statement is issued in the client side, a new session is started in the server side (seen in Enterprise Manager). I don´'t know why. Is an oraoledb parameter or a database parameter? How can I avoid this? The big problem behind this behaviour is controling row locking. If I issue a "select field from table where conditions for update nowait(or wait n)", this creates a lock that belongs to a session. If a few sentences after I issue an "update the-same-table set the-same-field = value where the-same-condition" as this one creates a new session, an ORA-00054 is raised telling the row(s) is blocked.
    any idea?
    thanks

    I'm a DBA and I encountered the same problem with a system developed for our company. We reported that to the company that developed the application and they sey then close the conections, but they remain in the database.
    Could anyone find a solution for this? I believe is a problem in the VB code, but I do not know anything from VB.
    thanks,
    Lisandro

  • Find start and end execution time of a sql statement?

    I am have databases with 10.2.0.3 and 9.2.0.8 on HP UNIX 11i and Windows 200x.
    I am not in a position to turn on sql tracing in production environment. Yet, I want to find when a sql statement started executing and when it ended. When I look at v$sql, it has information such FIRST_LOAD_TIME, LAST_LOAD_TIME etc. No where it has information last time statement began execution and when it ended execution.. It shows no of executions, elapsed time etc, but they are cumulative. Is there a way to find individual times (time information each time a sql statement was executed. – its start time, its end time ….)? If I were to write my own program how will I do it?
    Along the same line, when an AWR snapshot is shown, does it only include statements executed during that snapshot or it can have statements from the past if they have not been flushed from shared memory. If it only has statements executed in the snapshot period, how does it know when statement began execution?

    Hi,
    For oracle 10g you can use below query to find start and end time, you can see data for last seven days.
    select min(to_char(a.sample_time,'DD-MON-YY HH24:MI:SS')) "Start time", max(to_char(a.sample_time,'DD-MON-YY HH24:MI:SS')) "End Time", b.sql_text
    from dba_HIST_ACTIVE_SESS_HISTORY a,DBA_HIST_SQLTEXT b where
    a.sql_id=b.sql_id
    order by 1;
    Regards
    Jafar

Maybe you are looking for

  • MBP Thunderbolt 2, connect 3 external monitors via 1 only port ?

    Hi Apple Communities, My "old" mybookpro late 2009 died 3 days ago (motherboard). So I buy a new MBP Retina 15" Late 2013. I would like to plug 3 external monitors for more confort to work (one for Virtual Machine and 2 for OS X mainly) (but not Appl

  • List of Reports in GRC 10

    Hello all, i am writing because i would like to know if there is a way to get a list of speciffic reports on GRC 10 Access Dashboards - Dashboard for access risk analysis, BRM, User management Acces Request Reports - Reports related to access, SLA, e

  • Account determination process

    Hi, What is the difference between accurals key and account key? Thanks Ravi

  • Some of my video thumbnails don't show

    I triple back up my photos and videos on external hard drives. Recently, I went back to look at some of my May 2012 home videos on my back ups. Three of the videos didn't seem to work. The thumbnails didn't show an image from the video. Went I went t

  • Backup iTunes using Automator

    I have been searching for a tutorial or an explanation of how to program an Automator workflow or application to back up my iTunes library to multiple drives. I have a large amount of media associated with iTunes which puts me over the limit for iTun