JDBC, SQL*Net wait interface, performance degradation on 10g vs. 9i

Hi All,
I came across performance issue that I think results from mis-configuration of something between Oracle and JDBC. The logic of my system executes 12 threads in java. Each thread performs simple 'select a,b,c...f from table_xyz' on different tables. (so I have 12 different tables with cardinality from 3 to 48 millions and one working thread per table).
In each thread I'm creating result set that is explicitly marked as forward_only, transaction is set read only, fetch size is set to 100000 records. Java logic processes records in standard while(rs.next()) {...} loop.
I'm experiencing performance degradation between execution on Oracle 9i and Oracle 10g of the same java code, on the same machine, on the same data. The difference is enormous, 9i execution takes 26 hours while 10g execution takes 39 hours.
I have collected statspack for 9i and awr report for 10g. Below I've enclosed top wait events for 9i and 10g
===== 9i ===================
Avg
Total Wait wait Waits
Event Waits Timeouts Time (s) (ms) /txn
db file sequential read 22,939,988 0 6,240 0 0.7
control file parallel write 6,152 0 296 48 0.0
SQL*Net more data to client 2,877,154 0 280 0 0.1
db file scattered read 26,842 0 91 3 0.0
log file parallel write 3,528 0 83 23 0.0
latch free 94,845 0 50 1 0.0
process startup 93 0 5 50 0.0
log file sync 34 0 2 46 0.0
log file switch completion 2 0 0 215 0.0
db file single write 9 0 0 33 0.0
control file sequential read 4,912 0 0 0 0.0
wait list latch free 15 0 0 12 0.0
LGWR wait for redo copy 84 0 0 1 0.0
log file single write 2 0 0 18 0.0
async disk IO 263 0 0 0 0.0
direct path read 2,058 0 0 0 0.0
slave TJ process wait 1 1 0 12 0.0
===== 10g ==================
Avg
%Time Total Wait wait Waits
Event Waits -outs Time (s) (ms) /txn
db file scattered read 268,314 .0 2,776 10 0.0
SQL*Net message to client 278,082,276 .0 813 0 7.1
io done 20,715 .0 457 22 0.0
control file parallel write 10,971 .0 336 31 0.0
db file parallel write 15,904 .0 294 18 0.0
db file sequential read 66,266 .0 257 4 0.0
log file parallel write 3,510 .0 145 41 0.0
SQL*Net more data to client 2,221,521 .0 102 0 0.1
SGA: allocation forcing comp 2,489 99.9 27 11 0.0
log file sync 564 .0 23 41 0.0
os thread startup 176 4.0 19 106 0.0
latch: shared pool 372 .0 11 29 0.0
latch: library cache 537 .0 5 10 0.0
rdbms ipc reply 57 .0 3 49 0.0
log file switch completion 5 40.0 3 552 0.0
latch free 4,141 .0 2 0 0.0
I put full blame for the slowdown on SQL*Net message to client wait event. All I could find about this event is that it is a network related problem. I assume it would be true if database and client were on different machines.. However in my case they are on them very same machine.
I'd be very very grateful if someone could point me in the right direction, i.e. give a hint what statistics should I analyze further? what might cause this event to appear? why probable cause (that is said be outside db) affects only 10g instance?
Thanks in advance,
Rafi.

Hi Steven,
Thanks for the input. It's a fact that I did not gather statistics on my tables. My understanding is that statistics are useful for queries more complex than simple select * from table_xxx. In my case tables don't have indexes. There's no filtering condition as well. Full table scan is what I actually want as all software logic is inside the java code.
Explain plans are as follows:
======= 10g ================================
PLAN_TABLE_OUTPUT
Plan hash value: 1141003974
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1 | 259 | 2 (0)| 00:00:01 |
| 1 | TABLE ACCESS FULL| xxx | 1 | 259 | 2 (0)| 00:00:01 |
In sqlplus I get:
SQL> set autotrace traceonly explain statistics;
SQL> select * from xxx;
36184384 rows selected.
Elapsed: 00:38:44.35
Execution Plan
Plan hash value: 1141003974
| Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time |
| 0 | SELECT STATEMENT | | 1 | 259 | 2 (0)| 00:00:01 |
| 1 | TABLE ACCESS FULL| xxx | 1 | 259 | 2 (0)| 00:00:01 |
Statistics
1 recursive calls
0 db block gets
3339240 consistent gets
981517 physical reads
116 redo size
26535700 bytes received via SQL*Net from client
2412294 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
36184384 rows processed
======= 9i =================================
PLAN_TABLE_OUTPUT
| Id | Operation | Name | Rows | Bytes | Cost |
| 0 | SELECT STATEMENT | | | | |
| 1 | TABLE ACCESS FULL | xxx | | | |
Note: rule based optimization
In sqlplus I get:
SQL> set autotrace traceonly explain statistics;
SQL> select * from xxx;
36184384 rows selected.
Elapsed: 00:17:43.06
Execution Plan
0 SELECT STATEMENT Optimizer=CHOOSE
1 0 TABLE ACCESS (FULL) OF 'xxx'
Statistics
0 recursive calls
1 db block gets
3306118 consistent gets
957515 physical reads
100 redo size
23659424 bytes sent via SQL*Net to client
26535867 bytes received via SQL*Net from client
2412294 SQL*Net roundtrips to/from client
0 sorts (memory)
0 sorts (disk)
36184384 rows processed
Thanks for pointing me difference in table scans. I infer that 9i is doing single-block full table scan (db file sequential read) while 10g is using multi-block full table scan (db file scattered read).
I now have theory that 9i is faster because sequential reads use continuous buffer space while scattered reads use discontinuous buffer space. Since I'm accessing data 'row by row' in jdbc 10g might have an overhead in providing data from discontinuous buffer space. This overhead shows itself as SQL*Net message to client wait. Is that making any sense?
Is there any way I could force 10g (i.e. with hint) to use sequential reads instead of scattered reads for full table scan?
I'll experiment with FTS tuning in 10g by enabling automatic multi-block reads tuning (i.e. db_file_multiblock_read_count=0 instead of 32 as it is now). I'll also check if response time improves after statistics are gathered.
Please advice if you have any other ideas.
Thanks & regards,
Rafi.

Similar Messages

  • SQL*NET waits in trace file

    Hi All,
    There is a long running query, i generated trace file for this request. In trace file i found that there are huge waits on SQL*Net message from client
    The below is the trace file output:
    Elapsed times include waiting on following events:
    Event waited on Times Waited Max. Wait Total Waited
    SQL*Net message to client 16 0.00 0.00
    SQL*Net more data to client 17 0.00 0.00
    db file sequential read 1450 0.02 4.26
    SQL*Net message from client 16 1414.20 2702.84
    How to resolve this waits from SQL*NET message from client? I checked the network connection, there is no delays in network.
    Any inputs on this issue will be appreciated.

    As Satish indicated, the "SQL*Net message from client" wait is an event which indicates that the database server was waiting for the next request from the client computer, and not an indication that the query needs to be tuned. Manually review the trace file. At one point in the trace file, you will see this wait event with an ela= value which begins with 14142 - please post to this thread that line from the trace file along with the 20 lines before that line and the 20 lines after that line. You may just have a long wait on this event at the beginning, and another long wait on this event at the end of the query.
    Charles Hooper
    IT Manager/Oracle DBA
    K&M Machine-Fabricating, Inc.

  • Performance degradation in pl/sql parsing

    We are trying to use xml pl/sql parser and noticed performance degradation as we run multiple times. We zeroed into the following clause:
    doc := xmlparser.getDocument(p);
    The first time the procedure is run the elapsed time at sqlplus is something like .45sec, but as we run repeatedly in the same session the elapsed time keeps on increasing by .02 seconds. If we log out and start fresh, we start again from .45sec.
    We noticed similar degradation with
    p := xmlparser.newParser;
    but we got around by making the 'p' variable as package variable, initializing it once and using the same for all invocations.
    Any suggestions?
    Thank you.

    Can I enhance the PL/SQL code for better performance ? Probably you can enhance it.
    or, is this OK to take so long to process these many rows? It should take a few minutes, not several hours.
    But please provide some more details like your database version etc.
    I suggest to TRACE the session that executes the PL/SQL code, with WAIT events, so you'll see where and on what time is spent, you'll identify your 'problem statements very quickly' (after you or your DBA have TKPROF'ed the trace file).
    SQL> alter session set events '10046 trace name context forever, level 12';
    SQL> execute your PL/SQL code here
    SQL> exitWill give you a .trc file in your udump directory on the server.
    http://www.oracle-base.com/articles/10g/SQLTrace10046TrcsessAndTkprof10g.php
    Also this informative thread can give you more ideas:
    HOW TO: Post a SQL statement tuning request - template posting
    as well as doing a search on 10046 at AskTom, http://asktom.oracle.com will give you more examples.
    and reading Oracle's Performance Tuning Guide: http://www.oracle.com/pls/db102/to_toc?pathname=server.102%2Fb14211%2Ftoc.htm&remark=portal+%28Getting+Started%29

  • Getting SQL*Net more data from client waits when running a query through web based interface

    Hi, you all,
    We are having this weird behavior when running query through web based interface, we get a lot of "SQL*Net more data from client" waits, the OEM indicates that the current wait event is SQL*Net more data from client
    It's just a very simple query wich invokes a db link.
    When I execute the same query on any PL/SQL tool like toad or sql developer it works fine, but that query inside an application executed through a web based interface, it hangs for ever.
    Where can I start looking for the problem.
    We are working on a 3 Node RAC 11gr2, both databases are on the same RAC.
    Thanks.

    Hi ,
    we managed to reproduce the case in test environment, below are the steps:
    1)have 2 databases on different machines, will call the first one local, the other one remote.
    2)in the local database create:
    a - DBLink to remote database.
    b - read data from remote database(we simply used select count(*) from dummy_table )
    c - insert data into a table on the local database
    d - terminate the connection between the 2 databases (disconnect either machine from the network)
    e - commit on local database.
    what we noticed was the following:
    1)when the local database is disconnected from the network(the machine is not connected to any network at the moment): almost immediately throws an error, and issuing the following:
    select * from dba_2pc_pending;we found some data .
    2) when the remote database was disconnected(the local database is still connected to the network):
    after 7-8 seconds an error is thrown, and issuing the following:
    select * from dba_2pc_pending;did not return any data.
    since this is pretty similar to our case ,we concluded that it's a network issue.
    is this the correct behavior ?
    as a temporary solution till the network issue is fixed ,we did the following:
    1) changed the call of the remote procedure to calling a local procedure that calls the remote procedure.
    2) added pragma autonomous_transaction to the local procedure.
    3) at the end of the local procedure rollback the autonomous transaction.
    it seems that since the global transaction does not use the DBLink database does not issue a 2PC commit.
    this works in my cases since the DBLink is only issed to read data.

  • SQL*Net message from client - huge wait in trace file

    Dear All,
    I am facing a performance issue in a particular operation ( which was completed in 21 Minutes earlier). Now the same operation takes more than 35 Minutes. I took a trace for those session ( 10046 level 12 trace ) and found Lot of waits in SQL*Net message from client.
    Elapsed times include waiting on following events:
    Event waited on Times Max. Wait Total Waited
    ---------------------------------------- Waited ---------- ------------
    SQLNet message from client 611927 10.00 1121.35*
    I copied only the highest wait in the tkprof output.
    And I found from the tkprof and even in raw trace file this event waits more time after excuting
    SELECT sysdate AS SERVERDATE from dual;
    Elapsed times include waiting on following events:
    Event waited on Times Max. Wait Total Waited
    ---------------------------------------- Waited ---------- ------------
    SQL*Net message to client 115 0.00 0.00
    SQLNet message from client 115 10.00 724.52*
    Please help me to find out why this wait taking long time, especially on the above query..
    Regards,
    Vinodh

    Vinodh Kumar wrote:
    Hi,
    This is what available in the trace file
    PARSING IN CURSOR #2 len=38 dep=0 uid=60 oct=3 lid=60 tim=7052598842 hv=3788189359 ad='7d844fa0'
    *"SELECT sysdate AS SERVERDATE FROM dual"*
    END OF STMT
    PARSE #2:c=0,e=12,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=1,tim=7052598839
    BINDS #2:
    EXEC #2:c=0,e=42,p=0,cr=0,cu=0,mis=0,r=0,dep=0,og=1,tim=7052599002
    WAIT #2: nam='SQL*Net message to client' ela= 1 driver id=1952673792 #bytes=1 p3=0 obj#=-1 tim=7052599058
    FETCH #2:c=0,e=15,p=0,cr=0,cu=0,mis=0,r=1,dep=0,og=1,tim=7052599110
    *** 2012-01-02 17:07:30.364
    WAIT #2: nam='SQL*Net message from client' *" ela= 10007957"* driver id=1952673792 #bytes=1 p3=0 obj#=-1 tim=7062607120Please find the last line WAIT -- in the complete trace after executing this query
    In awr report , this query taken less than a sec for more than 2000 executions.
    Regards,
    VinodhGood idea to check the raw trace file. It is important to notice that this particular wait event appears after the fetch of the result from the database. The client receives the SYSDATE from the database server, and then the client performs some sort of action for about 10 seconds before submitting its next request to the database. The SQL statement that immediately follows and immediately preceeds this section of the trace file might provide clues regarding what caused the delay, and where that delay resides in the client side code. Maybe a creative developer added a "sleep for 10 seconds" routine when intending to sleep for 10ms? Maybe the client CPU is close to 100% utilization?
    Charles Hooper
    http://hoopercharles.wordpress.com/
    IT Manager/Oracle DBA
    K&M Machine-Fabricating, Inc.

  • Process wait SQL*Net message from dblink /SQL*Net message from client

    Hi There,
    We have an ETL process that we kindly need your help with. The process been running since Sun, where it transfers the data from one server (via remote query). The process was running ok till last night where it appeared
    to have stopped working and/or the session is just idling doing nothing.
    Here are some tests that we did to figure out what's going on:
    1. when looking at the session IO, we noticed that it's not changing:
    etl_user@datap> select sess_io.sid,
      2         sess_io.block_gets,
      3         sess_io.consistent_gets,
      4         sess_io.physical_reads,
      5         sess_io.block_changes,
      6         sess_io.consistent_changes
      7    from v$sess_io sess_io, v$session sesion
      8   where sesion.sid = sess_io.sid
      9     and sesion.username is not null
    10     and sess_io.sid=301
    11  order by 1;
                        logical   physical
      SID BLOCK_GETS      reads      reads BLOCK_CHANGES CONSISTENT_CHANGES
      301  388131317   97721268   26687579     223052804             161334
    Elapsed: 00:00:00.012. Check there is nothing blocking the session
    etl_user@datap> select * from v$lock where sid=301;
    ADDR     KADDR           SID TY        ID1        ID2      LMODE    REQUEST      CTIME      BLOCK
    684703F0 6847041C        301 DX         35          0          1          0      45237          0
    684714C4 684714F0        301 AE     199675          0          4          0     260148          0
    619651EC 6196521C        301 TM      52733          0          3          0      45241          0
    67F86ACC 67F86B0C        301 TX     458763      52730          6          0      45241          03. Check if the session is still valid:
    etl_user@datap> select status from v$session where sid=301;
    STATUS
    ACTIVE4. Check if there is anything in long ops that has not completed:
    etl_user@datap> SELECT SID, SERIAL#, opname, SOFAR, TOTALWORK,
      2      ROUND(SOFAR/TOTALWORK*100,2) COMPLETE, TIME_REMAINING/60
      3      FROM   V$SESSION_LONGOPS
      4      WHERE
      5      TOTALWORK != 0
      6      AND    SOFAR != TOTALWORK
      7     order by 1;
    no rows selected
    Elapsed: 00:00:00.005. Check if there is anything in long ops for the session:
    etl_user@datap> r
      1* select SID,SOFAR,TOTALWORK,START_TIME,LAST_UPDATE_TIME,TIME_REMAINING,MESSAGE from V$SESSION_LONGOPS where sid=301
      SID      SOFAR  TOTALWORK START_TIM LAST_UPDA TIME_REMAINING MESSAGE
      301          0          0 22-JUL-12 22-JUL-12                Gather Table's Index Statistics: Table address_etl : 0 out of 0 Indexes done
    Elapsed: 00:00:00.00This is a bit odd!! This particular step have actually completed successfully on the 22nd of July, and we don't know why it's still showing in long opps!? any ideas?
    6. Looking at the sql and what's it actually doing:
    etl_user@datap> select a.sid, a.value session_cpu, c.physical_reads,
      2  c.consistent_gets,d.event,
      3  d.seconds_in_wait
      4  from v$sesstat a,v$statname b, v$sess_io c, v$session_wait d
      5  where a.sid= &p_sid_number
      6  and b.name = 'CPU used by this session'
      7  and a.statistic# = b.statistic#
      8  and a.sid=c.sid
      9  and a.sid=d.sid;
    Enter value for p_sid_number: 301
    old   5: where a.sid= &p_sid_number
    new   5: where a.sid= 301
                 CPU   physical    logical                                   seconds
      SID       used      reads      reads EVENT                             waiting
      301    1966595   26687579   97721268 SQL*Net message from dblink         45792
    Elapsed: 00:00:00.037. We looked at the remote DB where the data resides on, and we noticed that the remote session was also waiting on the db link:
    SYS@destp> select a.sid, a.value session_cpu, c.physical_reads,
      2  c.consistent_gets,d.event,
      3  d.seconds_in_wait
      4  from v$sesstat a,v$statname b, v$sess_io c, v$session_wait d
      5  where a.sid= &p_sid_number
      6  and b.name = 'CPU used by this session'
      7  and a.statistic# = b.statistic#
      8  and a.sid=c.sid
      9  and a.sid=d.sid;
    Enter value for p_sid_number: 388
    old   5: where a.sid= &p_sid_number
    new   5: where a.sid= 390
           SID SESSION_CPU PHYSICAL_READS CONSISTENT_GETS EVENT                                                    SECONDS_IN_WAIT
           390         136              0            7605 SQL*Net message from client                                        46101
    SYS@destp>We have had an issue in the past where the connection was being dropped by the network when the process runs for few days, hence we have added the following to the sqlnet.ora and listener.ora files:
    sqlnet.ora:
    SQLNET.EXPIRE_TIME = 1
    SQLNET.INBOUND_CONNECT_TIMEOUT = 6000
    listener.ora:
    INBOUND_CONNECT_TIMEOUT_LISTENER = 6000What else can we do and/or further investigate to work out the root cause of the problem, and may be help resolve this. We don't want to just stop and start the process again as it took few days already. We have
    had a chat to the infrastructure team and they've assured us that there have been no network outages.
    Also, the alert logs for both instances (local and remote) shows no errors what so ever!
    Your input is highly appreciated.
    Thanks
    Edited by: rsar001 on Jul 25, 2012 10:22 AM

    Ran the query on both local/remote db, and no rows returned:
    etl_user@datap> SELECT DECODE(request,0,'Holder: ','Waiter: ')||vl.sid sess, status,
      2  id1, id2, lmode, request, vl.type
      3  FROM V$LOCK vl, v$session vs
      4  WHERE (id1, id2, vl.type) IN
      5  (SELECT id1, id2, type FROM V$LOCK WHERE request>0)
      6  and vl.sid = vs.sid
      7  ORDER BY id1, request
      8  /
    no rows selected
    Elapsed: 00:00:00.21

  • SQL Performance Degrades Severely in WAN

    The Oracle server is located in the central LAN and the client is located in the remote LAN. These two LANs are connected via 10Mbps wide network. Both LANs are of 100M bps inside. If the SQL commands are issued in the same LAN as Oracle server is located in, the speed is fast. However, if the same commands are issued in the remote LAN, the speed is degraded severly, almost 10 times slower. There are only a few results returned by these SQL commands. My questions are the reason of this performance degradeness and how to improve the performance in the remote client.
    The server is Oracle817 and OPS, and the SQL commands are issued in PB programs in the remote client.
    Thanks very much.

    Thank you very much.
    I found another point which might lead to the performance problem. The server's Listener.ora is configured as following:
    LISTENER =
    (DESCRIPTION_LIST =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = IPC)(KEY = EXTPROC))
    And the client's TNSNAMES.ORA is configured as following:
    EMIS02.HZJYJ.COM.CN =
    (DESCRIPTION =
    (ADDRESS_LIST =
    (ADDRESS = (PROTOCOL = TCP)(HOST = 172.26.17.18)(PORT = 1521))
    (CONNECT_DATA =
    (SERVICE_NAME = emis)
    It shows that the listener protocol is set as IPC. However, the client is set to the protocol of TCP. Would there be a network latency for the protocol conversion between IPC and TCP?
    Thanks a lot.

  • About wait SQL*Net

    Hi;
    I have huge wait for SQL*Net more data from dblink,Anyone has idea why this parameters rise? And how i can decrease it?
    Thanks alot

    hi,
    ckeck these links it might be useful for you...
    [http://download.oracle.com/docs/cd/B10501_01/server.920/a96536/apa5.htm]
    [http://74.125.153.132/search?q=cache:y-wXM02DSCoJ:nocoug.org/download/2006-08/unit7_sqlnet.ppt+huge+wait+for+SQL*Net+more+data+from+dblink+in+oracle&cd=1&hl=en&ct=clnk&gl=in]
    regards,
    Deepak

  • SQL*Net break/reset to client wait event

    Hi,
    Can you please explain me about "SQL*Net break/reset to client" wait event. One of my session was waiting for this event and when I looked which is causing the problem there are many duplicates in the input which were geting rejecting due ot the primary key. I didn't exactly get how the duplicate reject causing this wait event.
    I appreciate your help !!
    Thanks
    Anand
    Edited by: user509266 on Sep 4, 2009 10:58 AM

    Better place to ask is over in the Database forums.

  • FUTURE TCP 와 SQL*NET V2 사용시 PERFORMANCE

    제품 : SQL*NET
    작성날짜 : 1995-05-04
    Subject: Re: Know How..[ 2. Future/tcp 사용시]
    두번째 항목의 경우 future/tcp 에서 Named Server를 잘못설정하면 Host의
    Named Server를 다 찾고서, 없으면 Client의 host file을 뒤져서 자기 host
    alias로 처리하는 경우가 있었습니다.(1-2초 걸리던 connection time이 12초
    까지 걸렸음)
    경남은행에도 SLIP으로 테스트를 하는데 SQL*Net을 통하면 엄청 늦다고 계속
    불평 해서 가서 보니까 SQL*Net의 문제가 아니라 future/tcp의 Client host
    file과 Named Server의 Host file의 불일치 때문으로 판명난 적이 있었습니다.
    이런경우,
    1. Client에서 future/tcp의 install program으로 Named Server를 없애든지
    2. Host와 Client의 Host file을 일치 시키면 되었습니다.
    sql*net v1 & v2 test 지원 중 발견된 사항입니다.
    1.
    아직도 많은 사용자가 sql*net v2 가 별 효과가 없다고 생각합니다. 이런
    user는 주로 MTS 환경으로 setting은 하였으되 shared server와 dispatcher를
    한개씩 뛰우고 사용하고 있었읍니다.
    근본적으로 oracle의 mts는 FIFO 방식으로 SQL을 처리하기 때문에 server가
    하나만 떠 가지고는 당연히 sql*net v1의 dedicated server 보다 느리게
    처리됩니다.
    따라서 mts 환경으로 setup 할 때에는 최소한 shared server와 dispatcher를
    2개 이상씩 (3개이상 권유) 뛰워서 사용할 수 있도록 하기 바랍니다.
    일부에서는 이런이유로 oracle mts 기능이 별볼일 없더라 라고 오해하며
    옆사람에게도 전달하고 있습니다.
    2.
    future tcp/ip 사용시에 tnsnames.ora에 host name 을 사용하면 sql*net v2 가
    v1보다 3배 정도 더 느리게 되는데 이때에는 ip address number를 직접사용하면
    됩니다.
    삼성전관 pdss test시 connection time : sql*net v1 --> 6-8초
    sql*net v2 host name --> 25초
    sql*net v2 ip number --> 2-3초

    Yes, it seems to be a kernel bug. Previously, my wife used Windows for years and nothing like this happened. Now, she tells a lot about Linux systems :-)
    An example of this very-ugly-workaround for somebody who'll find this topic struggling with the same problem:
    $ cat /etc/pm/sleep.d/99_fix_time_shift
    #!/bin/bash
    # fixing https://bbs.archlinux.org/viewtopic.php?id=173487
    case "$1" in
    suspend)
    date +%s > /tmp/suspend.log
    resume)
    was=`cat /tmp/suspend.log`
    now=`date +%s`
    # time shifts for 68 hours
    if [ $now -gt `expr $was + 244800` ]; then
    date -s "`date -R --date="-68 hours ago"`"
    ## sleep 30; ntpdate ntp.ubuntu.com
    fi
    esac
    Last edited by shurup (2014-03-26 16:25:55)

  • Performance Degradation - High fetches and Prses

    Hello,
    My analysis on a particular job trace file drew my attention towards:
    1) High rate of Parses instead of Bind variables usage.
    2) High fetches and poor number/ low number of rows being processed
    Please let me kno as to how the performance degradation can be minimised, Perhaps the high number of SQL* Net Client wait events may be due to multiple fetches and transactions with the client.
    EXPLAIN PLAN FOR SELECT /*+ FIRST_ROWS (1)  */ * FROM  SAPNXP.INOB
    WHERE MANDT = :A0
    AND KLART = :A1
    AND OBTAB = :A2
    AND OBJEK LIKE :A3 AND ROWNUM <= :A4;
    call     count       cpu    elapsed       disk      query    current        rows
    Parse      119      0.00       0.00          0          0          0           0
    Execute    239      0.16       0.13          0          0          0           0
    Fetch      239   2069.31    2127.88          0   13738804          0           0
    total      597   2069.47    2128.01          0   13738804          0           0
    PLAN_TABLE_OUTPUT
    Plan hash value: 1235313998
    | Id  | Operation                    | Name   | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT             |        |     2 |   268 |     1   (0)| 00:00:01 |
    |*  1 |  COUNT STOPKEY               |        |       |       |            |          |
    |*  2 |   TABLE ACCESS BY INDEX ROWID| INOB   |     2 |   268 |     1   (0)| 00:00:01 |
    |*  3 |    INDEX SKIP SCAN           | INOB~2 |  7514 |       |     1   (0)| 00:00:01 |
    Predicate Information (identified by operation id):
       1 - filter(ROWNUM<=TO_NUMBER(:A4))
       2 - filter("OBJEK" LIKE :A3 AND "KLART"=:A1)
       3 - access("MANDT"=:A0 AND "OBTAB"=:A2)
           filter("OBTAB"=:A2)
    18 rows selected.
    SQL> SELECT INDEX_NAME,TABLE_NAME,COLUMN_NAME FROM DBA_IND_COLUMNS WHERE INDEX_OWNER='SAPNXP' AND INDEX_NAME='INOB~2';
    INDEX_NAME      TABLE_NAME                     COLUMN_NAME
    INOB~2          INOB                           MANDT
    INOB~2          INOB                           CLINT
    INOB~2          INOB                           OBTAB
    Is it possible to Maximise the rows/fetch
    call     count       cpu    elapsed       disk      query    current        rows
    Parse      163      0.03       0.00          0          0          0           0
    Execute    163      0.01       0.03          0          0          0           0
    Fetch   174899     55.26      59.14          0    1387649          0     4718932
    total   175225     55.30      59.19          0    1387649          0     4718932
    Misses in library cache during parse: 0
    Optimizer mode: ALL_ROWS
    Parsing user id: 27
    Rows     Row Source Operation
      28952  TABLE ACCESS BY INDEX ROWID EDIDC (cr=8505 pr=0 pw=0 time=202797 us)
      28952   INDEX RANGE SCAN EDIDC~1 (cr=1457 pr=0 pw=0 time=29112 us)(object id 202995)
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      SQL*Net message to client                  174899        0.00          0.16
      SQL*Net more data to client                155767        0.01          5.69
      SQL*Net message from client                174899        0.11        208.21
      latch: cache buffers chains                     2        0.00          0.00
      latch free                                      4        0.00          0.00
    ********************************************************************************

    user4566776 wrote:
    My analysis on a particular job trace file drew my attention towards:
    1) High rate of Parses instead of Bind variables usage.
    But if you look at the text you are using bind variables.
    The first query is executed 239 times - which matches the 239 fetches. You cut off some of the useful information from the tkprof output, but the figures show that you're executing more than once per parse call. The time is CPU time spent using a bad execution plan to find no data -- this looks like a bad choice of index, possibly a side effect of the first_rows(1) hint.
    2) High fetches and poor number/ low number of rows being processedThe second query is doing a lot of fetches because in 163 executions it is fetching 4.7 million rows at roughly 25 rows per fetch. You might improve performance a little by increasing the array fetch size - but probably not by more than a factor of 2.
    You'll notice that even though you record 163 parse calls for the second statement the number of " Misses in library cache during parse" is zero - so the parse calls are pretty irrelevant, the cursor is being re-used.
    Regards
    Jonathan Lewis
    http://jonathanlewis.wordpress.com
    http://www.jlcomp.demon.co.uk
    To post code, statspack/AWR report, execution plans or trace files, start and end the section with the tag {noformat}{noformat} (lowercase, curly brackets, no spaces) so that the text appears in fixed format.
    "Science is more than a body of knowledge; it is a way of thinking"
    Carl Sagan                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • PL/SQL to Java Interface - Overwhelming Overhead?

    My company is running Oracle 10g R2. I am currently exploring the use of java classes from PL/SQL. This is because we have multiple code bases, including Java, PowerBuilder (which can interface with Java), and PL/SQL (which can interface with Java).
    Doing some performance testing, I found some rather alarming results. Running a simple java function 1 million times, I tested performance of PL./SQL to java and PowerBuilder to Java.
    In PL/SQL, the 1 mil calls executed in ~120 s.
    In PowerBuilder, the 1 mil calls executed in ~54 s.
    Is it possible that our database is incorrectly configured for best java performance? Not only does it appear that PowerBuilder, a much less pervasive language than PL/SQL, is over twice as fast, but the PB test was run on my laptop, which is no where near as powerful as the database server that the PL/SQL procedure ran against, leading me to believe that the performance gap is actually much wider.
    Anyone have any tips to improve the performance? Or is this simply the nature of the beast? I can't seem to find any posts on the net about people experiencing huge PL/SQL to Java overhead, so I'm hoping it is just something I am doing wrong.
    Thanks for your help!
    -Brett Birschbach

    Below is my test code. Any suggestions are appreciated.
    Thanks!
    -Brett
    ==================================================
    Java Class:
    public class TestConvert {
        // For running straight from Java
        public static void main(String[] args){
            System.out.println(callAndTime());
        // For running 1 mil calls with only one call from PowerBuilder or PL/SQL
        public static long callAndTime(){
            TestConvert.convertEsnDecToHex("13005454488");
            long start = System.currentTimeMillis();
            for (int i = 0; i < 1000000; i++){
                TestConvert.convertEsnDecToHex("13005454488");
            long end = System.currentTimeMillis();
            return end-start;
        // For performing the actual work
        public static String convertEsnDecToHex(String esn) {
            String result = null;
            result = Integer.toHexString(new Integer(esn.substring(0, 3)).intValue());
            result += Integer.toHexString(new Integer(esn.substring(3)).intValue());
            return result.toUpperCase();
        // Non-static wrapper necessary for PowerBuilder
        public String callAndTimeNS(){
            return String.valueOf(callAndTime());
        // Non-static wrapper necessary for PowerBuilder 
        public String convertEsnDecToHexNS(String esn){
            return convertEsnDecToHex(esn);
    }PL/SQL Script for 1 Million Java Calls:
    DECLARE
      var       VARCHAR2( 20 );
      t_begin   NUMBER;
      t_end     NUMBER;
    BEGIN
      var := testconvert.convertesndectohex( '13005454488' );
      t_begin := DBMS_UTILITY.get_time;
      FOR i IN 1 .. 1000000
      LOOP
        var := testconvert.convertesndectohex( '13005454488' );
      END LOOP;
      t_end := DBMS_UTILITY.get_time;
      DBMS_OUTPUT.put_line( var );
      DBMS_OUTPUT.put_line(  ( t_end - t_begin ) / 100 || ' seconds' );
    END;
    /PowerBuilder for 1 Million Java Calls:
    EJBConnection lEJBConn
    TestConvert lnv_test
    String ls_ret
    Long i
    Time t_begin, t_end
    lEJBConn = CREATE EJBConnection
    lEJBConn.CreateJavaInstance( lnv_test, "TestConvert")
    ls_ret = lnv_test.convertesndectohexns("13005454488")
    t_begin = now()
    FOR i = 1 TO 1000000          
         ls_ret = lnv_test.convertesndectohexns("13005454488")
    NEXT
    t_end = now()
    MessageBox("Hex Version",ls_ret + " - " + String(SecondsAfter(t_begin, t_end)) + " seconds")
    DESTROY lEJBConn

  • Performance Degradated  Possibly due to CPU Time

    Hi Gurus,
    There is a utility in our application with which we can upload an excel sheet containing data and schedule the timing of the job, now when the job is executed, each row in the excel sheet leads to dml operations on multiple tables finally leading to generation of a transaction no. Now at the start around 100-120 transaction nos were generated which goes down drastically to around 30-35 after 6-7 hours. AWR report at the two instances shows that CPU time has decreased considerably in the 2nd case.
    I would like you experts to check the awr reports and suggest me the probable reason for the decrease in performance.
    Brief AWR Report When Performance was OK
    Snap Id Snap Time Sessions Curs/Sess
    Begin Snap: 2151 14-Dec-10 16:32:57 26 3.7
    End Snap: 2152 14-Dec-10 17:31:04 40 16.7
    Elapsed: 58.13 (mins)
    DB Time: 55.37 (mins)
    Cache Sizes
    ~~~~~~~~~~~ Begin End
    Buffer Cache: 436M 444M Std Block Size: 8K
    Shared Pool Size: 120M 120M Log Buffer: 6,968K
    Load Profile
    ~~~~~~~~~~~~ Per Second Per Transaction
    Redo size: 27,541.56 1,747.07
    Logical reads: 49,830.97 3,160.97
    Block changes: 181.79 11.53
    Physical reads: 1,270.12 80.57
    Physical writes: 2.81 0.18
    User calls: 119.95 7.61
    Parses: 200.94 12.75
    Hard parses: 29.29 1.86
    Sorts: 91.80 5.82
    Logons: 0.03 0.00
    Executes: 457.16 29.00
    Transactions: 15.76
    % Blocks changed per Read: 0.36 Recursive Call %: 96.36
    Rollback per transaction %: 0.01 Rows per Sort: 270.64
    Instance Efficiency Percentages (Target 100%)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Buffer Nowait %: 100.00 Redo NoWait %: 100.00
    Buffer Hit %: 97.45 In-memory Sort %: 100.00
    Library Hit %: 90.18 Soft Parse %: 85.42
    Execute to Parse %: 56.05 Latch Hit %: 100.00
    Parse CPU to Parse Elapsd %: 98.04 % Non-Parse CPU: 94.98
    Shared Pool Statistics Begin End
    Memory Usage %: 72.65 84.55
    % SQL with executions>1: 71.49 75.08
    % Memory for SQL w/exec>1: 84.79 85.25
    Top 5 Timed Events Avg %Total
    ~~~~~~~~~~~~~~~~~~ wait Call
    Event Waits Time (s) (ms) Time Wait Class
    CPU time 2,541 76.5
    db file scattered read 284,992 410 1 12.3 User I/O
    log file parallel write 31,188 145 5 4.4 System I/O
    TCP Socket (KGAS) 24 131 5459 3.9 Network
    log file sync 8,617 46 5 1.4 Commit
    Time Model Statistics DB/Inst: ABCTEST/abctest Snaps: 2151-2152
    -> Total time in database user-calls (DB Time): 3322.4s
    -> Statistics including the word "background" measure background process
    time, and so do not contribute to the DB time statistic
    -> Ordered by % or DB time desc, Statistic name
    Statistic Name Time (s) % of DB Time
    sql execute elapsed time 3,176.8 95.6
    DB CPU 2,541.1 76.5
    PL/SQL execution elapsed time 288.5 8.7
    parse time elapsed 278.7 8.4
    hard parse elapsed time 254.6 7.7
    PL/SQL compilation elapsed time 28.9 .9
    failed parse elapsed time 4.9 .1
    hard parse (sharing criteria) elapsed time 1.3 .0
    sequence load elapsed time 1.1 .0
    repeated bind elapsed time 1.1 .0
    connection management call elapsed time 0.7 .0
    hard parse (bind mismatch) elapsed time 0.3 .0
    DB time 3,322.4 N/A
    background elapsed time 197.1 N/A
    background cpu time 5.6 N/A
    Wait Class DB/Inst: ABCTEST/abctest Snaps: 2151-2152
    -> s - second
    -> cs - centisecond - 100th of a second
    -> ms - millisecond - 1000th of a second
    -> us - microsecond - 1000000th of a second
    -> ordered by wait time desc, waits desc
    Avg
    %Time Total Wait wait Waits
    Wait Class Waits -outs Time (s) (ms) /txn
    User I/O 292,720 .0 427 1 5.3
    System I/O 37,408 .0 190 5 0.7
    Network 272,062 .0 132 0 4.9
    Commit 8,617 .0 46 5 0.2
    Configuration 4 .0 2 593 0.0
    Application 3,212 .0 0 0 0.1
    Other 280 .4 0 0 0.0
    Concurrency 247 .0 0 0 0.0
    Wait Events DB/Inst: ABCTEST/abctest Snaps: 2151-2152
    -> s - second
    -> cs - centisecond - 100th of a second
    -> ms - millisecond - 1000th of a second
    -> us - microsecond - 1000000th of a second
    -> ordered by wait time desc, waits desc (idle events last)
    Avg
    %Time Total Wait wait Waits
    Event Waits -outs Time (s) (ms) /txn
    db file scattered read 284,992 .0 410 1 5.2
    log file parallel write 31,188 .0 145 5 0.6
    TCP Socket (KGAS) 24 .0 131 5459 0.0
    log file sync 8,617 .0 46 5 0.2
    db file parallel write 4,215 .0 29 7 0.1
    db file sequential read 7,634 .0 16 2 0.1
    control file parallel write 1,202 .0 16 13 0.0
    Streams AQ: enqueue blocked 1 .0 2 2055 0.0
    control file sequential read 795 .0 1 1 0.0
    Data file init write 48 .0 0 9 0.0
    SQL*Net message to client 266,802 .0 0 0 4.9
    log file switch completion 3 .0 0 106 0.0
    SQL*Net break/reset to clien 3,212 .0 0 0 0.1
    SQL*Net more data to client 4,789 .0 0 0 0.1
    direct path write 23 .0 0 3 0.0
    rdbms ipc reply 67 .0 0 1 0.0
    kksfbc child completion 1 100.0 0 47 0.0
    latch: shared pool 213 .0 0 0 0.0
    latch: library cache 26 .0 0 1 0.0
    log file single write 4 .0 0 7 0.0
    log file sequential read 4 .0 0 5 0.0
    db file single write 3 .0 0 5 0.0
    os thread startup 3 .0 0 4 0.0
    enq: JS - queue lock 4 .0 0 3 0.0
    LGWR wait for redo copy 207 .0 0 0 0.0
    library cache pin 1 .0 0 6 0.0
    SQL*Net more data from clien 447 .0 0 0 0.0
    library cache load lock 1 .0 0 2 0.0
    latch: cache buffers chains 1 .0 0 0 0.0
    latch: row cache objects 1 .0 0 0 0.0
    direct path read 20 .0 0 0 0.0
    latch free 1 .0 0 0 0.0
    cursor: mutex S 1 .0 0 0 0.0
    SQL*Net message from client 266,789 .0 64,143 240 4.9
    Streams AQ: qmn slave idle w 124 .0 3,488 28127 0.0
    Streams AQ: qmn coordinator 257 51.4 3,488 13571 0.0
    virtual circuit status 116 100.0 3,480 29999 0.0
    Streams AQ: waiting for time 5 60.0 745 148902 0.0
    jobq slave wait 52 96.2 155 2987 0.0
    PL/SQL lock timer 16 100.0 16 995 0.0
    class slave wait 1 100.0 5 4995 0.0
    Background Wait Events DB/Inst: ABCTEST/abctest Snaps: 2151-2152
    -> ordered by wait time desc, waits desc (idle events last)
    Avg
    %Time Total Wait wait Waits
    Event Waits -outs Time (s) (ms) /txn
    log file parallel write 31,188 .0 145 5 0.6
    db file parallel write 4,215 .0 29 7 0.1
    control file parallel write 1,193 .0 16 13 0.0
    Streams AQ: enqueue blocked 1 .0 2 2055 0.0
    control file sequential read 691 .0 0 1 0.0
    db file sequential read 66 .0 0 5 0.0
    direct path write 23 .0 0 3 0.0
    log file single write 4 .0 0 7 0.0
    log file sequential read 4 .0 0 5 0.0
    events in waitclass Other 211 .0 0 0 0.0
    os thread startup 3 .0 0 4 0.0
    db file scattered read 1 .0 0 13 0.0
    latch: shared pool 5 .0 0 0 0.0
    direct path read 20 .0 0 0 0.0
    latch: library cache 1 .0 0 0 0.0
    rdbms ipc message 34,411 32.3 30,621 890 0.6
    Streams AQ: qmn slave idle w 124 .0 3,488 28127 0.0
    Streams AQ: qmn coordinator 257 51.4 3,488 13571 0.0
    pmon timer 1,235 100.0 3,486 2822 0.0
    smon timer 19 47.4 3,460 182099 0.0
    Streams AQ: waiting for time 5 60.0 745 148902 0.0
    class slave wait 1 100.0 5 4995 0.0
    Operating System Statistics DB/Inst: ABCTEST/abctest Snaps: 2151-2152
    Statistic Total
    AVG_BUSY_TIME 81,951
    AVG_IDLE_TIME 266,698
    AVG_SYS_TIME 10,482
    AVG_USER_TIME 71,389
    BUSY_TIME 328,163
    IDLE_TIME 1,067,144
    SYS_TIME 42,281
    USER_TIME 285,882
    RSRC_MGR_CPU_WAIT_TIME 0
    VM_IN_BYTES 1,625,600,000
    VM_OUT_BYTES 145,162,240
    PHYSICAL_MEMORY_BYTES 3,755,851,776
    NUM_CPUS 4
    NUM_CPU_CORES 1
    Brief AWR Report When Performance* Deteriorated.
    Snap Id Snap Time Sessions Curs/Sess
    Begin Snap: 2168 15-Dec-10 08:31:05 32 18.4
    End Snap: 2169 15-Dec-10 09:30:56 32 18.3
    Elapsed: 59.85 (mins)
    DB Time: 17.97 (mins)
    Cache Sizes
    ~~~~~~~~~~~ Begin End
    Buffer Cache: 448M 448M Std Block Size: 8K
    Shared Pool Size: 116M 116M Log Buffer: 6,968K
    Load Profile
    ~~~~~~~~~~~~ Per Second Per Transaction
    Redo size: 10,503.58 1,792.02
    Logical reads: 17,583.21 2,999.87
    Block changes: 68.60 11.70
    Physical reads: 472.37 80.59
    Physical writes: 1.54 0.26
    User calls: 39.12 6.67
    Parses: 53.32 9.10
    Hard parses: 7.99 1.36
    Sorts: 13.84 2.36
    Logons: 0.00 0.00
    Executes: 130.30 22.23
    Transactions: 5.86
    % Blocks changed per Read: 0.39 Recursive Call %: 94.39
    Rollback per transaction %: 0.00 Rows per Sort: 691.64
    Instance Efficiency Percentages (Target 100%)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Buffer Nowait %: 100.00 Redo NoWait %: 100.00
    Buffer Hit %: 97.31 In-memory Sort %: 100.00
    Library Hit %: 92.41 Soft Parse %: 85.02
    Execute to Parse %: 59.08 Latch Hit %: 100.00
    Parse CPU to Parse Elapsd %: 100.28 % Non-Parse CPU: 95.35
    Shared Pool Statistics Begin End
    Memory Usage %: 88.40 88.48
    % SQL with executions>1: 76.15 80.48
    % Memory for SQL w/exec>1: 86.82 88.85
    Top 5 Timed Events Avg %Total
    ~~~~~~~~~~~~~~~~~~ wait Call
    Event Waits Time (s) (ms) Time Wait Class
    CPU time 918 85.1
    db file scattered read 113,003 127 1 11.7 User I/O
    log file parallel write 11,978 52 4 4.8 System I/O
    db file parallel write 3,089 16 5 1.4 System I/O
    control file parallel write 1,217 15 13 1.4 System I/O
    Time Model Statistics DB/Inst: ABCTEST/abctest Snaps: 2168-2169
    -> Total time in database user-calls (DB Time): 1078.1s
    -> Statistics including the word "background" measure background process
    time, and so do not contribute to the DB time statistic
    -> Ordered by % or DB time desc, Statistic name
    Statistic Name Time (s) % of DB Time
    sql execute elapsed time 1,032.1 95.7
    DB CPU 917.6 85.1
    parse time elapsed 71.8 6.7
    hard parse elapsed time 52.4 4.9
    PL/SQL execution elapsed time 7.2 .7
    PL/SQL compilation elapsed time 6.2 .6
    failed parse elapsed time 1.8 .2
    sequence load elapsed time 0.4 .0
    repeated bind elapsed time 0.3 .0
    connection management call elapsed time 0.1 .0
    hard parse (sharing criteria) elapsed time 0.0 .0
    hard parse (bind mismatch) elapsed time 0.0 .0
    DB time 1,078.1 N/A
    background elapsed time 89.4 N/A
    background cpu time 6.4 N/A
    Wait Class DB/Inst: ABCTEST/abctest Snaps: 2168-2169
    -> s - second
    -> cs - centisecond - 100th of a second
    -> ms - millisecond - 1000th of a second
    -> us - microsecond - 1000000th of a second
    -> ordered by wait time desc, waits desc
    Avg
    %Time Total Wait wait Waits
    Wait Class Waits -outs Time (s) (ms) /txn
    User I/O 122,810 .0 133 1 5.8
    System I/O 17,013 .0 83 5 0.8
    Commit 3,129 .0 14 5 0.1
    Network 90,186 .0 0 0 4.3
    Configuration 2 .0 0 63 0.0
    Application 1,120 .0 0 0 0.1
    Other 112 .0 0 0 0.0
    Concurrency 2 .0 0 6 0.0
    Wait Events DB/Inst: ABCTEST/abctest Snaps: 2168-2169
    -> s - second
    -> cs - centisecond - 100th of a second
    -> ms - millisecond - 1000th of a second
    -> us - microsecond - 1000000th of a second
    -> ordered by wait time desc, waits desc (idle events last)
    Avg
    %Time Total Wait wait Waits
    Event Waits -outs Time (s) (ms) /txn
    db file scattered read 113,003 .0 127 1 5.4
    log file parallel write 11,978 .0 52 4 0.6
    db file parallel write 3,089 .0 16 5 0.1
    control file parallel write 1,217 .0 15 13 0.1
    log file sync 3,129 .0 14 5 0.1
    db file sequential read 9,753 .0 6 1 0.5
    control file sequential read 725 .0 0 0 0.0
    Data file init write 32 .0 0 7 0.0
    SQL*Net message to client 88,906 .0 0 0 4.2
    log file switch completion 2 .0 0 63 0.0
    SQL*Net break/reset to clien 1,120 .0 0 0 0.1
    rdbms ipc reply 4 .0 0 8 0.0
    direct path write 10 .0 0 3 0.0
    SQL*Net more data to client 1,120 .0 0 0 0.1
    db file single write 2 .0 0 6 0.0
    os thread startup 2 .0 0 6 0.0
    log file single write 2 .0 0 4 0.0
    log file sequential read 2 .0 0 3 0.0
    SQL*Net more data from clien 160 .0 0 0 0.0
    LGWR wait for redo copy 108 .0 0 0 0.0
    direct path read 10 .0 0 0 0.0
    SQL*Net message from client 88,906 .0 55,500 624 4.2
    virtual circuit status 120 100.0 3,588 29900 0.0
    Streams AQ: qmn slave idle w 127 .0 3,550 27949 0.0
    Streams AQ: qmn coordinator 260 51.2 3,550 13652 0.0
    class slave wait 2 100.0 10 4994 0.0
    SGA: MMAN sleep for componen 9 22.2 0 4 0.0
    Background Wait Events DB/Inst: ABCTEST/abctest Snaps: 2168-2169
    -> ordered by wait time desc, waits desc (idle events last)
    Avg
    %Time Total Wait wait Waits
    Event Waits -outs Time (s) (ms) /txn
    log file parallel write 11,978 .0 52 4 0.6
    db file parallel write 3,089 .0 16 5 0.1
    control file parallel write 1,211 .0 15 13 0.1
    db file scattered read 175 .0 0 1 0.0
    control file sequential read 33 .0 0 2 0.0
    db file sequential read 53 .0 0 1 0.0
    direct path write 10 .0 0 3 0.0
    os thread startup 2 .0 0 6 0.0
    log file single write 2 .0 0 4 0.0
    log file sequential read 2 .0 0 3 0.0
    events in waitclass Other 108 .0 0 0 0.0
    direct path read 10 .0 0 0 0.0
    rdbms ipc message 19,991 57.4 31,320 1567 0.9
    pmon timer 1,208 100.0 3,590 2972 0.1
    Streams AQ: qmn slave idle w 127 .0 3,550 27949 0.0
    Streams AQ: qmn coordinator 260 51.2 3,550 13652 0.0
    smon timer 12 100.0 3,302 275149 0.0
    SGA: MMAN sleep for componen 9 22.2 0 4 0.0
    Operating System Statistics DB/Inst: ABCTEST/abctest Snaps: 2168-2169
    Statistic Total
    AVG_BUSY_TIME 30,152
    AVG_IDLE_TIME 328,781
    AVG_SYS_TIME 4,312
    AVG_USER_TIME 25,757
    BUSY_TIME 120,981
    IDLE_TIME 1,315,433
    SYS_TIME 17,612
    USER_TIME 103,369
    RSRC_MGR_CPU_WAIT_TIME 0
    VM_IN_BYTES 353,361,920
    VM_OUT_BYTES 163,041,280
    PHYSICAL_MEMORY_BYTES 3,755,851,776
    NUM_CPUS 4
    NUM_CPU_CORES 1
    Request you to help me.
    Thanks in Advance,
    Rajesh

    Hi CKPT,
    Thanks for your reply.
    The main finding that I have got from addm report (in both the cases i.e when performance was good initially vis a vis when performance deteriorated is the same -
    FINDING 1: 100% impact (3234 seconds)
    Significant virtual memory paging was detected on the host operating system.
    RECOMMENDATION 1: Host Configuration, 100% benefit (3234 seconds)
    ACTION: Host operating system was experiencing significant paging but no
    particular root cause could be detected. Investigate processes that
    do not belong to this instance running on the host that are consuming
    significant amount of virtual memory. Also consider adding more
    physical memory to the host.
    I still am unable to find out the reasons ... pls help.
    Thanks
    Rajesh

  • SQL*Net more data to dblink event for hours or days

    Hello Everyone,
    in our production database when we commit a transaction we call a remote procedure over dblink.
    usually the call succeeds ,but every now and then a couple of sessions hang up,
    when I use the session browser of Toad I notice that these sessions are waiting with the event SQL*Net more data to dblink
    below are some queries and their results:
    select sid,event,wait_class,wait_time,seconds_in_wait,state from gv$session_wait where sid=225
    rslt:
    225 SQL*Net more data to dblink Network -1 18279 WAITED SHORT TIME
    select * from gv$session_wait_history where sid=225
    rslt:
    INST_ID     SID     SEQ#     EVENT#     EVENT     P1TEXT     P1     P2TEXT     P2     P3TEXT     P3     WAIT_TIME     WAIT_TIME_MICRO     TIME_SINCE_LAST_WAIT_MICRO
    2     225     1     344     SQL*Net more data to dblink     driver id     1413697536     #bytes     8144          0     0     8     41
    2     225     2     344     SQL*Net more data to dblink     driver id     1413697536     #bytes     8143          0     0     13     39
    2     225     3     344     SQL*Net more data to dblink     driver id     1413697536     #bytes     8149          0     0     7     37
    2     225     4     344     SQL*Net more data to dblink     driver id     1413697536     #bytes     8145          0     0     8     40
    2     225     5     344     SQL*Net more data to dblink     driver id     1413697536     #bytes     8145          0     1     11394     37
    2     225     6     344     SQL*Net more data to dblink     driver id     1413697536     #bytes     8143          0     0     7     37
    2     225     7     344     SQL*Net more data to dblink     driver id     1413697536     #bytes     8145          0     0     7     36
    2     225     8     344     SQL*Net more data to dblink     driver id     1413697536     #bytes     8138          0     0     8     37
    2     225     9     344     SQL*Net more data to dblink     driver id     1413697536     #bytes     8149          0     0     8     38
    2     225     10     344     SQL*Net more data to dblink     driver id     1413697536     #bytes     8149          0     1     11476     37I'm not sure but from the above results ,is it safe to conclude that I get stuck because I am caught in infinite loop trying to write to dblink?
    additional notes:
    <li>some times when I look at the current statement I find that the statement is a query or insert into a local table.
    <li>there were some network outages.
    <li>when viewing the database log files I found:Error 3135 trapped in 2PC on transaction 7.6.306086. Cleaning up.
    Error stack returned to user:
    ORA-03135: connection lost contact
    ORA-02063: preceding line from MPF//where MPF is the name of dblinkeven though we use the DBLink to execute the procedure only without any changes on the remote DB, and we don't use 2PC.
    <li> the local DB is a RAC
    select * from dba_blockers
    rslt:
    no rows
    select * from dba_waiters
    rslt:
    no rows
    select * from gv$lock where sid=225
    rslt:
    INST_ID     ADDR     KADDR     SID     TYPE     ID1     ID2     LMODE     REQUEST     CTIME     BLOCK
    2     0000000199D54F60     0000000199D54FB8     225     AE     100     0     4     0     20152     2
    2     000000018EA18108     000000018EA18180     225     TX     1114138     251539     6     0     19654     2
    select * from gv$session where sid=225
    rslt:
    INST_ID     SADDR     SID     SERIAL#     AUDSID     PADDR     USER#     USERNAME     COMMAND     OWNERID     TADDR     LOCKWAIT     STATUS     SERVER     SCHEMA#     SCHEMANAME     OSUSER     PROCESS     MACHINE     PORT     TERMINAL     PROGRAM     TYPE     SQL_ADDRESS     SQL_HASH_VALUE     SQL_ID     SQL_CHILD_NUMBER     SQL_EXEC_START     SQL_EXEC_ID     PREV_SQL_ADDR     PREV_HASH_VALUE     PREV_SQL_ID     PREV_CHILD_NUMBER     PREV_EXEC_START     PREV_EXEC_ID     PLSQL_ENTRY_OBJECT_ID     PLSQL_ENTRY_SUBPROGRAM_ID     PLSQL_OBJECT_ID     PLSQL_SUBPROGRAM_ID     MODULE     MODULE_HASH     ACTION     ACTION_HASH     CLIENT_INFO     FIXED_TABLE_SEQUENCE     ROW_WAIT_OBJ#     ROW_WAIT_FILE#     ROW_WAIT_BLOCK#     ROW_WAIT_ROW#     TOP_LEVEL_CALL#     LOGON_TIME     LAST_CALL_ET     PDML_ENABLED     FAILOVER_TYPE     FAILOVER_METHOD     FAILED_OVER     RESOURCE_CONSUMER_GROUP     PDML_STATUS     PDDL_STATUS     PQ_STATUS     CURRENT_QUEUE_DURATION     CLIENT_IDENTIFIER     BLOCKING_SESSION_STATUS     BLOCKING_INSTANCE     BLOCKING_SESSION     FINAL_BLOCKING_SESSION_STATUS     FINAL_BLOCKING_INSTANCE     FINAL_BLOCKING_SESSION     SEQ#     EVENT#     EVENT     P1TEXT     P1     P1RAW     P2TEXT     P2     P2RAW     P3TEXT     P3     P3RAW     WAIT_CLASS_ID     WAIT_CLASS#     WAIT_CLASS     WAIT_TIME     SECONDS_IN_WAIT     STATE     WAIT_TIME_MICRO     TIME_REMAINING_MICRO     TIME_SINCE_LAST_WAIT_MICRO     SERVICE_NAME     SQL_TRACE     SQL_TRACE_WAITS     SQL_TRACE_BINDS     SQL_TRACE_PLAN_STATS     SESSION_EDITION_ID     CREATOR_ADDR     CREATOR_SERIAL#     ECID
    2     00000001993E4F58     225     445     1353611     0000000198E2FA10     198     <schema>     47     2147483644     000000018EA18108          ACTIVE     DEDICATED     198     <schema>     oracle     1234     <cluster name>     49993     unknown     JDBC Thin Client     USER     00000001968A1250     3198676106     72y8ztfzagv4a     2     02/04/2013 11:18:22 ص     33554852     00000001968A18E0     3992616824     03mm4u3qznzvs     0     02/04/2013 11:18:22 ص     33554730     158207     1     158207     1     JDBC Thin Client     2546894660          0          12206     122409     8     49354     0     94     02/04/2013 10:53:20 ص     19559     NO     NONE     NONE     NO          DISABLED     ENABLED     ENABLED     0          NOT IN WAIT               NOT IN WAIT               42844     344     SQL*Net more data to dblink     driver id     1413697536     0000000054435000     #bytes     8144     0000000000001FD0          0     00     2000153315     7     Network     -1     19553     WAITED SHORT TIME     8          19553325216     SYS$USERS     DISABLED     FALSE     FALSE     FIRST EXEC     100     0000000198E2FA10     2     004qLk^iPyp0bqw5wFDCiW0002fR000B^f

    Hi ,
    we managed to reproduce the case in test environment, below are the steps:
    1)have 2 databases on different machines, will call the first one local, the other one remote.
    2)in the local database create:
    a - DBLink to remote database.
    b - read data from remote database(we simply used select count(*) from dummy_table )
    c - insert data into a table on the local database
    d - terminate the connection between the 2 databases (disconnect either machine from the network)
    e - commit on local database.
    what we noticed was the following:
    1)when the local database is disconnected from the network(the machine is not connected to any network at the moment): almost immediately throws an error, and issuing the following:
    select * from dba_2pc_pending;we found some data .
    2) when the remote database was disconnected(the local database is still connected to the network):
    after 7-8 seconds an error is thrown, and issuing the following:
    select * from dba_2pc_pending;did not return any data.
    since this is pretty similar to our case ,we concluded that it's a network issue.
    is this the correct behavior ?
    as a temporary solution till the network issue is fixed ,we did the following:
    1) changed the call of the remote procedure to calling a local procedure that calls the remote procedure.
    2) added pragma autonomous_transaction to the local procedure.
    3) at the end of the local procedure rollback the autonomous transaction.
    it seems that since the global transaction does not use the DBLink database does not issue a 2PC commit.
    this works in my cases since the DBLink is only issed to read data.

  • High SQL*Net message values in trace file.

    Hi all,
    This is my first post here. I will try to more less describe the problem i am facing.
    Any help is more than welcome!
    I am facing some performance issues with application. Slow GUI. I run some tests, i tracked the session. what i found in trace file is:
    OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS
    call     count       cpu    elapsed       disk      query    current        rows
    Parse     1734     1.61   1.61             0            0            0              0
    Execute   1734   32.52  32.56           0           26          15             4
    Fetch     1737     14.46  14.51           2        41867        84          2847
    total     5205     48.59   48.69            2        41893        99          2851
    Misses in library cache during parse: 7
    Misses in library cache during execute: 5
    Elapsed times include waiting on following events:
      Event waited on                             Times       Max. Wait     Total Waited
      ----------------------------------------           Waited       ----------            ------------
      SQL*Net message to client            5207           0.00               0.02
      SQL*Net message from client        5206          106.18             339.72
      log file sync                                    3               0.00               0.00
      SQL*Net more data to client            51              0.00               0.00
      SQL*Net more data from client        10              0.00               0.00
      Disk file operations I/O                    1               0.00               0.00
      db file sequential read                     2               0.00               0.01
      library cache: mutex X                    1               0.05               0.05
    Look at Max. Wait and Total Waited columns. Is it possible to safely tune it by changing SDU in sql*net ? and if so, is it needed to change the SDU value on client and server sides ?

    66ff73bb-87bd-4c84-bada-0141fb25344b wrote:
    Hi all,
    This is my first post here. I will try to more less describe the problem i am facing.
    Any help is more than welcome!
    I am facing some performance issues with application. Slow GUI. I run some tests, i tracked the session. what i found in trace file is:
    OVERALL TOTALS FOR ALL NON-RECURSIVE STATEMENTS
    call     count       cpu    elapsed       disk      query    current        rows
    Parse     1734     1.61   1.61             0            0            0              0
    Execute   1734   32.52  32.56           0           26          15             4
    Fetch     1737     14.46  14.51           2        41867        84          2847
    total     5205     48.59   48.69            2        41893        99          2851
    Misses in library cache during parse: 7
    Misses in library cache during execute: 5
    Elapsed times include waiting on following events:
      Event waited on                             Times       Max. Wait     Total Waited
      ----------------------------------------           Waited       ----------            ------------
      SQL*Net message to client            5207           0.00               0.02
      SQL*Net message from client        5206          106.18             339.72
      log file sync                                    3               0.00               0.00
      SQL*Net more data to client            51              0.00               0.00
      SQL*Net more data from client        10              0.00               0.00
      Disk file operations I/O                    1               0.00               0.00
      db file sequential read                     2               0.00               0.01
      library cache: mutex X                    1               0.05               0.05
    Look at Max. Wait and Total Waited columns. Is it possible to safely tune it by changing SDU in sql*net ? and if so, is it needed to change the SDU value on client and server sides ?
    When you start with the wrong question, no matter how good an answer you get, it won't matter very much.
    you do NOT have any problem; just a useless observation.

Maybe you are looking for

  • How to set a query of VO in  Best-Effort Mode

    Hi, I'm using auto refresh property of VO, to refresh the LOV . But i get " java.sql.SQLException: ORA-29983: Unsupported query for Continuous Query Notification" error.. So i want to set the query in best-effort-mode . May i know how to set it. here

  • Why does DVD Studio Pro compress my 3GB video?

    I thought since the original Quicktime movie I made with FCP was under the 4.7(?) capacity of a DVD, that Studio Pro wouldn't compress my 3GB movie. But after import to DVD Studio Pro the whole project only shows up as using 350MB of space. And when

  • Urg: How to compare the no. of records of 2 fields in 2 different tables?

    Hi,    I have two internal tables namely itab_lqua and itab_z9snt. in itab_lqua I have a filed called lgpla. in itab_z9snt I have a field called  srlnr. Now I want to compare the no. of records in itab_lqua-lgpla and itab_z9snt-srlnr. Please provide

  • How to get ipod out of recovery mode without losing media.

    i tryed to update my ipod on another computer and it put it in recovery mode.how do i get it out of recovery mode without losing media.

  • Cannot Publish iCal in 10.5

    I and many, many others can longer publish our iCal calendars with 10.5. Appears there are many on the iCal Discusions that also cannot publish: http://discussions.apple.com/thread.jspa?threadID=1207705&tstart=0 Hopefully Apple can help us fix this.