Oracle defaultNChar=true SLOW on NCHAR/NVARCHAR2

Hi all,
I am using a JDBC Prepared Statement with a bunch of parameters using setString(pos, value). The underlying columns on the tables are all NCHAR and NVARCHAR2. I have set the Oracle JDBC driver's "defaultNChar=true" so that Oracle DB would always treat my parameters as national language characters. The driver file is "ojdbc6.jar".
My problem: My parametrized query is extremely slow with "defaultNChar=true". But as soon as I set "defaultNChar=false" the query is ultra fast (3 seconds).
Query usage looks like that:
String sql = "INSERT INTO MYTABLE_ERROR(MY_NAME,MY_FLAG,MY_VALUE) "
                        + "SELECT ? AS MY_NAME,"
                        + "? AS MY_FLAG,v.MY_VALUE"
                        + " FROM OTHER_TABLE v"
                        + " JOIN ( SELECT * FROM ... iv ... WHERE iv.MY_NAME = ? ) rule1 "
                        + " ON v.\"MY_NAME\"=rule1.\"MY_NAME\" AND v.\"MY_VALUE\"=rule1.\"MY_VALUE\""
                        + " WHERE rule1.\"MY_NAME\" = ? AND v.\"MY_VALUE\" = ?";
            preStatement = conn.prepareStatement (sql);
            int count = 1;
            for (String p : params)
                // SLOW
                //preStatement.setNString (count++, p);
                // SLOW
                //preStatement.setObject (count++, p, Types.NVARCHAR);
                // SLOW
                preStatement.setString (count++, p);
I have been trying to find the root cause of why my prepared statements executed against an "Oracle Database 11g Release 11.2.0.3.0 - 64bit Production" DB are slow with a JDBC driver "Oracle JDBC driver, 11.2.0.3.0". I could not find any clue!
I even got the DB NLS config hoping to find anything, but I am not sure here either:
NLS_LANGUAGE AMERICAN
NLS_TERRITORY AMERICA
NLS_CURRENCY $
NLS_ISO_CURRENCY AMERICA
NLS_NUMERIC_CHARACTERS .,
NLS_CALENDAR GREGORIAN
NLS_DATE_FORMAT DD-MON-RR
NLS_DATE_LANGUAGE AMERICAN
NLS_CHARACTERSET AL32UTF8
NLS_SORT BINARY
NLS_TIME_FORMAT HH.MI.SSXFF AM
NLS_TIMESTAMP_FORMAT DD-MON-RR HH.MI.SSXFF AM
NLS_TIME_TZ_FORMAT HH.MI.SSXFF AM TZR
NLS_TIMESTAMP_TZ_FORMAT DD-MON-RR HH.MI.SSXFF AM TZR
NLS_DUAL_CURRENCY $
NLS_NCHAR_CHARACTERSET AL16UTF16
NLS_COMP BINARY
Please help!
Thanks,
H.

UPDATE: It looks like the query is stuck when using "defaultNChar=true" somehow. I am seeing this when using JConsole:
Total blocked: 1  Total waited: 1
Stack trace:
java.net.SocketInputStream.socketRead0(Native Method)
java.net.SocketInputStream.read(Unknown Source)
java.net.SocketInputStream.read(Unknown Source)
oracle.net.ns.Packet.receive(Packet.java:311)
oracle.net.ns.DataPacket.receive(DataPacket.java:103)
oracle.net.ns.NetInputStream.getNextPacket(NetInputStream.java:312)
oracle.net.ns.NetInputStream.read(NetInputStream.java:257)
oracle.net.ns.NetInputStream.read(NetInputStream.java:182)
oracle.net.ns.NetInputStream.read(NetInputStream.java:99)
oracle.jdbc.driver.T4CSocketInputStreamWrapper.readNextPacket(T4CSocketInputStreamWrapper.java:121)
oracle.jdbc.driver.T4CSocketInputStreamWrapper.read(T4CSocketInputStreamWrapper.java:77)
oracle.jdbc.driver.T4CMAREngine.unmarshalUB1(T4CMAREngine.java:1173)
oracle.jdbc.driver.T4CTTIfun.receive(T4CTTIfun.java:309)
oracle.jdbc.driver.T4CTTIfun.doRPC(T4CTTIfun.java:200)
oracle.jdbc.driver.T4C8Oall.doOALL(T4C8Oall.java:543)
oracle.jdbc.driver.T4CPreparedStatement.doOall8(T4CPreparedStatement.java:238)
oracle.jdbc.driver.T4CPreparedStatement.executeForRows(T4CPreparedStatement.java:1446)
oracle.jdbc.driver.OracleStatement.doExecuteWithTimeout(OracleStatement.java:1757)
oracle.jdbc.driver.OraclePreparedStatement.executeInternal(OraclePreparedStatement.java:4372)
oracle.jdbc.driver.OraclePreparedStatement.executeUpdate(OraclePreparedStatement.java:4539)
   - locked oracle.jdbc.driver.T4CConnection@7f2315e5
oracle.jdbc.driver.OraclePreparedStatementWrapper.executeUpdate(OraclePreparedStatementWrapper.java:5577)
com.mycomp.test.DriverTest.fireStatement(DriverTest.java:253)

Similar Messages

  • NChar/NVarchar2/NClob support

    We are currently using single-byte character representation(WE8ISO8859P1 and WE8MSWIN1252) within the db and are wanting to try and keep it that way, so are looking at using the n* data types for handling strings that contain special characters outside the current character set. The kicker her is that we would also like to be able to Text index the fields within these data types.
    First off, anyone know why these data types are not supported within Oracle Text?
    Secondly, am I way off here in thinking this can be done or do we have no choice but to make the character set within the server be a unicode set?
    Finally, if there is a way to do this, could one point me in the direction of a document explaining how this can be done?
    Thanks a ton for your help,
    Dan

    The choices are (1) use UTF8 as the base character set and don't use
    NCHAR/NVARCHAR/NCLOB or (2) submit patches to PHP OCI8 to add NCLOB
    support or (3) use another language.
    I wouldn't trust NCHAR/NVARCHAR to work consistently in PHP OCI8,
    despite (or because of) there being automatic mapping to non N* types
    in some cases.
    I know you might be using XE 11.2 just for testing. However, if you
    are targeting that edition for production use, the character set is
    AL32UTF8 so there isn't a direct need to use NCHAR/NVARCHAR/NCLOB.
    From Choosing a Character Set:
    "Oracle recommends using SQL CHAR, VARCHAR2, and CLOB data types in [a] AL32UTF8
    database to store Unicode character data. Use of SQL NCHAR,NVARCHAR2, and NCLOB
    should be considered only if you must use a database whose database character set
    is not AL32UTF8."
    Regarding CentOS, I would recommend using Oracle Linux which is free
    to download & install, has free patches etc, has a faster kernel than
    RHEL available, and is the OS we test the DB on.  You can get it from
    http://public-yum.oracle.com/
    If possible target a newer version of PHP.  PHP 5.3 is in security
    fix-only mode, and this will end soon.  I would recommend building
    your own PHP, or using Zend Server (either the free or paid edition).
    For new development, use PHP 5.5.

  • ORACLE DB getting slower until reboot

    Hi,
    I'm running oracle db 10g on Linux. After a while (few days) system becomes slower and slower like 10 x times .... but after reboot of the mashine, becomes
    normal again.
    Can anyone give me any hints where to look for the problem ? There are 12 clients connectiong to the mashine on daily basis through the Win .NET application ... doing basic stuff , reading, writting, deleting ....
    Any hints please ?
    Kris

    Hi,
    Below is my AWR report .... I can look but don't know what to look for ....
    ===========================================================
    WORKLOAD REPOSITORY report for
    DB Name DB Id Instance Inst Num Release Cluster Host
    PRESCLIP 1523704616 presclip 1 10.1.0.3.0 NO tornado
    Snap Id Snap Time Sessions Curs/Sess
    Begin Snap: 4510 17-??? -08 10:00:02 22 5.0
    End Snap: 4513 17-??? -08 13:00:35 24 5.8
    Elapsed: 180.55 (mins)
    DB Time: 183.63 (mins)
    Cache Sizes (end)
    ~~~~~~~~~~~~~~~~~
    Buffer Cache: 448M Std Block Size: 8K
    Shared Pool Size: 528M Log Buffer: 512K
    Load Profile
    ~~~~~~~~~~~~ Per Second Per Transaction
    Redo size: 8,071.06 320,263.85
    Logical reads: 60,721.48 2,409,460.40
    Block changes: 51.10 2,027.58
    Physical reads: 28.61 1,135.10
    Physical writes: 4.68 185.86
    User calls: 56.94 2,259.28
    Parses: 25.76 1,022.00
    Hard parses: 0.81 32.15
    Sorts: 0.87 34.34
    Logons: 0.01 0.54
    Executes: 26.20 1,039.80
    Transactions: 0.03
    % Blocks changed per Read: 0.08 Recursive Call %: 72.15
    Rollback per transaction %: 9.89 Rows per Sort: 113.65
    Instance Efficiency Percentages (Target 100%)
    ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
    Buffer Nowait %: 100.00 Redo NoWait %: 99.99
    Buffer Hit %: 100.05 In-memory Sort %: 100.00
    Library Hit %: 98.08 Soft Parse %: 96.85
    Execute to Parse %: 1.71 Latch Hit %: 99.97
    Parse CPU to Parse Elapsd %: 5.70 % Non-Parse CPU: 98.35
    Shared Pool Statistics Begin End
    Memory Usage %: 90.92 91.52
    % SQL with executions>1: 99.27 87.56
    % Memory for SQL w/exec>1: 98.23 88.97
    Top 5 Timed Events
    ~~~~~~~~~~~~~~~~~~ % Total
    Event Waits Time (s) DB Time Wait Class
    CPU time 3,128 28.39
    latch: cache buffers chains 142,296 1,794 16.28 Concurrency
    latch: library cache 13,804 1,498 13.60 Concurrency
    log file parallel write 97,140 1,254 11.38 System I/O
    log file sync 94,602 1,214 11.02 Commit
    Wait Events DB/Inst: PRESCLIP/presclip Snaps: 4510-4513
    -> 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
    Total Wait wait Waits
    Event Waits Timeouts Time (s) (ms) /txn
    latch: cache buffers chains 142,296 142,296 1,794 13 521.2
    latch: library cache 13,804 0 1,498 109 50.6
    log file parallel write 97,140 0 1,254 13 355.8
    log file sync 94,602 25 1,214 13 346.5
    latch: shared pool 2,220 0 323 146 8.1
    control file parallel write 4,492 0 306 68 16.5
    latch free 2,134 12 107 50 7.8
    SQL*Net break/reset to clie 96,766 0 53 1 354.5
    db file sequential read 214 0 7 31 0.8
    library cache pin 3 1 6 2106 0.0
    log file switch completion 20 0 5 258 0.1
    control file single write 348 0 5 14 1.3
    class slave wait 1 1 5 5000 0.0
    control file sequential rea 2,291 0 4 2 8.4
    log buffer space 19 1 3 183 0.1
    SQL*Net message to client 541,548 0 3 0 1,983.7
    direct path read 309,510 0 2 0 1,133.7
    rdbms ipc reply 97 0 1 14 0.4
    process startup 9 0 1 142 0.0
    LGWR wait for redo copy 171 27 1 4 0.6
    SQL*Net more data from clie 5,767 0 1 0 21.1
    latch: row cache objects 18 0 1 31 0.1
    buffer busy waits 27 0 0 18 0.1
    db file scattered read 18 0 0 22 0.1
    log file single write 24 0 0 15 0.1
    SQL*Net more data to client 10,224 0 0 0 37.5
    latch: cache buffers lru ch 44 0 0 5 0.2
    log file sequential read 24 0 0 2 0.1
    db file parallel write 3,286 0 0 0 12.0
    latch: session allocation 1 0 0 18 0.0
    latch: redo writing 1 0 0 18 0.0
    latch: library cache pin 2 0 0 8 0.0
    latch: redo allocation 9 0 0 1 0.0
    undo segment extension 151 151 0 0 0.6
    direct path write 73 0 0 0 0.3
    SQL*Net message from client 541,546 0 103,106 190 1,983.7
    virtual circuit status 361 361 10,535 29182 1.3
    Queue Monitor Wait 352 352 10,510 29857 1.3
    wakeup time manager 36 0 10,300 286098 0.1
    jobq slave wait 75 74 224 2987 0.3
    Background Wait Events DB/Inst: PRESCLIP/presclip Snaps: 4510-4513
    -> ordered by wait time desc, waits desc (idle events last)
    Avg
    Total Wait wait Waits
    Event Waits Timeouts Time (s) (ms) /txn
    log file parallel write 97,141 0 1,254 13 355.8
    control file parallel write 4,495 0 306 68 16.5
    latch: library cache 459 0 86 186 1.7
    latch: shared pool 49 0 36 736 0.2
    control file single write 349 0 5 14 1.3
    control file sequential rea 2,163 0 4 2 7.9
    rdbms ipc reply 97 0 1 14 0.4
    process startup 9 0 1 142 0.0
    latch: cache buffers chains 39 39 1 20 0.1
    LGWR wait for redo copy 171 27 1 4 0.6
    log file single write 24 0 0 15 0.1
    buffer busy waits 18 0 0 18 0.1
    latch free 3 0 0 48 0.0
    log buffer space 1 0 0 139 0.0
    log file sequential read 24 0 0 2 0.1
    db file parallel write 3,287 0 0 0 12.0
    latch: cache buffers lru ch 4 0 0 5 0.0
    latch: redo writing 1 0 0 18 0.0
    latch: redo allocation 9 0 0 1 0.0
    direct path read 55 0 0 0 0.2
    direct path write 55 0 0 0 0.2
    rdbms ipc message 212,090 29,529 79,375 374 776.9
    Queue Monitor Wait 352 352 10,510 29857 1.3
    wakeup time manager 36 0 10,300 286098 0.1
    smon timer 80 7 10,206 127577 0.3
    Time Model Statistics DB/Inst: PRESCLIP/presclip Snaps: 4510-4513
    -> ordered by Time (seconds) desc
    Time % Total
    Statistic Name (seconds) DB Time
    DB time 11,018.09 100.00
    sql execute elapsed time 8,222.45 74.63
    background elapsed time 3,392.24 30.79
    DB CPU 3,128.31 28.39
    parse time elapsed 1,259.35 11.43
    hard parse elapsed time 684.68 6.21
    sequence load elapsed time 135.62 1.23
    background cpu time 36.63 .33
    hard parse (sharing criteria) elapsed time 34.10 .31
    Java execution elapsed time 32.37 .29
    hard parse (bind mismatch) elapsed time 30.55 .28
    connection management call elapsed time 20.41 .19
    PL/SQL execution elapsed time 8.73 .08
    PL/SQL compilation elapsed time .95 .01
    failed parse elapsed time .01 .00
    failed parse (out of shared memory) elapsed t .00 .00
    inbound PL/SQL rpc elapsed time .00 .00
    Operating System Statistics DB/Inst: PRESCLIP/presclip Snaps: 4510-4513
    Statistic Name Value
    AVG_BUSY_TICKS 180,481
    AVG_IDLE_TICKS 715,162
    AVG_IN_BYTES 0
    AVG_NICE_TICKS 31
    AVG_OUT_BYTES 0
    AVG_SYS_TICKS 17,431
    AVG_USER_TICKS 163,018
    BUSY_TICKS 360,961
    IDLE_TICKS 1,430,323
    IN_BYTES 0
    NICE_TICKS 63
    OUT_BYTES 0
    RSRC_MGR_CPU_WAIT_TIME 0
    SYS_TICKS 34,862
    USER_TICKS 326,036
    Service Statistics DB/Inst: PRESCLIP/presclip Snaps: 4510-4513
    -> ordered by DB Time
    Physical Logical
    Service Name DB Time (s) DB CPU (s) Reads Reads
    SYS$USERS 11,018.2 3,128.3 309,775 ##########
    SYS$BACKGROUND 0.0 0.0 108 90,504
    presclip.pressclip.si 0.0 0.0 0 0
    presclipXDB 0.0 0.0 0 0
    Service Wait Class Stats DB/Inst: PRESCLIP/presclip Snaps: 4510-4513
    -> Wait Class info for services in the Service Statistics section.
    -> Total Waits and Time Waited displayed for the following wait
    classes: User I/O, Concurrency, Administrative, Network
    -> Time Waited (Wt Time) in centisecond (100th of a second)
    Service Name
    User I/O User I/O Concurcy Concurcy Admin Admin Network Network
    Total Wts Wt Time Total Wts Wt Time Total Wts Wt Time Total Wts Wt Time
    SYS$USERS
    ######### 722 155001 315449 0 0 559051 367
    SYS$BACKGROUND
    614421 169 1120 14235 0 0 3 0
    SQL ordered by Elapsed Time DB/Inst: PRESCLIP/presclip Snaps: 4510-4513
    -> Resources reported for PL/SQL code includes the resources used by all SQL
    statements called by the code.
    -> % Total DB Time is the Elapsed Time of the SQL statement divided
    into the Total Database Time multiplied by 100
    Elapsed CPU Elap per % Total
    Time (s) Time (s) Executions Exec (s) DB Time SQL Id
    324 34 48,347 0.0 2.9 8vjk5pma3nkjm
    Module: ReportQueueService.exe
    SELECT "MS_REPORTQUEUE_DISPATCH_SEQ".NEXTVAL FROM DUAL
    134 2 7 19.1 1.2 6mfnp8h90f9gm
    Module: php-cgi.exe
    SELECT count(*) "X" FROM MS_ARTICLE A , MS_MEDIA M, MS_ARTICLE_SHOW S, MS_ARTICL
    E_GENRE G, MS_ARTICLE_AUTHOR AA ,(SELECT DISTINCT RA.ID_ARTICLE FROM MS_REPORT_A
    RTICLE RA, MS_REPORT R,(SELECT MAX(ID) "ID",ID_SUBCLIPPING from MS_REPORT WHERE
    ( ID_SUBCLIPPING='ABANKA' OR ID_SUBCLIPPING='ARGOLINA' OR ID_SUBCLIPPING='ELEK
    86 15 48,374 0.0 0.8 4m7m0t6fjcs5x
    update seq$ set increment$=:2,minvalue=:3,maxvalue=:4,cycle#=:5,order$=:6,cache=
    :7,highwater=:8,audit$=:9,flags=:10 where obj#=:1
    71 1 1 70.5 0.6 gkxar2vy1wy2y
    Module: Reporter.exe
    SELECT TITLE,SUBTITLE,AUTHOR,ART_DATE,MEDIA_CODE,FULLTEXT,ID,STARTTIME,ON_PAGE,C
    OORDINATES,COOR_TEXT,THUMBS_NR FROM MS_ARTICLE WHERE (ART_DATE > TO_DATE(:param1
    ,'dd.MM.yyyy') AND (MEDIA_COUNTRY = :param2 AND ((MEDIA_GROUP = :param3
    OR MEDIA_GROUP = :param4 OR MEDIA_GROUP = :param5 OR MEDIA_CODE = :p
    67 9 48,344 0.0 0.6 2skwhauh2cwky
    select o.name, u.name from obj$ o, user$ u where o.obj# = :1 and o.owner# = u.u
    ser#
    57 12 1 56.5 0.5 dfksmtvu1m42z
    Module: Reporter.exe
    SELECT TITLE,SUBTITLE,AUTHOR,ART_DATE,MEDIA_CODE,FULLTEXT,ID,STARTTIME,ON_PAGE,C
    OORDINATES,COOR_TEXT,THUMBS_NR FROM MS_ARTICLE WHERE (ART_DATE > TO_DATE(:param1
    ,'dd.MM.yyyy') AND MEDIA_COUNTRY = :param2 AND ( ( INSTR(CHAR_15, :param
    3,1,1)>0 AND INSTR(CHAR_8, :param4,1,1)>0 ) OR ( INSTR(CHAR_14, :param5,1
    54 0 2,163 0.0 0.5 803b7z0t84sq7
    select job, nvl2(last_date, 1, 0) from sys.job$ where (((:1 <= next_date) and (n
    ext_date < :2)) or ((last_date is null) and (next_date < :3))) and (field1 =
    :4 or (field1 = 0 and 'Y' = :5)) and (this_date is null) order by next_date, jo
    b
    52 0 1 51.6 0.5 0466bt39shky3
    Module: php-cgi.exe
    SELECT M.DESCRIPTION "NAME", O.X FROM MS_MEDIA_TYPE M,(SELECT A.MEDIA_TYPE, COUN
    T(A.ID) "X" FROM MS_ARTICLE A,(SELECT DISTINCT RA.ID_ARTICLE FROM MS_REPORT_ARTI
    CLE RA, MS_REPORT R,(SELECT ID,ID_SUBCLIPPING from MS_REPORT R WHERE ( ID_SUBCLI
    PPING='PETROL' ) ) O WHERE ( R.ID_SUBCLIPPING='PETROL' ) AND R.ID = RA.ID_REPO
    51 1 2 25.5 0.5 7capkpyw2kpwm
    Module: php-cgi.exe
    SELECT M.NAME, O.X FROM MS_MEDIA M,(SELECT A.MEDIA_CODE, COUNT(A.ID) "X" FROM MS
    ARTICLE A,(SELECT DISTINCT RA.IDARTICLE FROM MS_REPORT_ARTICLE RA, MS_REPORT R
    ,(SELECT ID,ID_SUBCLIPPING from MS_REPORT R WHERE ( ID_SUBCLIPPING='PETROL' ) )
    O WHERE ( R.ID_SUBCLIPPING='PETROL' ) AND R.ID = RA.ID_REPORT AND (O.ID =R.ID
    39 0 3 12.9 0.3 00pmrvsjpawc8
    DECLARE job BINARY_INTEGER := :job; next_date DATE := :mydate; broken BOOLEAN :
    = FALSE; BEGIN wksys.wk_job.invoke(1,1); :mydate := next_date; IF broken THEN :b
    := 1; ELSE :b := 0; END IF; END;
    SQL ordered by CPU Time DB/Inst: PRESCLIP/presclip Snaps: 4510-4513
    -> Resources reported for PL/SQL code includes the resources used by all SQL
    statements called by the code.
    -> % Total DB Time is the Elapsed Time of the SQL statement divided
    into the Total Database Time multiplied by 100
    CPU Elapsed CPU per % Total
    Time (s) Time (s) Executions Exec (s) DB Time SQL Id
    34 324 48,347 0.00 2.9 8vjk5pma3nkjm
    Module: ReportQueueService.exe
    SELECT "MS_REPORTQUEUE_DISPATCH_SEQ".NEXTVAL FROM DUAL
    15 86 48,374 0.00 0.8 4m7m0t6fjcs5x
    update seq$ set increment$=:2,minvalue=:3,maxvalue=:4,cycle#=:5,order$=:6,cache=
    :7,highwater=:8,audit$=:9,flags=:10 where obj#=:1
    14 15 48,344 0.00 0.1 7gtztzv329wg0
    select c.name, u.name from con$ c, cdef$ cd, user$ u where c.con# = cd.con# and
    cd.enabled = :1 and c.owner# = u.user#
    12 57 1 11.99 0.5 dfksmtvu1m42z
    Module: Reporter.exe
    SELECT TITLE,SUBTITLE,AUTHOR,ART_DATE,MEDIA_CODE,FULLTEXT,ID,STARTTIME,ON_PAGE,C
    OORDINATES,COOR_TEXT,THUMBS_NR FROM MS_ARTICLE WHERE (ART_DATE > TO_DATE(:param1
    ,'dd.MM.yyyy') AND MEDIA_COUNTRY = :param2 AND ( ( INSTR(CHAR_15, :param
    3,1,1)>0 AND INSTR(CHAR_8, :param4,1,1)>0 ) OR ( INSTR(CHAR_14, :param5,1
    9 67 48,344 0.00 0.6 2skwhauh2cwky
    select o.name, u.name from obj$ o, user$ u where o.obj# = :1 and o.owner# = u.u
    ser#
    6 24 257 0.02 0.2 221wsaadu72tx
    Module: Reporter.exe
    SELECT SC.NAME,ID_SUBCLIPPING,QUEUE_TIME,DISPATCH_TIME,REPORT_MODE,REPORT_DATA,R
    D.DESCRIPTION, ROWNR,QUEUE_DATE,STATUS,DAYS,DATE_FROM,DATE_TO,ID,TEMPLATE,TEMPLA
    TE_EMAIL,ARTICLE_PER_REPORT,DISPATCH_TOTAL,DISPATCH_SEND,DISPATCH_ERROR,RD.AUTOF
    ILTER,SC.OWNER,SC.PAYER FROM MS_REPORTQUEUE_DISPATCH RD, MS_SUBCLIPPING SC, (SEL
    4 7 233 0.02 0.1 3bymg61j293n0
    Module: ControlCenter.exe
    SELECT SC.NAME,ID_SUBCLIPPING,QUEUE_TIME,DISPATCH_TIME,REPORT_MODE,REPORT_DATA,R
    D.DESCRIPTION, ROWNR,QUEUE_DATE,STATUS,DAYS,DATE_FROM,DATE_TO,ID,RD.TEMPLATE,RD.
    TEMPLATE_EMAIL,RD.ARTICLE_PER_REPORT,DISPATCH_TOTAL,DISPATCH_SEND,DISPATCH_ERROR
    ,RD.AUTOFILTER FROM MS_REPORTQUEUE_DISPATCH RD, MS_SUBCLIPPING SC WHERE ID_SUBCL
    3 9 15 0.18 0.1 fvswq0pbaxu7w
    Module: Reporter.exe
    SELECT AA.DESCRIPTION FROM MS_ARTICLE A,MS_ARTICLE_AUTHOR AA WHERE ID=16800 AND
    A.AUTHOR_CODE3 = AA.CODE
    3 9 15 0.18 0.1 3hn8hkmtcywnd
    Module: Reporter.exe
    SELECT AA.DESCRIPTION FROM MS_ARTICLE A,MS_ARTICLE_AUTHOR AA WHERE ID=16800 AND
    A.AUTHOR_CODE2 = AA.CODE
    3 8 15 0.17 0.1 1twph8wy3cajf
    Module: Reporter.exe
    SELECT AA.DESCRIPTION FROM MS_ARTICLE A, MS_ARTICLE_CATEGORY AA WHERE ID=16800 A
    ND A.CATEGORY = AA.CODE
    2 134 7 0.33 1.2 6mfnp8h90f9gm
    Module: php-cgi.exe
    SELECT count(*) "X" FROM MS_ARTICLE A , MS_MEDIA M, MS_ARTICLE_SHOW S, MS_ARTICL
    E_GENRE G, MS_ARTICLE_AUTHOR AA ,(SELECT DISTINCT RA.ID_ARTICLE FROM MS_REPORT_A
    RTICLE RA, MS_REPORT R,(SELECT MAX(ID) "ID",ID_SUBCLIPPING from MS_REPORT WHERE
    ( ID_SUBCLIPPING='ABANKA' OR ID_SUBCLIPPING='ARGOLINA' OR ID_SUBCLIPPING='ELEK
    SQL ordered by Gets DB/Inst: PRESCLIP/presclip Snaps: 4510-4513
    -> Resources reported for PL/SQL code includes the resources used by all SQL
    statements called by the code.
    -> Total Buffer Gets: 657,782,688
    -> Captured SQL accounts for 3.2% of Total Buffer Gets
    Gets CPU Elapsed
    Buffer Gets Executions per Exec %Total Time (s) Time (s) SQL Id
    592,740 15 39,516.0 0.1 2.57 8.24 1twph8wy3cajf
    Module: Reporter.exe
    SELECT AA.DESCRIPTION FROM MS_ARTICLE A, MS_ARTICLE_CATEGORY AA WHERE ID=16800 A
    ND A.CATEGORY = AA.CODE
    592,710 15 39,514.0 0.1 2.64 8.59 fvswq0pbaxu7w
    Module: Reporter.exe
    SELECT AA.DESCRIPTION FROM MS_ARTICLE A,MS_ARTICLE_AUTHOR AA WHERE ID=16800 AND
    A.AUTHOR_CODE3 = AA.CODE
    592,710 15 39,514.0 0.1 2.63 8.88 3hn8hkmtcywnd
    Module: Reporter.exe
    SELECT AA.DESCRIPTION FROM MS_ARTICLE A,MS_ARTICLE_AUTHOR AA WHERE ID=16800 AND
    A.AUTHOR_CODE2 = AA.CODE
    474,192 12 39,516.0 0.1 1.32 1.49 cpvuvvd0kf6rf
    Module: Reporter.exe
    SELECT AA.DESCRIPTION FROM MS_ARTICLE A, MS_ARTICLE_CATEGORY AA WHERE ID=16424 A
    ND A.CATEGORY = AA.CODE
    474,192 12 39,516.0 0.1 1.36 1.80 2qn8hm2p6xrzf
    Module: Reporter.vshost.exe
    SELECT AA.DESCRIPTION FROM MS_ARTICLE A, MS_ARTICLE_CATEGORY AA WHERE ID=12585 A
    ND A.CATEGORY = AA.CODE
    474,192 12 39,516.0 0.1 2.30 7.06 7vng73t6dkp9a
    Module: Reporter.exe
    SELECT AA.DESCRIPTION FROM MS_ARTICLE A, MS_ARTICLE_CATEGORY AA WHERE ID=17112 A
    ND A.CATEGORY = AA.CODE
    474,168 12 39,514.0 0.1 1.33 1.42 1t38kgwh9u4wk
    Module: Reporter.exe
    SELECT AA.DESCRIPTION FROM MS_ARTICLE A,MS_ARTICLE_AUTHOR AA WHERE ID=16424 AND
    A.AUTHOR_CODE3 = AA.CODE
    474,168 12 39,514.0 0.1 2.33 6.79 1x7k691cdnrwc
    Module: Reporter.exe
    SELECT AA.DESCRIPTION FROM MS_ARTICLE A,MS_ARTICLE_AUTHOR AA WHERE ID=17112 AND
    A.AUTHOR_CODE2 = AA.CODE
    474,168 12 39,514.0 0.1 1.40 1.66 3bzy3n6ptkaqj
    Module: Reporter.vshost.exe
    SELECT AA.DESCRIPTION FROM MS_ARTICLE A,MS_ARTICLE_AUTHOR AA WHERE ID=12585 AND
    A.AUTHOR_CODE2 = AA.CODE
    474,168 12 39,514.0 0.1 2.32 7.02 8b8du3dad2c8x
    Module: Reporter.exe
    SELECT AA.DESCRIPTION FROM MS_ARTICLE A,MS_ARTICLE_AUTHOR AA WHERE ID=17112 AND
    A.AUTHOR_CODE3 = AA.CODE
    SQL ordered by Reads DB/Inst: PRESCLIP/presclip Snaps: 4510-4513
    -> Total Disk Reads: 309,883
    -> Captured SQL accounts for 0.0% of Total Disk Reads
    Reads CPU Elapsed
    Physical Reads Executions per Exec %Total Time (s) Time (s) SQL Id
    34 7 4.9 0.0 2.33 133.83 6mfnp8h90f9gm
    Module: php-cgi.exe
    SELECT count(*) "X" FROM MS_ARTICLE A , MS_MEDIA M, MS_ARTICLE_SHOW S, MS_ARTICL
    E_GENRE G, MS_ARTICLE_AUTHOR AA ,(SELECT DISTINCT RA.ID_ARTICLE FROM MS_REPORT_A
    RTICLE RA, MS_REPORT R,(SELECT MAX(ID) "ID",ID_SUBCLIPPING from MS_REPORT WHERE
    ( ID_SUBCLIPPING='ABANKA' OR ID_SUBCLIPPING='ARGOLINA' OR ID_SUBCLIPPING='ELEK
    12 3 4.0 0.0 0.04 1.34 cx6p7nrvbnb9u
    SELECT count(*) over () as total_count, endsn.event_id, nvl(xe.keh_id, 0)
    , nvl(ash.cnt, 0), evtname.event_name, nvl(xc.class#, 0), e
    vtname.wait_class_id, nvl(xc.keh_id, 0), (endsn.total_waits - nvl(startsn
    .total_waits, 0)) as total_waits_diff, (endsn.total_timeouts - nvl
    9 6 1.5 0.0 0.12 6.16 3c8vn62zcwxd9
    INSERT INTO wrh$_sqltext (sql_id, dbid, sql_text,
    command_type, snap_id, ref_count) SELECT /*+ ordered use_nl(s1
    ) index(s1) */ sie.sqlid_kewrsie, :dbid, s1.sql_fulltext,
    s1.command_type, :lah_snap_id, 0 ref_count FROM x$kewrsqlidtab sie, v$sql
    5 9 0.6 0.0 0.11 9.95 60d4pz6szvf0v
    Module: TOAD 9.0.1.8
    Select cols.column_id, cols.column_name as Name, nullable,
    data_type as Type,
    decode(data_type, 'CHAR', char_length,
    'VARCHAR', char_length
    'VARCHAR2', char_length,
    'NCHAR', char_l
    ength,
    'NVARCHAR', char_length,
    'NVARCHAR2
    3 1 3.0 0.0 0.23 0.81 f1ycdhwd4mq59
    Module: php-cgi.exe
    SELECT M.DESCRIPTION "NAME", O.X FROM MS_MEDIA_TYPE M,(SELECT A.MEDIA_TYPE, COUN
    T(A.ID) "X" FROM MS_ARTICLE A,(SELECT DISTINCT RA.ID_ARTICLE FROM MS_REPORT_ARTI
    CLE RA, MS_REPORT R,(SELECT ID,ID_SUBCLIPPING from MS_REPORT R WHERE ( ID_SUBCLI
    PPING='KONKURENCAABANKA' ) ) O WHERE ( R.ID_SUBCLIPPING='KONKURENCAABANKA' ) A
    3 1 3.0 0.0 0.59 2.34 1uyb85bntztw5
    Module: Reporter.exe
    SELECT TITLE,SUBTITLE,AUTHOR,ART_DATE,MEDIA_CODE,FULLTEXT,ID,STARTTIME,ON_PAGE,C
    OORDINATES,COOR_TEXT,THUMBS_NR FROM MS_ARTICLE WHERE (ART_DATE > TO_DATE(:param1
    ,'dd.MM.yyyy') AND MEDIA_COUNTRY = :param2 AND ( INSTR(CHAR_1, :param3,1,
    1)>0 OR INSTR(CHAR_10, :param4,1,1)>0 OR INSTR(CHAR_10, :param5,1,1)>0
    3 1 3.0 0.0 0.15 0.39 2hyd2cx2k89ms
    Module: php-cgi.exe
    SELECT M.DESCRIPTION "NAME", O.X FROM MS_ARTICLE_AUTHOR M,(SELECT A.AUTHOR_CODE,
    COUNT(A.ID) "X" FROM MS_ARTICLE A,(SELECT DISTINCT RA.ID_ARTICLE FROM MS_REPORT
    ARTICLE RA, MSREPORT R,(SELECT ID,ID_SUBCLIPPING from MS_REPORT R WHERE ( ID_S
    UBCLIPPING='KONKURENCAABANKA' ) ) O WHERE ( R.ID_SUBCLIPPING='KONKURENCAABANKA
    3 7 0.4 0.0 1.09 2.89 2r6xk5h5qvwct
    Module: php-cgi.exe
    SELECT * FROM ( SELECT C.*,rownum rnum from (SELECT TO_CHAR(ART_DATE,'DD.MM.YY
    YY') "DATUM", M.NAME "MEDIA_CODE", S.DESCRIPTION "SHOW", G.DESCRIPTION "GENRE",
    DURATION,TOTAL_UNITS, TITLE, SUMMARY, AA.DESCRIPTION "AUTHOR_CODE",ID FROM MS
    ARTICLE A , MSMEDIA M, MS_ARTICLE_SHOW S, MS_ARTICLE_GENRE G, MS_ARTICLE_AUTHO
    3 1 3.0 0.0 0.16 1.54 4mntfva3ftsv3
    Module: php-cgi.exe
    SELECT M.NAME, O.X FROM MS_MEDIA M,(SELECT A.MEDIA_CODE, COUNT(A.ID) "X" FROM MS
    ARTICLE A,(SELECT DISTINCT RA.IDARTICLE FROM MS_REPORT_ARTICLE RA, MS_REPORT R
    ,(SELECT ID,ID_SUBCLIPPING from MS_REPORT R WHERE ( ID_SUBCLIPPING='KONKURENCAAB
    ANKA' ) ) O WHERE ( R.ID_SUBCLIPPING='KONKURENCAABANKA' ) AND R.ID = RA.ID_REP
    SQL ordered by Reads DB/Inst: PRESCLIP/presclip Snaps: 4510-4513
    -> Total Disk Reads: 309,883
    -> Captured SQL accounts for 0.0% of Total Disk Reads
    Reads CPU Elapsed
    Physical Reads Executions per Exec %Total Time (s) Time (s) SQL Id
    3 15 0.2 0.0 0.01 0.34 70th7d08hqjf7
    SELECT B.TYPE FROM SYS.WRI$_ADV_TASKS A, SYS.WRI$_ADV_DEFINITIONS B WHERE A.ADVI
    SOR_ID = B.ID AND A.ID = :B1
    SQL ordered by Executions DB/Inst: PRESCLIP/presclip Snaps: 4510-4513
    -> Total Executions: 283,866
    -> Captured SQL accounts for 72.7% of Total Executions
    CPU per Elap per
    Executions Rows Processed Rows per Exec Exec (s) Exec (s) SQL Id
    48,374 48,374 1.0 0.00 0.00 4m7m0t6fjcs5x
    update seq$ set increment$=:2,minvalue=:3,maxvalue=:4,cycle#=:5,order$=:6,cache=
    :7,highwater=:8,audit$=:9,flags=:10 where obj#=:1
    48,347 48,347 1.0 0.00 0.01 8vjk5pma3nkjm
    Module: ReportQueueService.exe
    SELECT "MS_REPORTQUEUE_DISPATCH_SEQ".NEXTVAL FROM DUAL
    48,344 48,344 1.0 0.00 0.00 2skwhauh2cwky
    select o.name, u.name from obj$ o, user$ u where o.obj# = :1 and o.owner# = u.u
    ser#
    48,344 0 0.0 0.00 0.00 7gtztzv329wg0
    select c.name, u.name from con$ c, cdef$ cd, user$ u where c.con# = cd.con# and
    cd.enabled = :1 and c.owner# = u.user#
    2,163 3 0.0 0.00 0.03 803b7z0t84sq7
    select job, nvl2(last_date, 1, 0) from sys.job$ where (((:1 <= next_date) and (n
    ext_date < :2)) or ((last_date is null) and (next_date < :3))) and (field1 =
    :4 or (field1 = 0 and 'Y' = :5)) and (this_date is null) order by next_date, jo
    b
    2,160 2,160 1.0 0.00 0.01 g2wr3u7s1gtf3
    select count(*) from sys.job$ where (next_date > sysdate) and (next_date < (sysd
    ate+5/86400))
    1,738 1,738 1.0 0.00 0.00 f3w0gf816s7mj
    Module: php-cgi.exe
    SELECT CHAR_1 ,CHAR_2 ,CHAR_3 ,CHAR_4 ,CHAR_5 ,CHAR_6 ,CHAR_7 ,CHAR_8 ,CHAR_9 ,C
    HAR_10,CHAR_11,CHAR_12,CHAR_13,CHAR_14,CHAR_15,CHAR_16,CHAR_17,CHAR_18,CHAR_19,C
    HAR_20,CHAR_21,CHAR_22,CHAR_23,CHAR_24,CHAR_25,CHAR_26,CHAR_27,CHAR_28,CHAR_29,C
    HAR_30,CHAR_31,CHAR_32,CHAR_33,CHAR_34,CHAR_35,CHAR_36,CHAR_37,CHAR_38,CHAR_39,C
    765 4,029 5.3 0.00 0.00 0h6b2sajwb74n
    select privilege#,level from sysauth$ connect by grantee#=prior privilege# and p
    rivilege#>0 start with grantee#=:1 and privilege#>0
    450 450 1.0 0.00 0.00 3arp7ypsf7gru
    Module: Reporter.exe
    SELECT TYPE,PUBLISH_TYPE,NAME FROM MS_MEDIA WHERE CODE='VECER'
    438 435 1.0 0.00 0.00 3c1kubcdjnppq
    update sys.col_usage$ set equality_preds = equality_preds + decode(bitan
    d(:flag,1),0,0,1), equijoin_preds = equijoin_preds + decode(bitand(:flag
    ,2),0,0,1), nonequijoin_preds = nonequijoin_preds + decode(bitand(:flag,4),0,0
    ,1), range_preds = range_preds + decode(bitand(:flag,8),0,0,1),
    SQL ordered by Parse Calls DB/Inst: PRESCLIP/presclip Snaps: 4510-4513
    -> Total Parse Calls: 279,007
    -> Captured SQL accounts for 72.4% of Total Parse Calls
    % Total
    Parse Calls Executions Parses SQL Id
    48,374 48,374 17.34 4m7m0t6fjcs5x
    update seq$ set increment$=:2,minvalue=:3,maxvalue=:4,cycle#=:5,order$=:6,cache=
    :7,highwater=:8,audit$=:9,flags=:10 where obj#=:1
    48,347 48,347 17.33 8vjk5pma3nkjm
    Module: ReportQueueService.exe
    SELECT "MS_REPORTQUEUE_DISPATCH_SEQ".NEXTVAL FROM DUAL
    48,344 48,344 17.33 2skwhauh2cwky
    select o.name, u.name from obj$ o, user$ u where o.obj# = :1 and o.owner# = u.u
    ser#
    48,344 48,344 17.33 7gtztzv329wg0
    select c.name, u.name from con$ c, cdef$ cd, user$ u where c.con# = cd.con# and
    cd.enabled = :1 and c.owner# = u.user#
    1,738 1,738 0.62 f3w0gf816s7mj
    Module: php-cgi.exe
    SELECT CHAR_1 ,CHAR_2 ,CHAR_3 ,CHAR_4 ,CHAR_5 ,CHAR_6 ,CHAR_7 ,CHAR_8 ,CHAR_9 ,C
    HAR_10,CHAR_11,CHAR_12,CHAR_13,CHAR_14,CHAR_15,CHAR_16,CHAR_17,CHAR_18,CHAR_19,C
    HAR_20,CHAR_21,CHAR_22,CHAR_23,CHAR_24,CHAR_25,CHAR_26,CHAR_27,CHAR_28,CHAR_29,C
    HAR_30,CHAR_31,CHAR_32,CHAR_33,CHAR_34,CHAR_35,CHAR_36,CHAR_37,CHAR_38,CHAR_39,C
    765 765 0.27 0h6b2sajwb74n
    select privilege#,level from sysauth$ connect by grantee#=prior privilege# and p
    rivilege#>0 start with grantee#=:1 and privilege#>0
    450 450 0.16 3arp7ypsf7gru
    Module: Reporter.exe
    SELECT TYPE,PUBLISH_TYPE,NAME FROM MS_MEDIA WHERE CODE='VECER'
    303 303 0.11 g00cj285jmgsw
    update sys.mon_mods$ set inserts = inserts + :ins, updates = updates + :upd, del
    etes = deletes + :del, flags = (decode(bitand(flags, :flag), :flag, flags, flags
    + :flag)), drop_segments = drop_segments + :dropseg, timestamp = :time where ob
    j# = :objn
    303 303 0.11 350f5yrnnmshs
    lock table sys.mon_mods$ in exclusive mode nowait
    263 263 0.09 7k11t6vfbad3z
    Module: Reporter.exe
    SELECT TYPE,PUBLISH_TYPE,NAME FROM MS_MEDIA WHERE CODE='FINANCE'
    SQL ordered by Sharable Memory DB/Inst: PRESCLIP/presclip Snaps: 4510-4513
    No data exists for this section of the report.
    SQL ordered by Version Count DB/Inst: PRESCLIP/presclip Snaps: 4510-4513
    No data exists for this section of the report.
    Instance Activity Stats DB/Inst: PRESCLIP/presclip Snaps: 4510-4513
    Statistic Total per Second per Trans
    active txn count during cleanout 314 0.0 1.2
    application wait time 5,338 0.5 19.6
    background checkpoints completed 11 0.0 0.0
    background checkpoints started 12 0.0 0.0
    background timeouts 30,043 2.8 110.1
    branch node splits 0 0.0 0.0
    buffer is not pinned count 113,729,539 10,498.6 416,591.7
    buffer is pinned count 233,007 21.5 853.5
    bytes received via SQL*Net from 126,352,561 11,663.9 462,829.9
    bytes sent via SQL*Net to client 331,740,626 30,623.8 1,215,167.1
    Cached Commit SCN referenced 57 0.0 0.2
    calls to get snapshot scn: kcmgs 8,354,353 771.2 30,602.0
    calls to kcmgas 110,109 10.2 403.3
    calls to kcmgcs 606 0.1 2.2
    change write time 1,203 0.1 4.4
    cleanout - number of ktugct call 324 0.0 1.2
    cleanouts and rollbacks - consis 25 0.0 0.1
    cleanouts only - consistent read 4 0.0 0.0
    cluster key scan block gets 62,128 5.7 227.6
    cluster key scans 49,051 4.5 179.7
    commit cleanout failures: buffer 0 0.0 0.0
    commit cleanout failures: callba 3 0.0 0.0
    commit cleanout failures: cannot 0 0.0 0.0
    commit cleanouts 51,067 4.7 187.1
    commit cleanouts successfully co 51,064 4.7 187.1
    Commit SCN cached 2 0.0 0.0
    commit txn count during cleanout 97 0.0 0.4
    concurrency wait time 329,626 30.4 1,207.4
    consistent changes 109 0.0 0.4
    consistent gets 656,978,539 60,647.3 2,406,514.8
    consistent gets - examination 712,859 65.8 2,611.2
    consistent gets direct 309,561 28.6 1,133.9
    consistent gets from cache 656,668,978 60,618.7 2,405,380.9
    CPU used by this session 316,638 29.2 1,159.9
    CPU used when call started 316,638 29.2 1,159.9
    CR blocks created 111 0.0 0.4
    cursor authentications 6,546 0.6 24.0
    data blocks consistent reads - u 108 0.0 0.4
    db block changes 553,529 51.1 2,027.6
    db block gets 804,149 74.2 2,945.6
    db block gets direct 38 0.0 0.1
    db block gets from cache 804,111 74.2 2,945.5
    DB time 1,147,447 105.9 4,203.1
    DBWR checkpoint buffers written 50,646 4.7 185.5
    DBWR checkpoints 12 0.0 0.0
    DBWR object drop buffers written 0 0.0 0.0
    DBWR revisited being-written buf 0 0.0 0.0
    DBWR thread checkpoint buffers w 0 0.0 0.0
    DBWR transaction table writes 91 0.0 0.3
    DBWR undo block writes 48,633 4.5 178.1
    deferred (CURRENT) block cleanou 49,868 4.6 182.7
    dirty buffers inspected 0 0.0 0.0
    enqueue conversions 2,200 0.2 8.1
    enqueue releases 290,145 26.8 1,062.8
    enqueue requests 290,145 26.8 1,062.8
    enqueue timeouts 0 0.0 0.0
    enqueue waits 0 0.0 0.0
    execute count 283,866 26.2 1,039.8
    frame signature mismatch 0 0.0 0.0
    free buffer inspected 661 0.1 2.4
    Instance Activity Stats DB/Inst: PRESCLIP/presclip Snaps: 4510-4513
    Statistic Total per Second per Trans
    free buffer requested 14,055 1.3 51.5
    heap block compress 904 0.1 3.3
    hot buffers moved to head of LRU 1,387 0.1 5.1
    immediate (CR) block cleanout ap 29 0.0 0.1
    immediate (CURRENT) block cleano 518 0.1 1.9
    IMU bind flushes 0 0.0 0.0
    IMU commits 0 0.0 0.0
    IMU contention 0 0.0 0.0
    IMU CR rollbacks 0 0.0 0.0
    IMU- failed to get a private str 48,866 4.5 179.0
    IMU Flushes 0 0.0 0.0
    IMU ktichg flush 0 0.0 0.0
    IMU pool not allocated 48,866 4.5 179.0
    IMU recursive-transaction flush 0 0.0 0.0
    IMU Redo allocation size 0 0.0 0.0
    IMU undo allocation size 0 0.0 0.0
    index fast full scans (full) 901 0.1 3.3
    index fetch by key 264,686 24.4 969.6
    index scans kdiixs1 250,500 23.1 917.6
    leaf node splits 90 0.0 0.3
    leaf node 90-10 splits 39 0.0 0.1
    logons cumulative 147 0.0 0.5
    messages received 100,083 9.2 366.6
    messages sent 100,083 9.2 366.6
    Misses for writing mapping 1 0.0 0.0
    no buffer to keep pinned count 0 0.0 0.0
    no work - consistent read gets 655,358,632 60,497.7 2,400,581.1
    opened cursors cumulative 230,635 21.3 844.8
    parse count (failures) 7 0.0 0.0
    parse count (hard) 8,776 0.8 32.2
    parse count (total) 279,007 25.8 1,022.0
    parse time cpu 5,167 0.5 18.9
    parse time elapsed 90,687 8.4 332.2
    physical read IO requests 309,720 28.6 1,134.5
    physical reads 309,883 28.6 1,135.1
    physical reads cache 274 0.0 1.0
    physical reads cache prefetch 64 0.0 0.2
    physical reads direct 309,609 28.6 1,134.1
    physical reads direct (lob) 309,554 28.6 1,133.9
    physical reads direct temporary 0 0.0 0.0
    physical reads prefetch warmup 0 0.0 0.0
    physical write IO requests 4,647 0.4 17.0
    physical writes 50,739 4.7 185.9
    physical writes direct 93 0.0 0.3
    physical writes direct (lob) 13 0.0 0.1
    physical writes direct temporary 0 0.0 0.0
    physical writes from cache 50,646 4.7 185.5
    physical writes non checkpoint 13,534 1.3 49.6
    pinned buffers inspected 0 0.0 0.0
    prefetch clients - default 0 0.0 0.0
    prefetch warmup blocks aged out 0 0.0 0.0
    prefetch warmup blocks flushed o 0 0.0 0.0
    prefetched blocks aged out befor 0 0.0 0.0
    process last non-idle time 165,677,888,421 15,294,119.1 #############
    PX local messages recv'd 0 0.0 0.0
    PX local messages sent 0 0.0 0.0
    recovery blocks read 0 0.0 0.0
    recursive calls 1,597,661 147.5 5,852.2
    recursive cpu usage 11,184 1.0 41.0
    redo blocks written 221,040 20.4 809.7
    Instance Activity Stats DB/Inst: PRESCLIP/presclip Snaps: 4510-4513
    Statistic Total per Second per Trans
    redo buffer allocation retries 33 0.0 0.1
    redo entries 280,995 25.9 1,029.3
    redo log space requests 21 0.0 0.1
    redo log space wait time 529 0.1 1.9
    redo ordering marks 12,324 1.1 45.1
    redo size 87,432,032 8,071.1 320,263.9
    redo synch time 123,911 11.4 453.9
    redo synch writes 96,422 8.9 353.2
    redo wastage 22,205,548 2,049.9 81,339.0
    redo write time 127,993 11.8 468.8
    redo writer latching time 81 0.0 0.3
    redo writes 97,141 9.0 355.8
    rollback changes - undo records 48,377 4.5 177.2
    rollbacks only - consistent read 80 0.0 0.3
    rows fetched via callback 122,917 11.4 450.3
    session connect time 165,677,888,421 15,294,119.1 #############
    session logical reads 657,782,688 60,721.5 2,409,460.4
    session pga memory max 9,254,040 854.3 33,897.6
    session uga memory 3,911,344 361.1 14,327.3
    session uga memory max 188,025,700 17,357.1 688,738.8
    shared hash latch upgrades - no 250,555 23.1 917.8
    shared hash latch upgrades - wai 2 0.0 0.0
    sorts (disk) 0 0.0 0.0
    sorts (memory) 9,374 0.9 34.3
    sorts (rows) 1,065,331 98.3 3,902.3
    SQL*Net roundtrips to/from clien 540,955 49.9 1,981.5
    summed dirty queue length 0 0.0 0.0
    switch current to new buffer 91 0.0 0.3
    table fetch by rowid 140,045 12.9 513.0
    table fetch continued row 82,641,580 7,628.8 302,716.4
    table scan blocks gotten 572,610,809 52,859.1 2,097,475.5
    table scan rows gotten 753,552,008 69,562.2 2,760,263.8
    table scans (long tables) 22,633 2.1 82.9
    table scans (rowid ranges) 0 0.0 0.0
    table scans (short tables) 8,001 0.7 29.3
    transaction rollbacks 48,096 4.4 176.2
    transaction tables consistent re 0 0.0 0.0
    transaction tables consistent re 0 0.0 0.0
    undo change vector size 21,086,568 1,946.6 77,240.2
    user calls 616,784 56.9 2,259.3
    user commits 246 0.0 0.9
    user I/O wait time 890 0.1 3.3
    user rollbacks 27 0.0 0.1
    workarea executions - onepass 0 0.0 0.0
    workarea executions - optimal 9,370 0.9 34.3
    write clones created in backgrou 3 0.0 0.0
    write clones created in foregrou 18 0.0 0.1
    Instance Activity Stats - Absolute Values DB/Inst: PRESCLIP/presclip Snaps: 4
    -> Statistics with absolute values (should not be diffed)
    -> Statistics identified by '(derived)' come from sources other than SYSSTAT
    Statistic Begin Value End Value
    logons current 22 24
    open threads (derived) 1 1
    opened cursors current 109 138
    workarea memory allocated 167,837 167,837
    Instance Activity Stats - Thread Activity DB/Inst: PRESCLIP/presclip Snaps: 45
    Statistic Total per Hour
    log switches (derived) 12 3.99
    Tablespace IO Stats DB/Inst: PRESCLIP/presclip Snaps: 4510-4513
    -> ordered by IOs (Reads + Writes) desc
    Tablespace
    Av Av Av Av Buffer Av Buf
    Reads Reads/s Rd(ms) Blks/Rd Writes Writes/s Waits Wt(ms)
    PRESCLIP
    309,551 29 0.9 1.0 461 0 0 0.0
    UNDOTBS1
    11 0 4.5 1.0 3,215 0 27 18.1
    SYSAUX
    68 0 19.7 1.0 651 0 0 0.0
    SYSTEM
    86 0 12.0 1.0 275 0 0 0.0
    USERS
    11 0 25.5 1.0 11 0 0 0.0
    File IO Stats DB/Inst: PRESCLIP/presclip Snaps: 4510-4513
    -> ordered by Tablespace, File
    Tablespace Filename
    Av Av Av Av Buffer Av Buf
    Reads Reads/s Rd(ms) Blks/Rd Writes Writes/s Waits Wt(ms)
    PRESCLIP /home/orabase/oradata/presclip/.dbf
    309,551 29 0.9 1.0 461 0 0 0.0
    SYSAUX /home/orabase/OraHome_1/oradata/presclip/sysaux01.db
    68 0 19.7 1.0 651 0 0 0.0
    SYSTEM /home/orabase/OraHome_1/oradata/presclip/system01.db
    86 0 12.0 1.0 275 0 0 0.0
    UNDOTBS1 /home/orabase/OraHome_1/oradata/presclip/undotbs01.d
    11 0 4.5 1.0 3,215 0 27 18.1
    USERS /home/orabase/OraHome_1/oradata/presclip/users01.dbf
    11 0 25.5 1.0 11 0 0 0.0
    Buffer Pool Statistics DB/Inst: PRESCLIP/presclip Snaps: 4510-4513
    -> Standard block size Pools D: default, K: keep, R: recycle
    -> Default Pools for other block sizes: 2k, 4k, 8k, 16k, 32k
    Free Writ Buffer
    Number of Pool Buffer Physical Physical Buff Comp Busy
    P Buffers Hit% Gets Reads Writes Wait Wait Waits
    D 56,112 100 657,071,568 274 50,646 0 0 27
    Instance Recovery Stats DB/Inst: PRESCLIP/presclip Snaps: 4510-4513
    -> B: Begin snapshot, E: End snapshot
    Targt Estd Log File Log Ckpt Log Ckpt
    MTTR MTTR Recovery Actual Target Size Timeout Interval
    (s) (s) Estd IOs Redo Blks Redo Blks Redo Blks Redo Blks Redo Blks
    B 0 25 1619 7884 18432 18432 40111
    E 0 27 1658 8134 18432 18432 40915
    Buffer Pool Advisory DB/Inst: PRESCLIP/presclip Snap: 4513
    -> Only rows with estimated physical reads >0 are displayed
    -> ordered by Block Size, Buffers For Estimate
    Size for Size Buffers for Est Physical Estimated
    P Estimate (M) Factr Estimate Read Factor Physical Reads
    D 44 .1 5,511 10,860.87 7,520,121,155
    D 88 .2 11,022 10,067.41 6,970,728,249
    D 132 .3 16,533 9,162.63 6,344,251,131
    D 176 .4 22,044 4,918.92 3,405,884,972
    D 220 .5 27,555 3,758.06 2,602,099,395
    D 264 .6 33,066 2,066.73 1,431,012,319
    D 308 .7 38,577 6.09 4,216,864
    D 352 .8 44,088 3.82 2,648,248
    D 396 .9 49,599 2.46 1,701,979
    D 440 1.0 55,110 1.12 772,069
    D 448 1.0 56,112 1.00 692,405
    D 484 1.1 60,621 0.74 512,470
    D 528 1.2 66,132 0.61 423,030
    D 572 1.3 71,643 0.55 383,427
    D 616 1.4 77,154 0.48 334,375
    D 660 1.5 82,665 0.42 291,518
    D 704 1.6 88,176 0.34 233,621
    D 748 1.7 93,687 0.29 198,447
    D 792 1.8 99,198 0.24 164,701
    D 836 1.9 104,709 0.20 140,211
    D 880 2.0 110,220 0.19 128,668
    PGA Aggr Summary DB/Inst: PRESCLIP/presclip Snaps: 4510-4513
    -> PGA cache hit % - percentage of W/A (WorkArea) data processed only in-memory
    PGA Cache Hit % W/A MB Processed Extra W/A MB Read/Written
    100.0 1,384 0
    PGA Aggr Target Stats DB/Inst: PRESCLIP/presclip Snaps: 4510-4513
    -> B: Begin snap E: End snap (rows dentified with B or E contain data
    which is absolute i.e. not diffed over the interval)
    -> Auto PGA Target - actual workarea memory target
    -> W/A PGA Used - amount of memory used for all Workareas (manual + auto)
    -> %PGA W/A Mem - percentage of PGA memory allocated to workareas
    -> %Auto W/A Mem - percentage of workarea memory controlled by Auto Mem Mgmt
    -> %Man W/A Mem - percentage of workarea memory under manual control
    %PGA %Auto %Man
    PGA Aggr Auto PGA PGA Mem W/A PGA W/A W/A W/A Global Mem
    Target(M) Target(M) Alloc(M) Used(M) Mem Mem Mem Bound(K)
    B 200 174 53.5 0.0 .0 .0 .0 10,240
    E 200 173 53.7 0.0 .0 .0 .0 10,240
    PGA Aggr Target Histogram DB/Inst: PRESCLIP/presclip Snaps: 4510-4513
    -> Optimal Executions are purely in-memory operations
    Low High
    Optimal Optimal Total Execs Optimal Execs 1-Pass Execs M-Pass Execs
    2K 4K 6,784 6,784 0 0
    64K 128K 250 250 0 0
    128K 256K 12 12 0 0
    256K 512K 926 926 0 0
    512K 1024K 1,398 1,398 0 0
    PGA Memory Advisory DB/Inst: PRESCLIP/presclip Snap: 4513
    -> When using Auto Memory Mgmt, minimally choose a pga_aggregate_target value
    where Estd PGA Overalloc Count is 0
    Estd Extra Estd PGA Estd PGA
    PGA Target Size W/A MB W/A MB Read/ Cache Overalloc
    Est (MB) Factr Processed Written to Disk Hit % Count
    25 0.1 82,699.3 1,558.6 98.0 89
    50 0.3 82,699.3 1,154.7 99.0 0
    100 0.5 82,699.3 318.8 100.0 0
    150 0.8 82,699.3 312.1 100.0 0
    200 1.0 82,699.3 265.6 100.0 0
    240 1.2 82,699.3 262.8 100.0 0
    280 1.4 82,699.3 262.8 100.0 0
    320 1.6 82,699.3 262.8 100.0 0
    360 1.8 82,699.3 262.8 100.0 0
    400 2.0 82,699.3 262.8 100.0 0
    600 3.0 82,699.3 262.8 100.0 0
    800 4.0 82,699.3 262.8 100.0 0
    1,200 6.0 82,699.3 262.8 100.0 0
    1,600 8.0 82,699.3 262.8 100.0 0
    Shared Pool Advisory DB/Inst: PRESCLIP/presclip Snap: 4513
    -> SP: Shared Pool Est LC: Estimated Library Cache Factr: Factor
    -> Note there is often a 1:Many correlation between a single logical object
    in the Library Cache, and the physical number of memory objects associated
    with it. Therefore comparing the number of Lib Cache objects (e.g. in
    v$librarycache), with the number of Lib Cache Memory Objects is invalid.
    Est LC Est LC Est LC Est LC
    Shared SP Est LC Time Time Load Load Est LC
    Pool Size Size Est LC Saved Saved Time Time Mem
    Size(M) Factr (M) Mem Obj (s) Factr (s) Factr Obj Hits
    80 .2 56 4,198 72,114 1.0 14,842 1.2 16,452,599
    136 .3 111 6,647 73,539 1.0 13,417 1.1 16,491,805
    192 .4 166 9,432 74,005 1.0 12,951 1.1 16,508,243
    248 .5 221 12,492 74,291 1.0 12,665 1.1 16,519,582
    304 .6 276 16,528 74,480 1.0 12,476 1.0 16,527,543
    360 .7 331 23,498 74,624 1.0 12,332 1.0 16,534,394
    416 .8 386 31,198 74,703 1.0 12,253 1.0 16,542,712
    472 .9 441 37,726 74,859 1.0 12,097 1.0 16,558,200
    528 1.0 496 44,910 74,917 1.0 12,039 1.0 16,567,536
    584 1.1 551 49,341 74,953 1.0 12,003 1.0 16,571,102
    640 1.2 606 56,543 75,021 1.0 11,935 1.0 16,575,012
    696 1.3 661 61,575 75,176 1.0 11,780 1.0 16,580,220
    752 1.4 716 63,726 75,214 1.0 11,742 1.0 16,592,724
    808 1.5 771 70,249 75,269 1.0 11,687 1.0 16,598,334
    864 1.6 826 77,528 75,286 1.0 11,670 1.0 16,599,942
    920 1.7 881 83,639 75,312 1.0 11,644 1.0 16,602,620
    976 1.8 936 90,371 75,359 1.0 11,597 1.0 16,607,945
    1,032 2.0 991 94,801 75,407 1.0 11,549 1.0 16,610,849
    1,088 2.1 1,049 97,305 75,430 1.0 11,526 1.0 16,617,958
    Java Pool Advisory DB/Inst: PRESCLIP/presclip Snap: 4513
    Est LC Est LC Est LC Est LC
    Java JP Est LC Time Time Load Load Est LC
    Pool Size Size Est LC Saved Saved Time Time Mem
    Size(M) Factr (M) Mem Obj (s) Factr (s) Factr Obj Hits
    4 .5 4 124 0 .0 5,291 1.0 0
    8 1.0 4 124 0 .0 5,291 1.0 0
    12 1.5 4 124 0 .0 5,291 1.0 0
    16 2.0 4 124 0 .0 5,291 1.0 0
    Buffer Wait Statistics DB/Inst: PRESCLIP/presclip Snaps: 4510-4513
    -> ordered by wait time desc, waits desc
    Class Waits Total Wait Time (s) Avg Time (ms)
    undo header 27 0 18
    Enqueue Activity DB/Inst: PRESCLIP/presclip Snaps: 4510-4513
    No data exists for this section of the report.
    Undo Segment Summary DB/Inst: PRESCLIP/presclip Snaps: 4510-4513
    -> Undo segment block stats:
    -> uS - unexpired Stolen, uR - unexpired Released, uU - unexpired reUsed
    -> eS - expired Stolen, eR - expired Released, eU - expired reUsed
    Undo Undo Num Max Qry Max Tx Snap OutOf uS/uR/uU/
    TS# Blocks Trans Len (s) Concurcy TooOld Space eS/eR/eU
    1 48,135 96,602 128 4 0 0 0/0/0/0/0/0
    Undo Segment Stats DB/Inst: PRESCLIP/presclip Snaps: 4510-4513
    -> ordered by Time desc
    Undo Num Max Qry Max Tx Snap OutOf uS/uR/uU/
    End Time Blocks Trans Len (s) Concy TooOld Space eS/eR/eU
    17-??? 12:5 3,249 6,554 0 3 0 0 0/0/0/0/0/0
    17-??? 12:4 3,216 6,571 0 2 0 0 0/0/0/0/0/0
    17-??? 12:3 2,905 5,993 128 2 0 0 0/0/0/0/0/0
    17-??? 12:2 2,526 5,065 123 1 0 0 0/0/0/0/0/0
    17-??? 12:1 1,599 3,088 105 3 0 0 0/0/0/0/0/0
    17-??? 12:0 2,122 4,208 0 3 0 0 0/0/0/0/0/0
    17-??? 11:5 2,559 5,140 0 2 0 0 0/0/0/0/0/0
    17-??? 11:4 3,500 7,077 0 2 0 0 0/0/0/0/0/0
    17-??? 11:3 2,894 5,802 0 2 0 0 0/0/0/0/0/0
    17-??? 11:2 2,882 5,852 50 2 0 0 0/0/0/0/0/0
    17-??? 11:1 1,853 3,733 53 4 0 0 0/0/0/0/0/0
    17-??? 11:0 1,583 3,068 0 3 0 0 0/0/0/0/0/0
    17-??? 10:5 3,019 6,055 16 2 0 0 0/0/0/0/0/0
    17-??? 10:4 3,026 6,046 0 2 0 0 0/0/0/0/0/0
    17-??? 10:3 3,523 7,082 0 2 0 0 0/0/0/0/0/0
    17-??? 10:2 3,020 6,091 0 2 0 0 0/0/0/0/0/0
    17-??? 10:1 3,028 6,051 0 2 0 0 0/0/0/0/0/0
    17-??? 10:0 1,631 3,126 118 3 0 0 0/0/0/0/0/0
    Latch Activity DB/Inst: PRESCLIP/presclip Snaps: 4510-4513
    -> "Get Requests", "Pct Get Miss" and "Avg Slps/Miss" are statistics for
    willing-to-wait latch get requests
    -> "NoWait Requests", "Pct NoWait Miss" are for no-wait latch get requests
    -> "Pct Misses" for both should be very close to 0.0
    Pct Avg Wait Pct
    Get Get Slps Time NoWait NoWait
    Latch Name Requests Miss /Miss (s) Requests Miss
    active checkpoint queue 6,841 0.0 0 0
    active service list 17,532 0.0 0 0
    archive control 24 0.0 0 0
    begin backup scn array 15 0.0 0 0
    cache buffer handles 266 0.0 0 0
    cache buffers chains 1,315,303,855 0.0 0.4 1809 14,117 0.0
    cache buffers lru chain 150,748 0.1 0.3 0 211,414,162 0.3
    channel handle pool latc 288 0.0 0 0
    channel operations paren 35,631 0.0 0 0
    checkpoint queue latch 134,882 0.0 0 50,469 0.0
    child cursor hash table 65,010 0.0 0.0 0 0
    client/application info 9 0.0 0 0
    compile environment latc 97,494 0.0 0 0
    Consistent RBA 97,153 0.0 0 0
    cursor bind value captur 395 0.0 0 366 0.0
    dml lock allocation 197,003 0.0 0.0 0 0
    dummy allocation 292 0.0 0 0
    enqueue hash chains 582,892 0.0 0.0 0 21 0.0
    enqueues 285,714 0.0 0.3 0 0
    event group latch 144 0.0 0 0
    file cache latch 459 0.0 0 0
    FOB s.o list latch 152 0.0 0 0
    global KZLD latch for me 135 0.0 0 0
    hash table column usage 349 0.0 0 69,116 0.0
    hash table modification 214 0.0 0 0
    In memory undo latch 0 0 48,866 0.0
    job workq parent latch 0 0 6 0.0
    job_queue_processes para 181 0.0 0 0
    JOX SGA heap latch 57 0.0 0 0
    JS queue state obj latch 75,204 0.0 0 0
    JS slv state obj latch 9 0.0 0 0
    ksuosstats global area 727 0.0 0 0
    KTF sga enqueue 26 0.0 0 3,367 0.0
    ktm global data 199 0.0 0 0
    KWQMN job cache list lat 36 0.0 0 0
    lgwr LWN SCN 99,219 0.0 0 0
    library cache 3,214,193 0.4 1.1 1498 34,182 2.3
    library cache load lock 210 0.0 0 0
    library cache lock 1,165,646 0.0 0.0 0 0
    library cache lock alloc 99,387 0.0 0 0
    library cache pin 1,779,127 0.0 0.1 0 4 0.0
    library cache pin alloca 3,633 0.0 0 0
    list of block allocation 123 0.0 0 0
    loader state object free 584,340 0.0 0.1 0 0
    longop free list parent 20 0.0 0 20 0.0
    Memory Management Latch 52,575 0.0 0 3,517 0.0
    message pool operations 2 0.0 0 0
    messages 528,349 0.0 0.0 0 0
    mostly latch-free SCN 99,228 0.0 0.0 0 0
    MQL Tracking Latch 0 0 215 0.0
    multiblock read objects 116 0.0 0 0
    ncodef allocation latch 177 0.0 0 0
    object queue header heap 11 0.0 0 0
    object queue header oper 269,271 0.0 0 0
    object stats modificatio 519 0.0 0 0
    parallel query alloc buf 1,380 0.0 0 0
    parameter table allocati 292 0.7 1.0 0 0
    PL/SQL warning settings 149 0.0 0 0
    post/wait queue 142,398 0.0 0 94,641 0.0
    process allocation 144 0.0 0 144 0.0
    Latch Activity DB/Inst: PRESCLIP/presclip Snaps: 4510-4513
    -> "Get Requests", "Pct Get Miss" and "Avg Slps/Miss" are statistics for
    willing-to-wait latch get requests
    -> "NoWait Requests", "Pct NoWait Miss" are for no-wait latch get requests
    -> "Pct Misses" for both should be very close to 0.0
    Pct Avg Wait Pct
    Get Get Slps Time NoWait NoWait
    Latch Name Requests Miss /Miss (s) Requests Miss
    process group creation 286 0.0 0 0
    redo allocation 296,404 0.0 0.4 0 280,980 0.0
    redo copy 0 0 281,096 0.1
    redo writing 305,448 0.0 1.0 0 0
    row cache objects 19,800,316 0.3 0.0 1 963 0.0
    sequence cache 98,007 0.0 0 0
    session allocation 275,416 0.0 1.0 0 0
    session idle bit 1,331,355 0.0 0.2 0 0
    session switching 177 0.0 0 0
    session timer 3,643 0.0 0 0
    shared pool 1,723,175 0.2 0.8 323 0
    simulator hash latch 54,940,030 0.0 0 0
    simulator lru latch 2,170 99.3 1.0 106 425,026 170.0
    slave class 6 0.0 0 0
    slave class create 24 12.5 1.0 1 0
    sort extent pool 313 0.0 0 0
    SQL memory manager latch 3 0.0 0 3,414 0.0
    SQL memory manager worka 330,753 0.0 1.0 0 0
    state object free list 6 0.0 0 0
    statistics aggregation 420 0.0 0 0
    SWRF Alerted Metric Elem 36,081 0.0 0 0
    temp lob duration state 1 0.0 0 0
    threshold alerts latch 428 0.0 0 0
    transaction allocation 113 0.0 0 0
    transaction branch alloc 177 0.0 0 0
    undo global data 395,466 0.0 0.0 0 0
    user lock 542 0.0 0 0
    Latch Sleep Breakdown DB/Inst: PRESCLIP/presclip Snaps: 4510-4513
    -> ordered by misses desc
    Latch Name
    Get Requests Misses Sleeps Spin Gets Sleep1 Sleep2 Sleep3
    cache buffers chains
    1,315,303,855 385,895 142,296 320,582 647 54,945 9,721
    row cache objects
    19,800,316 63,155 18 63,138 16 1 0
    library cache
    3,214,193 12,757 13,804 1,332 9,607 1,392 426
    shared pool
    1,723,175 2,950 2,220 1,107 1,594 192 57
    simulator lru latch
    2,170 2,155 2,102 136 1,940 75 4
    cache buffers lru chain
    150,748 160 44 116 44 0 0
    loader state object freelist
    584,340 103 12 91 12 0 0
    session idle bit
    1,331,355 52 12 45 2 5 0
    library cache pin
    1,779,127 35 2 33 2 0 0
    redo allocation
    296,404 21 9 13 7 1 0
    enqueues
    285,714 6 2 4 2 0 0
    slave class create
    24 3 3 0 3 0 0
    parameter table allocation management
    292 2 2 0 2 0 0
    session allocation
    275,416 1 1 0 1 0 0
    SQL memory manager workarea list latch
    330,753 1 1 0 1 0 0
    redo writing
    305,448 1 1 0 1 0 0
    Latch Miss Sources DB/Inst: PRESCLIP/presclip Snaps: 4510-4513
    -> only latches with sleeps are shown
    -> ordered by name, sleeps desc
    NoWait Waiter
    Latch Name Where Misses Sleeps Sleeps
    cache buffers chains kcbgtcr: kslbegin excl 0 106,533 141,883
    cache buffers chains kcbrls: kslbegin 0 31,818 228
    cache buffers chains kcbnew: new latch again 0 3,533 10
    cache buffers chains kcbgtcr: fast path 0 216 75
    cache buffers chains kcbbxsv 0 123 10
    cache buffers chains kcbgcur: kslbegin 0 43 38
    cache buffers chains kcbzpnd: dump buffers 0 13 0
    cache buffers chains kcbchg: kslbegin: bufs not 0 5 15
    cache buffers chains kcbzhngcbk1: get hash chai 0 4 0
    cache buffers chains kcbbic2 0 2 0
    cache buffers chains kcbnlc 0 2 0
    cache buffers lru chain kcbzar: KSLNBEGIN 0 38 0
    cache buffers lru chain kcbkflb : age buffer out 0 3 0
    cache buffers lru chain kcbgtcr:CR Scan:KCBRSKIP 0 2 0
    cache buffers lru chain kcbzrn 0 1 26
    enqueues ksqdel 0 2 0
    library cache kglic 0 9,080 531
    library cache kglupc: child 0 692 1,667
    library cache kglpndl: child: before pro 0 658 926
    library cache kglobpn: child: 0 490 2,150
    library cache kglpin 0 284 154
    library cache kglpndl: child: after proc 0 269 7
    library cache kglpin: child: heap proces 0 226 14
    library cache kgldti: 2child 0 197 156
    library cache kgldte: child 0 0 183 1,986
    library cache kglhdgc: child: 0 167 97
    library cache kglhdgn: child: 0 156 2,103
    library cache kglpnc: child 0 59 313
    library cache kglobld 0 34 212
    library cache kglpnp: child 0 9 7
    library cache kglget: set reserved lock 0 8 418
    library cache kglati 0 5 7
    library cache lock kgllkdl: child: no lock ha 0 567 2,472
    library cache pin kglpndl 0 1 1
    library cache pin kglupc 0 1 0
    loader state object free kcblfs 0 6 0
    loader state object free kcblgs 0 6 12
    parameter table allocati ksp_param_table_alloc 0 2 2
    redo allocation kcrfw_redo_gen: redo alloc 0 9 0
    redo writing kcrfwnf: new logfile 0 1 0
    row cache objects kqreqd: reget 0 12 0
    row cache objects kqrpre: find obj 0 5 17
    row cache objects kqrso 0 1 0
    session allocation ksuxds: KSUSFCLC set 0 1 0
    session idle bit ksupuc: set busy 0 7 5
    session idle bit ksupuc: clear busy 0 5 7
    shared pool kghalo 0 1,271 612
    shared pool kghupr1 0 446 1,365
    shared pool kghfrunp: clatch: wait 0 361 584
    shared pool kghfrunp: clatch: nowait 0 359 0
    shared pool kghfrunp: alloc: wait 0 323 173
    shared pool kghalp 0 117 49
    shared pool kghfen: not perm alloc cla 0 60 20
    shared pool kgh: permsp 0 1 0
    shared pool kghfre 0 1 0
    shared pool kghfree_extents: scan 0 1 1
    simulator lru latch kcbs_simulate: simulate se 0 2,102 2,102
    slave class create ksvcreate 0 3 0
    SQL memory manager worka qesmmIRefreshBound 0 1 0
    Parent Latch Statistics DB/Inst: PRESCLIP/presclip Snaps: 4510-4513
    No data exists for this section of the report.
    Child Latch Statistics DB/Inst: PRESCLIP/presclip Snaps: 4510-4513
    No data exists for this section of the report.
    Segments by Logical Reads DB/Inst: PRESCLIP/presclip Snaps: 4510-4513
    -> % Total shows % of logical reads for each top segment compared with total
    logical reads for all segments captured by the Snapshot
    Tablespace Subobject Obj. Logical
    Owner Name Object Name Name Type Reads %Total
    PRESCLIP PRESCLIP MS_ARTICLE TABLE 654,906,160 99.71
    PRESCLIP PRESCLIP SYS_LOB0000051093C00 LOB 304,080 .05
    PRESCLIP PRESCLIP MS_REPORTQUEUE_DISPA TABLE 233,936 .04
    PRESCLIP PRESCLIP MS_ARTICLE_STAGE1 TABLE 97,808 .01
    SYS SYSTEM I_CDEF4 INDEX 97,744 .01
    Segments by Physical Reads DB/Inst: PRESCLIP/presclip Snaps: 4510-4513
    Tablespace Subobject Obj. Physical
    Owner Name Object Name Name Type Reads %Total
    PRESCLIP PRESCLIP SYS_LOB0000051093C00 LOB 303,704 98.13
    PRESCLIP PRESCLIP SYS_LOB0000051093C00 LOB 4,529 1.46
    PRESCLIP PRESCLIP SYS_LOB0000046827C00 LOB 1,118 .36
    PRESCLIP PRESCLIP MS_ARTICLE TABLE 50 .02
    SYS SYSAUX SYS_LOB0000008026C00 LOB 36 .01
    Segments by Buffer Busy Waits DB/Inst: PRESCLIP/presclip Snaps: 4510-4513
    No data exists for this section of the report.
    Segments by Row Lock Waits DB/Inst: PRESCLIP/presclip Snaps: 4510-4513
    No data exists for this section of the report.
    Segments by ITL Waits DB/Inst: PRESCLIP/presclip Snaps: 4510-4513
    No data exists for this section of the report.
    Dictionary Cache Stats DB/Inst: PRESCLIP/presclip Snaps: 4510-4513
    -> "Pct Misses" should be very low (< 2% in most cases)
    -> "Final Usage" is the number of cache entries being used
    Get Pct Scan Pct Mod Final
    Cache Requests Miss Reqs Miss Reqs Usage
    dc_awr_control 191 0.0 0 6 1
    dc_global_oids 8,745 0.0 0 0 26
    dc_histogram_data 39,720 0.0 0 0 674
    dc_histogram_defs 35,456 0.3 0 0 2,671
    dc_object_ids 5,847,398 0.0 0 0 1,116
    dc_objects 14,462 0.2 0 0 789
    dc_profiles 138 0.0 0 0 1
    dc_rollback_segments 2,480 0.0 0 0 23
    dc_segments 374,462 0.0 0 29 927
    dc_sequences 48,405 0.0 0 48,405 13
    dc_tablespaces 112,712 0.0 0 0 6
    dc_usernames 709 0.0 0 0 18
    dc_users 79,348 0.0 0 0 67
    outstanding_alerts 126 0.0 0 0 6
    Library Cache Activity DB/Inst: PRESCLIP/presclip Snaps: 4510-4513
    -> "Pct Misses" should be very low
    Get Pct Pin Pct Invali-
    Namespace Requests Miss Requests Miss Reloads dations
    BODY 44 4.5 243 0.8 0 0
    CLUSTER 19 0.0 48 0.0 0 0
    INDEX 2 0.0 2 0.0 0 0
    JAVA DATA 3 0.0 0 0 0
    SQL AREA 230,499 3.4 711,949 2.4 860 0
    TABLE/PROCEDURE 685 4.4 152,247 0.1 34 0
    TRIGGER 3 0.0 48,579 0.0 0 0
    SGA Memory Summary DB/Inst: PRESCLIP/presclip Snap: 4513
    SGA regions Size in Bytes
    Database Buffers 469,762,048
    Fixed Size 782,404
    Redo Buffers 524,288
    Variable Size 573,312,956
    SGA breakdown difference DB/Inst: PRESCLIP/presclip Snaps: 4510-4513
    Pool Name Begin value End value % Diff
    java free memory 2,763,968 2,763,968 0.00
    java joxlod exec hp 5,346,432 5,346,432 0.00
    java joxs heap 278,208 278,208 0.00
    large free memory 7,486,448 7,486,448 0.00
    large PX msg pool 902,160 902,160 0.00
    shared ASH buffers 4,194,304 4,194,304 0.00
    shared dbwriter coalesce buffer 1,049,088 1,049,088 0.00
    shared event statistics per sess 3,860,360 3,860,360 0.00
    shared fixed allocation callback 344 344 0.00
    shared free memory 50,274,976 46,941,344 -6.63
    shared joxlod exec hp 316,300 316,300 0.00
    shared joxlod pcod hp 54,664 54,664 0.00
    shared joxs heap 4,220 4,220 0.00
    shared KGLS heap 3,170,548 1,698,292 -46.44
    shared KQR L SO 250,952 250,952 0.00
    shared KQR M PO 2,723,332 2,623,064 -3.68
    shared KQR M SO 980,320 391,016 -60.11
    shared KQR S PO 279,256 279,256 0.00
    shared KQR S SO 11,300 11,300 0.00
    shared KTI-UNDO 1,235,304 1,235,304 0.00
    shared library cache 111,273,504 94,381,576 -15.18
    shared miscellaneous 35,266,584 35,266,728 0.00
    shared parameters 18,108 11,348 -37.33
    shared partitioning d 407,116 56,904 -86.02
    shared PLS non-lib hp 10,404 10,404 0.00
    shared PL/SQL DIANA 1,061,084 920,768 -13.22
    shared PL/SQL MPCODE 1,972,164 1,999,880 1.41
    shared PL/SQL PPCODE 40,964 21,192 -48.27
    shared pl/sql source 17,732 104 -99.41
    shared private strands 1,198,080 1,198,080 0.00
    shared PX subheap 131,068 131,068 0.00
    shared repository 188,420 188,420 0.00
    shared row cache 3,707,272 3,707,272 0.00
    shared sql area 329,584,656 352,498,780 6.95
    shared table definiti 3,916 3,156 -19.41
    shared trigger defini 9,756 4,304 -55.88
    shared trigger inform 1,564 1,564 0.00
    shared type object de 336,772 336,772 0.00
    buffer_cache 469,762,048 469,762,048 0.00
    fixed_sga 782,404 782,404 0.00
    log_buffer 524,288 524,288 0.00
    Resource Limit Stats DB/Inst: PRESCLIP/presclip Snap: 4513
    No data exists for this section of the report.
    init.ora Parameters DB/Inst: PRESCLIP/presclip Snaps: 4510-4513
    End value
    Parameter Name Begin value (if different)
    background_dump_dest /home/orabase/admin/presclip/bdum
    compatible 10.1.0.2.0
    control_files /home/orabase/OraHome_1/oradata/p
    core_dump_dest /home/orabase/admin/presclip/cdum
    db_block_size 8192
    __db_cache_size 469762048
    db_domain pressclip.si
    db_file_multiblock_read_count 16
    db_name presclip
    db_recovery_file_dest /home/orabase/flash_recovery_area
    db_recovery_file_dest_size 2147483648
    dispatchers (PROTOCOL=TCP) (SERVICE=presclipX
    __java_pool_size 8388608
    job_queue_processes 10
    __large_pool_size 8388608
    nls_date_format DD.MM.YYYY HH24:MI:SS
    nls_language SLOVENIAN
    nls_territory SLOVENIA
    nls_time_format HH24:MI:SS
    open_cursors 1500
    pga_aggregate_target 209715200
    processes 150
    remote_login_passwordfile EXCLUSIVE
    sga_max_size 1044381696
    sga_target 1044381696
    __shared_pool_size 553648128
    undo_management AUTO
    undo_tablespace UNDOTBS1
    user_dump_dest /home/orabase/admin/presclip/udum
    --------------------------------------------------------

  • NCHAR, NVARCHAR2 with JDBC THICK drivers

    Hi,
    I am using weblogic Thick jdbc drivers. We have a requirement of storing data
    in multiple languages. So we have added two columns in the oracle 9i table with
    data type NCHAR and NVARCHAR2.
    I tried the code using Oracle jdbc thin drivers. Its working fine.
    But when I tried with weblogic thick drivers its not able to read the data...
    Its reading null values.
    Any suggestions/links/guidelines would of great help.
    Thanks & Regards,
    Purvesh Vora

    Purvesh Vora wrote:
    Hi,
    I am using weblogic Thick jdbc drivers. We have a requirement of storing data
    in multiple languages. So we have added two columns in the oracle 9i table with
    data type NCHAR and NVARCHAR2.
    I tried the code using Oracle jdbc thin drivers. Its working fine.
    But when I tried with weblogic thick drivers its not able to read the data...
    Its reading null values.
    Any suggestions/links/guidelines would of great help.
    Thanks & Regards,
    Purvesh VoraHi. Our type-2 driver (weblogic.jdbc.oci.Driver) uses Oracle's OCI, which
    may need some OCI-specific charset properties and/or environment variables
    set for what you need. Please check our docs. I wouldn't expect nulls though,
    maybe corrupted data, but not nulls... What happens if you try Oracle's own
    thick driver? (all you would need to do is to change their URL).
    Joe

  • NCHAR & NVARCHAR2

    I have recetly heard that Oracle is not longer going to support NCHAR and NVARCHAR
    data types. Can any one tell me if you know any thing about this. I can not find any documents for this claim.
    Thanks
    [email protected]
    null

    There is no special external data type for NCHAR or NVARCHAR2 columns. You can use any capable data type at your choice.

  • Same table, Oracle 5 times slower than MySQL

    Hi
    I have several sites with the same aplication using a database as a log device and to later retrieve reports from. Some tables are for setup and one are for all the log data. The log data table has the following columns: LINEID, TAG, DATE_, HOUR_, VALUE, TIME_ and CHANGED. Typical data is: 122345, PA01_FT1_ACC, 2008-08-01, 10, 985642, "", 0.
    Index (TAG,DATE_)
    When calling a report the software querys for typical 3-5 select querys like the following, only different TAG: SELECT * FROM table WHERE TAG='PA01_FT1_ACC' AND DATE_ BETWEEN '2008-08-01' AND '2008-08-31' AND HOUR_=24
    Since our customers have different preferences some sites have Oracle and some have MySQL. And I have registered that the sites running Oracle uses 24-30 sec on the report, MySQL uses 3-6 sec on a similar report with the same tables and querying software.
    How is this?
    Is there anything I can do to make Oracle work faster?
    Should HOUR_ also be in the index?
    Since I guess this slowness is not something consistant in Oracle, there must be something to do.
    Thanks for any help.

    Histograms on varchar2 columns are based on the
    first 6 bytes of the column. If the database is using
    a character set that uses 1 byte per character, every
    entry in the DATE_ column since the beginning of the
    year looks like '2008-0' to the optimizer when
    determining cardinality to produce the "best"
    execution plan. For character sets that require
    multiple bytes per character, the situation is worse
    - every entry in the column representing this century
    appears to be the same value to the optimizer when
    determining cardinality
    That's a very good point and I didnt know about it
    before, about first 6 bytes being used. Can you point
    me in the docs where it is listed if its there or
    some other document/s which has this detail?Aman,
    I am having a bit of trouble finding the information in the documentation about the number of bytes used by a histogram on a VARCHAR2 column.
    References:
    http://www.freelists.org/archives/oracle-l/08-2006/msg00199.html
    "Cost-Based Oracle Fundamentals" page 117 shows a demonstration, and describes the use of ENDPOINT_ACTUAL_VALUE starting on Oracle 9i.
    "Cost-Based Oracle Fundamentals" page 118-120 describes selectivity problems when histograms are not used and a date is placed into a VARCHAR2 column.
    "Troubleshooting Oracle Performance", likely around page 130-140 also indicates that histograms only use the first 6 bytes.
    See section "Followup November 12, 2005 - 4pm US/Eastern"
    http://asktom.oracle.com/pls/asktom/f?p=100:11:0::::P11_QUESTION_ID:707586567563
    An interesting test setup that almost shows what I intended - but Oracle 10.2.0.2 was a little smarter than I expected, even though it selected to use an index to retrieve more than 50% of a table... Take a look at the TO_CHAR representation of the ENDPOINT_VALUE from DBA_TAB_HISTOGRAMS to understand what I was trying to decribe in my original post in this thread.
    CREATE TABLE T1 (DATE_ VARCHAR2(10));
    INSERT INTO T1
    SELECT
      TO_CHAR(TO_DATE('2008-01-01','YYYY-MM-DD')+ROWNUM-1,'YYYY-MM-DD')
    FROM
      DUAL
    CONNECT BY
      LEVEL<=250;
    250 rows created.
    COMMIT;
    CREATE INDEX IND_T1 ON T1(DATE_);
    SELECT
      MIN(DATE_),
      MAX(DATE_)
    FROM
      T1;
    MIN(DATE_) MAX(DATE_)
    2008-01-01 2008-09-06
    SELECT
      COLUMN_NAME,
      NUM_DISTINCT,
      NUM_BUCKETS,
      HISTOGRAM
    FROM
      DBA_TAB_COL_STATISTICS
    WHERE
      OWNER=USER
      AND TABLE_NAME='T1';
    no rows selected
    SELECT
      SUBSTR(COLUMN_NAME,1,10) COLUMN_NAME,
      ENDPOINT_NUMBER,
      ENDPOINT_VALUE,
      SUBSTR(ENDPOINT_ACTUAL_VALUE,1,10) ENDPOINT_ACTUAL_VALUE
    FROM
      DBA_TAB_HISTOGRAMS
    WHERE
      OWNER=USER
      AND TABLE_NAME='T1';
    no rows selected
    EXEC DBMS_STATS.GATHER_TABLE_STATS(OWNNAME=>USER,TABNAME=>'T1',METHOD_OPT=>'FOR COLUMNS SIZE 254 DATE_',CASCADE=>TRUE);
    PL/SQL procedure successfully completed.
    SELECT
      COLUMN_NAME,
      NUM_DISTINCT,
      NUM_BUCKETS,
      HISTOGRAM
    FROM
      DBA_TAB_COL_STATISTICS
    WHERE
      OWNER=USER
      AND TABLE_NAME='T1';
    COLUMN_NAME                    NUM_DISTINCT NUM_BUCKETS HISTOGRAM
    DATE_                                   250         250 HEIGHT BALANCED
    SELECT
      SUBSTR(COLUMN_NAME,1,10) COLUMN_NAME,
      ENDPOINT_NUMBER,
      ENDPOINT_VALUE,
      SUBSTR(ENDPOINT_ACTUAL_VALUE,1,10) ENDPOINT_ACTUAL_VALUE
    FROM
      DBA_TAB_HISTOGRAMS
    WHERE
      OWNER=USER
      AND TABLE_NAME='T1'
    ORDER BY
      ENDPOINT_NUMBER;
    COLUMN_NAM ENDPOINT_NUMBER ENDPOINT_VALUE ENDPOINT_A
    DATE_                    1     2.6059E+35 2008-01-01
    DATE_                    2     2.6059E+35 2008-01-02
    DATE_                    3     2.6059E+35 2008-01-03
    DATE_                    4     2.6059E+35 2008-01-04
    DATE_                    5     2.6059E+35 2008-01-05
    DATE_                    6     2.6059E+35 2008-01-06
    DATE_                    7     2.6059E+35 2008-01-07
    DATE_                    8     2.6059E+35 2008-01-08
    DATE_                    9     2.6059E+35 2008-01-09
    DATE_                   10     2.6059E+35 2008-01-10
    DATE_                  243     2.6059E+35 2008-08-30
    DATE_                  244     2.6059E+35 2008-08-31
    DATE_                  245     2.6059E+35 2008-09-01
    DATE_                  246     2.6059E+35 2008-09-02
    DATE_                  247     2.6059E+35 2008-09-03
    DATE_                  248     2.6059E+35 2008-09-04
    DATE_                  249     2.6059E+35 2008-09-05
    DATE_                  250     2.6059E+35 2008-09-06
    ALTER SESSION SET EVENTS '10053 TRACE NAME CONTEXT FOREVER, LEVEL 1';
    SELECT
      DATE_
    FROM
      T1
    WHERE
      DATE_<='2008-01-15';
    15 rows selected.
    From the 10053 trace:
    BASE STATISTICAL INFORMATION
    Table Stats::
      Table: T1  Alias: T1
        #Rows: 250  #Blks:  5  AvgRowLen:  11.00
    Index Stats::
      Index: IND_T1  Col#: 1
        LVLS: 0  #LB: 1  #DK: 250  LB/K: 1.00  DB/K: 1.00  CLUF: 1.00
    SINGLE TABLE ACCESS PATH
      Column (#1): DATE_(VARCHAR2)
        AvgLen: 11.00 NDV: 250 Nulls: 0 Density: 0.002
        Histogram: HtBal  #Bkts: 250  UncompBkts: 250  EndPtVals: 250
      Table: T1  Alias: T1    
        Card: Original: 250  Rounded: 15  Computed: 15.00  Non Adjusted: 15.00
      Access Path: TableScan
        Cost:  3.01  Resp: 3.01  Degree: 0
          Cost_io: 3.00  Cost_cpu: 85607
          Resp_io: 3.00  Resp_cpu: 85607
      Access Path: index (index (FFS))
        Index: IND_T1
        resc_io: 2.00  resc_cpu: 49621
        ix_sel: 0.0000e+000  ix_sel_with_filters: 1
      Access Path: index (FFS)
        Cost:  2.00  Resp: 2.00  Degree: 1
          Cost_io: 2.00  Cost_cpu: 49621
          Resp_io: 2.00  Resp_cpu: 49621
      Access Path: index (IndexOnly)
        Index: IND_T1
        resc_io: 1.00  resc_cpu: 10121
        ix_sel: 0.06  ix_sel_with_filters: 0.06
        Cost: 1.00  Resp: 1.00  Degree: 1
      Best:: AccessPath: IndexRange  Index: IND_T1
             Cost: 1.00  Degree: 1  Resp: 1.00  Card: 15.00  Bytes: 0
    ============
    Plan Table
    ============
    | Id  | Operation         | Name    | Rows  | Bytes | Cost  | Time      |
    | 0   | SELECT STATEMENT  |         |       |       |     1 |           |
    | 1   |  INDEX RANGE SCAN | IND_T1  |    15 |   165 |     1 |  00:00:01 |
    Predicate Information:
    1 - access("DATE_"<='2008-01-15')
    INSERT INTO T1
    SELECT
      TO_CHAR(TO_DATE('2008-09-07','YYYY-MM-DD')+ROWNUM-1,'YYYY-MM-DD')
    FROM
      DUAL
    CONNECT BY
      LEVEL<=250;
    COMMIT;
    EXEC DBMS_STATS.GATHER_TABLE_STATS(OWNNAME=>USER,TABNAME=>'T1',METHOD_OPT=>'FOR COLUMNS SIZE 254 DATE_',CASCADE=>TRUE);
    PL/SQL procedure successfully completed.
    SELECT
      COLUMN_NAME,
      NUM_DISTINCT,
      NUM_BUCKETS,
      HISTOGRAM
    FROM
      DBA_TAB_COL_STATISTICS
    WHERE
      OWNER=USER
      AND TABLE_NAME='T1';
    COLUMN_NAME                    NUM_DISTINCT NUM_BUCKETS HISTOGRAM
    DATE_                                   500         254 HEIGHT BALANCED
    SELECT
      SUBSTR(COLUMN_NAME,1,10) COLUMN_NAME,
      ENDPOINT_NUMBER,
      TO_CHAR(ENDPOINT_VALUE) ENDPOINT_VALUE,
      SUBSTR(ENDPOINT_ACTUAL_VALUE,1,10) ENDPOINT_ACTUAL_VALUE
    FROM
      DBA_TAB_HISTOGRAMS
    WHERE
      OWNER=USER
      AND TABLE_NAME='T1'
    ORDER BY
      ENDPOINT_NUMBER;
    COLUMN_NAM ENDPOINT_NUMBER ENDPOINT_VALUE                           ENDPOINT_A
    DATE_                    0 260592218925307000000000000000000000     2008-01-01
    DATE_                    1 260592218925307000000000000000000000     2008-01-02
    DATE_                    2 260592218925307000000000000000000000     2008-01-04
    DATE_                    3 260592218925307000000000000000000000     2008-01-06
    DATE_                    4 260592218925307000000000000000000000     2008-01-08
    DATE_                    5 260592218925307000000000000000000000     2008-01-10
    DATE_                    6 260592218925307000000000000000000000     2008-01-12
    DATE_                    7 260592218925307000000000000000000000     2008-01-14
    DATE_                    8 260592218925307000000000000000000000     2008-01-16
    DATE_                    9 260592218925307000000000000000000000     2008-01-18
    DATE_                   10 260592218925307000000000000000000000     2008-01-20
    DATE_                  242 260592219234792000000000000000000000     2009-04-26
    DATE_                  243 260592219234792000000000000000000000     2009-04-28
    DATE_                  244 260592219234792000000000000000000000     2009-04-29
    DATE_                  245 260592219234792000000000000000000000     2009-05-01
    DATE_                  246 260592219234792000000000000000000000     2009-05-02
    DATE_                  247 260592219234792000000000000000000000     2009-05-04
    DATE_                  248 260592219234792000000000000000000000     2009-05-05
    DATE_                  249 260592219234792000000000000000000000     2009-05-07
    DATE_                  250 260592219234792000000000000000000000     2009-05-08
    DATE_                  251 260592219234792000000000000000000000     2009-05-10
    DATE_                  252 260592219234792000000000000000000000     2009-05-11
    DATE_                  253 260592219234792000000000000000000000     2009-05-13
    DATE_                  254 260592219234792000000000000000000000     2009-05-14
    SELECT
      DATE_
    FROM
      T1
    WHERE
      DATE_ BETWEEN '2008-01-15' AND '2008-09-15';
    245 rows selected.
    From the 10053 trace:
    BASE STATISTICAL INFORMATION
    Table Stats::
      Table: T1  Alias: T1
        #Rows: 500  #Blks:  5  AvgRowLen:  11.00
    Index Stats::
      Index: IND_T1  Col#: 1
        LVLS: 1  #LB: 2  #DK: 500  LB/K: 1.00  DB/K: 1.00  CLUF: 2.00
    SINGLE TABLE ACCESS PATH
      Column (#1): DATE_(VARCHAR2)
        AvgLen: 11.00 NDV: 500 Nulls: 0 Density: 0.002
        Histogram: HtBal  #Bkts: 254  UncompBkts: 254  EndPtVals: 255
      Table: T1  Alias: T1    
        Card: Original: 500  Rounded: 240  Computed: 240.16  Non Adjusted: 240.16
      Access Path: TableScan
        Cost:  3.01  Resp: 3.01  Degree: 0
          Cost_io: 3.00  Cost_cpu: 148353
          Resp_io: 3.00  Resp_cpu: 148353
      Access Path: index (index (FFS))
        Index: IND_T1
        resc_io: 2.00  resc_cpu: 111989
        ix_sel: 0.0000e+000  ix_sel_with_filters: 1
      Access Path: index (FFS)
        Cost:  2.01  Resp: 2.01  Degree: 1
          Cost_io: 2.00  Cost_cpu: 111989
          Resp_io: 2.00  Resp_cpu: 111989
      Access Path: index (IndexOnly)
        Index: IND_T1
        resc_io: 2.00  resc_cpu: 62443
        ix_sel: 0.48031  ix_sel_with_filters: 0.48031
        Cost: 2.00  Resp: 2.00  Degree: 1
      Best:: AccessPath: IndexRange  Index: IND_T1
             Cost: 2.00  Degree: 1  Resp: 2.00  Card: 240.16  Bytes: 0
    ============
    Plan Table
    ============
    | Id  | Operation         | Name    | Rows  | Bytes | Cost  | Time      |
    | 0   | SELECT STATEMENT  |         |       |       |     2 |           |
    | 1   |  INDEX RANGE SCAN | IND_T1  |   240 |  2640 |     2 |  00:00:01 |
    Predicate Information:
    1 - access("DATE_">='2008-01-15' AND "DATE_"<='2008-09-15')I am sure that there are much better examples than the above, as the above generates a very small data set, and is still an incomplete test setup.
    Charles Hooper
    IT Manager/Oracle DBA
    K&M Machine-Fabricating, Inc.

  • Oracle 9i 10g slow spatial query

    I have been using the following spatial query in oracle 9i to assign jurisdictions to spatial points.
    SELECT /*+ordered*/ L.TCH_X_COORD, L.TCH_Y_COORD, T.NAME
    FROM tis.tis_coordinates_hold_on L,
    geospatial.mdt_admin_districts T
    WHERE SDO_RELATE(T.GEOMETRY,
    MDSYS.SDO_GEOMETRY(2001,41079,MDSYS.SDO_POINT_TYPE(tch_x_coord,tch_y_coord,NULL),
    NULL,NULL),'mask=ANYINTERACT querytype=WINDOW') = 'TRUE'
    AND tch_assigned_base_rte='M00001N'
    By using the ordered hint I was able to double the retrieval rate.  My problem is this: We are now migrating to oracle 10g, and the use of the ordered returns no rows (different incorrect results). If I remove the + ordered the results are correct, but I no longer get the increased speed of retrieval. Has anyone run into this problem, and can you suggest a way that I could speed up this query. As it stands now it takes more than 1/2 sec for each record retrieved, and I have millions of records !! Thanks.

    We're using 10.2.4.0 I believe I have found the reason the queries were different. When I dropped the spatial index and re-created it, the query returned the same rows as 9i. However, I still have an issue with the speed. 10g appears to be about 1/3 as fast as 9i was. It doesn't seem to make any difference whether I put in the +ordered or not.  Our dba says just based on cpu and processing speed the server that has 10g should be significantly faster.  Any comments?  Thanks.                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • Fast query in Oracle 10 but slow in Oracle 11

    Hello all,
    We have a query that is running smooth in Oracle 10g. It takes less then a second. We have setup a second server and used export/import to create the same database on 11g. On this 11g database the query takes a lot of time (like 8s or more).
    Below are the details. Maybe somebody can point us to the reason why this happens.
    We are talking about this statement :
    Select nvl(sum(BM_OPENST_D - BM_OPENST_CR),0)
    from bh.bh123gh
    where
    F123_AR_NR>='4400000000' and
    F123_AR_NR<='4404000000' and
    F123_KL_LEV_AR_NR='0631001000' and
    SRT_REK=2 and
    F123_BKJR>=0000 and
    F123_BKJR<=2011 and
    F123_FIRMA=2;Database version is 11.2.0.1.0
    SQL>
    SQL> show parameter optimizer
    NAME                                 TYPE        VALUE
    optimizer_capture_sql_plan_baselines boolean     FALSE
    optimizer_dynamic_sampling           integer     2
    optimizer_features_enable            string      11.2.0.1
    optimizer_index_caching              integer     0
    optimizer_index_cost_adj             integer     100
    optimizer_mode                       string      ALL_ROWS
    optimizer_secure_view_merging        boolean     TRUE
    optimizer_use_invisible_indexes      boolean     FALSE
    optimizer_use_pending_statistics     boolean     FALSE
    optimizer_use_sql_plan_baselines     boolean     TRUE
    SQL>
    SQL> show parameter db_file_multi
    NAME                                 TYPE        VALUE
    db_file_multiblock_read_count        integer     6
    SQL>
    SQL> show parameter db_block_size
    NAME                                 TYPE        VALUE
    db_block_size                        integer     8192
    SQL>
    SQL> show parameter cursor_sharing
    NAME                                 TYPE        VALUE
    cursor_sharing                       string      EXACT
    SQL>
    SQL> column sname format a20
    SQL> column pname format a20
    SQL> column pval2 format a20
    SQL>
    SQL> select         sname
      2              , pname
      3              , pval1
      4              , pval2
      5  from
      6              sys.aux_stats$;
    SNAME                PNAME                     PVAL1 PVAL2
    SYSSTATS_INFO        STATUS                          COMPLETED
    SYSSTATS_INFO        DSTART                          03-30-2010 11:05
    SYSSTATS_INFO        DSTOP                           03-30-2010 11:05
    SYSSTATS_INFO        FLAGS                         1
    SYSSTATS_MAIN        CPUSPEEDNW           1183.90219
    SYSSTATS_MAIN        IOSEEKTIM                    10
    SYSSTATS_MAIN        IOTFRSPEED                 4096
    SYSSTATS_MAIN        SREADTIM
    SYSSTATS_MAIN        MREADTIM
    SYSSTATS_MAIN        CPUSPEED
    SYSSTATS_MAIN        MBRC
    SYSSTATS_MAIN        MAXTHR
    SYSSTATS_MAIN        SLAVETHR
    13 rows selected.
    Elapsed: 00:00:00.03
    SQL>
    SQL> explain plan for
      2  Select nvl(sum(BM_OPENST_DEB - BM_OPENST_CR),0)
      3  from bh.bh123gh
      4  where
      5  F123_AR_NR>='4400000000' and
      6  F123_AR_NR<='4404000000' and
      7  F123_KL_LEV_AR_NR='0631001000' and
      8  SRT_REK=2 and
      9  F123_BKJR>=0000 and
    10  F123_BKJR<=2011 and
    11  F123_FIRMA=2;
    Explained.
    Elapsed: 00:00:00.10
    SQL>
    SQL> select * from table(dbms_xplan.display);
    PLAN_TABLE_OUTPUT
    Plan hash value: 3488495774
    | Id  | Operation                    | Name             | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT             |                  |     1 |    38 |  1792   (1)| 00:00:22 |
    |   1 |  SORT AGGREGATE              |                  |     1 |    38 |            |          |
    |*  2 |   TABLE ACCESS BY INDEX ROWID| BH123GH          |  5059 |   187K|  1792   (1)| 00:00:22 |
    |*  3 |    INDEX RANGE SCAN          | I_BH123GH_ISABEL |  5059 |       |   145   (0)| 00:00:02 |
    Predicate Information (identified by operation id):
       2 - filter("F123_BKJR">=0000 AND "F123_BKJR"<=2011)
       3 - access("F123_FIRMA"=2 AND "SRT_REK"=2 AND "F123_KL_LEV_AR_NR"='0631001000'
                  AND "F123_AR_NR">='4400000000' AND "F123_AR_NR"<='4404000000')
           filter("F123_AR_NR"<='4404000000' AND "F123_AR_NR">='4400000000')
    18 rows selected.
    Elapsed: 00:00:00.20
    SQL>
    SQL> rollback;
    Rollback complete.
    Elapsed: 00:00:00.01
    SQL>
    SQL> rem Set the ARRAYSIZE according to your application
    SQL> set autotrace traceonly arraysize 100
    SQL>
    SQL> alter session set tracefile_identifier = 'mytrace1';
    Session altered.
    Elapsed: 00:00:00.01
    SQL>
    SQL> rem if you're using bind variables
    SQL> rem define them here
    SQL>
    SQL> rem variable b_var1 number
    SQL> rem variable b_var2 varchar2(20)
    SQL>
    SQL> rem and initialize them
    SQL>
    SQL> rem exec :b_var1 := 1
    SQL> rem exec :b_var2 := 'DIAG'
    SQL>
    SQL> alter session set events '10046 trace name context forever, level 8';
    Session altered.
    Elapsed: 00:00:00.03
    SQL>
    SQL> -- put your statement here
    SQL> Select nvl(sum(BM_OPENST_D - BM_OPENST_CR),0)
      2  from bh.bh123gh
      3  where
      4  F123_AR_NR>='4400000000' and
      5  F123_AR_NR<='4404000000' and
      6  F123_KL_LEV_AR_NR='0631001000' and
      7  SRT_REK=2 and
      8  F123_BKJR>=0000 and
      9  F123_BKJR<=2011 and
    10  F123_FIRMA=2;
    Elapsed: 00:00:09.92
    Execution Plan
    Plan hash value: 3488495774
    | Id  | Operation                    | Name             | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT             |                  |     1 |    38 |  1792   (1)| 00:00:22 |
    |   1 |  SORT AGGREGATE              |                  |     1 |    38 |            |          |
    |*  2 |   TABLE ACCESS BY INDEX ROWID| BH123GH          |  5059 |   187K|  1792   (1)| 00:00:22 |
    |*  3 |    INDEX RANGE SCAN          | I_BH123GH_ISABEL |  5059 |       |   145   (0)| 00:00:02 |
    Predicate Information (identified by operation id):
       2 - filter("F123_BKJR">=0000 AND "F123_BKJR"<=2011)
       3 - access("F123_FIRMA"=2 AND "SRT_REK"=2 AND "F123_KL_LEV_AR_NR"='0631001000'
                  AND "F123_AR_NR">='4400000000' AND "F123_AR_NR"<='4404000000')
           filter("F123_AR_NR"<='4404000000' AND "F123_AR_NR">='4400000000')
    Statistics
              1  recursive calls
              0  db block gets
          11104  consistent gets
           9434  physical reads
              0  redo size
            574  bytes sent via SQL*Net to client
            519  bytes received via SQL*Net from client
              2  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
              1  rows processed
    SQL>
    SQL> disconnect
    Disconnected from Oracle Database 11g Release 11.2.0.1.0 - 64bit Production
    SQL>
    SQL> spool offTrace output :
    TKPROF: Release 11.2.0.1.0 - Development on Tue Nov 22 13:58:33 2011
    Copyright (c) 1982, 2009, Oracle and/or its affiliates.  All rights reserved.
    Trace file: C:\Oracle\diag\rdbms\oravopak\oravopak\trace\oravopak_ora_7352_mytrace1.trc
    Sort options: default
    count    = number of times OCI procedure was executed
    cpu      = cpu time in seconds executing
    elapsed  = elapsed time in seconds executing
    disk     = number of physical reads of buffers from disk
    query    = number of buffers gotten for consistent read
    current  = number of buffers gotten in current mode (usually for update)
    rows     = number of rows processed by the fetch or execute call
    Select nvl(sum(BM_OPENST_D - BM_OPENST_CR),0)
    from bh.bh123gh
    where
    F123_AR_NR>='4400000000' and
    F123_AR_NR<='4404000000' and
    F123_KL_LEV_AR_NR='0631001000' and
    SRT_REK=2 and
    F123_BKJR>=0000 and
    F123_BKJR<=2011 and
    F123_FIRMA=2
    call     count       cpu    elapsed       disk      query    current        rows
    Parse        1      0.01       0.00          0          0          0           0
    Execute      1      0.00       0.00          0          0          0           0
    Fetch        2      0.03       9.86       9434      11104          0           1
    total        4      0.04       9.87       9434      11104          0           1
    Misses in library cache during parse: 1
    Optimizer mode: ALL_ROWS
    Parsing user id: SYS
    Rows     Row Source Operation
          1  SORT AGGREGATE (cr=11104 pr=9434 pw=0 time=0 us)
      67250   TABLE ACCESS BY INDEX ROWID BH123GH (cr=11104 pr=9434 pw=0 time=10500177 us cost=1792 size=192242 card=5059)
      67250    INDEX RANGE SCAN I_BH123GH_ISABEL (cr=526 pr=550 pw=0 time=44363 us cost=145 size=0 card=5059)(object id 75061)
    Elapsed times include waiting on following events:
      Event waited on                             Times   Max. Wait  Total Waited
      ----------------------------------------   Waited  ----------  ------------
      SQL*Net message to client                       2        0.00          0.00
      Disk file operations I/O                        1        0.00          0.00
      db file sequential read                      8893        0.10          9.26
      db file scattered read                          7        0.01          0.05
      db file parallel read                           1        0.02          0.02
      SQL*Net message from client                     2        0.00          0.00
    ********************************************************************************DBMS_XPLAN.DISPLAY_CURSOR output :
    SQL>
    SQL> select * from table(dbms_xplan.display_cursor(null, null, 'ALLSTATS LAST'));
    PLAN_TABLE_OUTPUT
    SQL_ID  g6pkv639sdfgw, child number 0
    Select /*+ gather_plan_statistics */ nvl(sum(BM_OPENST_DEB -
    BM_OPENST_CR),0) from bh.bh123gh where F123_AR_NR>='4400000000'
    and F123_AR_NR<='4404000000' and F123_KL_LEV_AR_NR='0631001000' and
    SRT_REK=2 and F123_BKJR>=0000 and F123_BKJR<=2011 and
    F123_FIRMA=2
    Plan hash value: 3488495774
    | Id  | Operation                    | Name             | Starts | E-Rows | A-Rows |   A-Time   | Buffers | Reads  |
    |   0 | SELECT STATEMENT             |                  |      1 |        |      1 |00:00:08.07 |   11104 |  13531 |
    |   1 |  SORT AGGREGATE              |                  |      1 |      1 |      1 |00:00:08.07 |   11104 |  13531 |
    |*  2 |   TABLE ACCESS BY INDEX ROWID| BH123GH          |      1 |   5059 |  67250 |00:00:10.90 |   11104 |  13531 |
    |*  3 |    INDEX RANGE SCAN          | I_BH123GH_ISABEL |      1 |   5059 |  67250 |00:00:00.05 |     526 |    550 |
    Predicate Information (identified by operation id):
       2 - filter(("F123_BKJR">=0 AND "F123_BKJR"<=2011))
       3 - access("F123_FIRMA"=2 AND "SRT_REK"=2 AND "F123_KL_LEV_AR_NR"='0631001000' AND
                  "F123_AR_NR">='4400000000' AND "F123_AR_NR"<='4404000000')
           filter(("F123_AR_NR"<='4404000000' AND "F123_AR_NR">='4400000000'))
    27 rows selected.
    Elapsed: 00:00:01.15
    SQL>
    SQL> spool off

    I still find that my Oracle 10 DB is a tad faster.
    Comparing the plans shows that my Oracle 10 DB does less physical reads. I think I will get the same speed if I can find a way to change that behaviour on my Oracle 11 DB or can find the reason why it does that.
    SQL>
    SQL> show parameter user_dump_dest
    NAME                                 TYPE        VALUE
    user_dump_dest                       string      C:\ORACLE\PRODUCT\10.2.0\ADMIN
                                                     \ORAMULT\UDUMP
    SQL>
    SQL> show parameter optimizer
    NAME                                 TYPE        VALUE
    optimizer_dynamic_sampling           integer     2
    optimizer_features_enable            string      10.2.0.3
    optimizer_index_caching              integer     0
    optimizer_index_cost_adj             integer     100
    optimizer_mode                       string      ALL_ROWS
    optimizer_secure_view_merging        boolean     TRUE
    SQL>
    SQL> show parameter db_file_multi
    NAME                                 TYPE        VALUE
    db_file_multiblock_read_count        integer     16
    SQL>
    SQL> show parameter db_block_size
    NAME                                 TYPE        VALUE
    db_block_size                        integer     8192
    SQL>
    SQL> show parameter cursor_sharing
    NAME                                 TYPE        VALUE
    cursor_sharing                       string      EXACT
    SQL>
    SQL> column sname format a20
    SQL> column pname format a20
    SQL> column pval2 format a20
    SQL>
    SQL> select         sname
      2              , pname
      3              , pval1
      4              , pval2
      5  from
      6              sys.aux_stats$;
    SNAME                PNAME                     PVAL1 PVAL2
    SYSSTATS_INFO        STATUS                          COMPLETED
    SYSSTATS_INFO        DSTART                          04-17-2007 04:50
    SYSSTATS_INFO        DSTOP                           04-17-2007 04:50
    SYSSTATS_INFO        FLAGS                         1
    SYSSTATS_MAIN        CPUSPEEDNW           470.445344
    SYSSTATS_MAIN        IOSEEKTIM                    10
    SYSSTATS_MAIN        IOTFRSPEED                 4096
    SYSSTATS_MAIN        SREADTIM
    SYSSTATS_MAIN        MREADTIM
    SYSSTATS_MAIN        CPUSPEED
    SYSSTATS_MAIN        MBRC
    SYSSTATS_MAIN        MAXTHR
    SYSSTATS_MAIN        SLAVETHR
    13 rows selected.
    Elapsed: 00:00:00.01
    SQL>
    SQL> explain plan for
      2  Select nvl(sum(BM_OPENST_DEB- BM_OPENST_CR),0)
      3  from bh.bh123gh
      4  where
      5  F123_AR_NR>='4400000000' and
      6  F123_AR_NR<='4404000000' and
      7  F123_KL_LEV_AR_NR='0631001000' and
      8  SRT_REK=2 and
      9  F123_BKJR>=0000 and
    10  F123_BKJR<=2011 and
    11  F123_FIRMA=2;
    Explained.
    Elapsed: 00:00:00.00
    SQL>
    SQL> select * from table(dbms_xplan.display);
    PLAN_TABLE_OUTPUT
    Plan hash value: 3488495774
    | Id  | Operation                    | Name             | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT             |                  |     1 |    38 |  1594   (1)| 00:00:20 |
    |   1 |  SORT AGGREGATE              |                  |     1 |    38 |            |          |
    |*  2 |   TABLE ACCESS BY INDEX ROWID| BH123GH          |  4776 |   177K|  1594   (1)| 00:00:20 |
    |*  3 |    INDEX RANGE SCAN          | I_BH123GH_ISABEL |  4776 |       |   140   (1)| 00:00:02 |
    Predicate Information (identified by operation id):
       2 - filter("F123_BKJR">=0000 AND "F123_BKJR"<=2011)
       3 - access("F123_FIRMA"=2 AND "SRT_REK"=2 AND "F123_KL_LEV_AR_NR"='0631001000'
                  AND "F123_AR_NR">='4400000000' AND "F123_AR_NR"<='4404000000')
           filter("F123_AR_NR"<='4404000000' AND "F123_AR_NR">='4400000000')
    18 rows selected.
    Elapsed: 00:00:00.32
    SQL>
    SQL> rollback;
    Rollback complete.
    Elapsed: 00:00:00.00
    SQL>
    SQL> rem Set the ARRAYSIZE according to your application
    SQL> set autotrace traceonly arraysize 100
    SQL>
    SQL> alter session set tracefile_identifier = 'mytrace1';
    Session altered.
    Elapsed: 00:00:00.00
    SQL>
    SQL> rem if you're using bind variables
    SQL> rem define them here
    SQL>
    SQL> rem variable b_var1 number
    SQL> rem variable b_var2 varchar2(20)
    SQL>
    SQL> rem and initialize them
    SQL>
    SQL> rem exec :b_var1 := 1
    SQL> rem exec :b_var2 := 'DIAG'
    SQL>
    SQL> alter session set events '10046 trace name context forever, level 8';
    Session altered.
    Elapsed: 00:00:00.00
    SQL>
    SQL> -- put your statement here
    SQL> Select nvl(sum(BM_OPENST_DEB- BM_OPENST_CR),0)
      2  from bh.bh123gh
      3  where
      4  F123_AR_NR>='4400000000' and
      5  F123_AR_NR<='4404000000' and
      6  F123_KL_LEV_AR_NR='0631001000' and
      7  SRT_REK=2 and
      8  F123_BKJR>=0000 and
      9  F123_BKJR<=2011 and
    10  F123_FIRMA=2;
    Elapsed: 00:00:00.12
    Execution Plan
    Plan hash value: 3488495774
    | Id  | Operation                    | Name             | Rows  | Bytes | Cost (%CPU)| Time     |
    |   0 | SELECT STATEMENT             |                  |     1 |    38 |  1594   (1)| 00:00:20 |
    |   1 |  SORT AGGREGATE              |                  |     1 |    38 |            |          |
    |*  2 |   TABLE ACCESS BY INDEX ROWID| BH123GH          |  4776 |   177K|  1594   (1)| 00:00:20 |
    |*  3 |    INDEX RANGE SCAN          | I_BH123GH_ISABEL |  4776 |       |   140   (1)| 00:00:02 |
    Predicate Information (identified by operation id):
       2 - filter("F123_BKJR">=0000 AND "F123_BKJR"<=2011)
       3 - access("F123_FIRMA"=2 AND "SRT_REK"=2 AND "F123_KL_LEV_AR_NR"='0631001000'
                  AND "F123_AR_NR">='4400000000' AND "F123_AR_NR"<='4404000000')
           filter("F123_AR_NR"<='4404000000' AND "F123_AR_NR">='4400000000')
    Statistics
              1  recursive calls
              0  db block gets
          11001  consistent gets
              0  physical reads
              0  redo size
            459  bytes sent via SQL*Net to client
            396  bytes received via SQL*Net from client
              2  SQL*Net roundtrips to/from client
              0  sorts (memory)
              0  sorts (disk)
              1  rows processed
    SQL>
    SQL> disconnect
    Disconnected from Oracle Database 10g Release 10.2.0.3.0 - Production
    SQL>
    SQL> spool off

  • Oracle Forms loading slower with Sun JRE in Oracle E-Business Suite 11i

    Hi,
    After Deploying Sun JRE (Native Plug-in) for Windows Clients in Oracle E-Business Suite 11i (Note 290807.1) we find that Oracle Forms are loading slower than using Jinitiator.
    Also the PDF reports are opening in a minimized fashion. Meaning the PDF reports are opening correctly in new browser window (as expected) but is minimized.
    Customer is not willing to go live with Sun JRE due to these issues.
    Plz advice is there is any additional configuration I need to do.
    Rgds,
    Thiru

    When the JRE was installed/configured on the workstations was the jar cache placed on a LAN drive instead of the local drive? We have experienced poor performance with both the JRE and Jinitiator when the Workstation Sysadmins configured the jar cache to be located on a LAN drive. Also is the size of the jar cache on the workstation sufficient to hold all of your required jar files. It could be downloading the jar files all the time.
    Overall our performance with the JRE is comparible to the Jinitiator.
    Sorry I have not experienced the problem that you are having with you pdf reports so I can't provide any comments on it.

  • Euro-sign (and Greek) doesn't work even with nchar/nvarchar2

    This is something that has been blocking me for a few days now, and I'm running out of ideas.
    Basically, the problem can be summarised as follows:
    declare
        text nvarchar2(100) := 'Make €€€ fast!';
    begin
      dbms_output.put_line( text );
    end;And the output (both in SQL Developer and Toad) is:
    Make ¿¿¿ fast!See, I was under the impression that by using nchar and nvarchar2, you avoid the problems you get with character sets. What I need this for is to check (in PL/SQL) what the length of a string is in 7-bit units when converted to the GSM 03.38 character set. In that character set, there are 128 characters: mostly Latin characters, a couple of Greek characters that differ from the Latin ones, and some Scandinavian glyphs.
    Some 10 other characters, including square brackets and the euro sign, are escaped and take two 7-bit units. So, the above message takes 17 7-bit spaces.
    However, if I make a PL/SQL function that defines an nvarchar2(128) with the 128 standard characters and another nvarchar2(10) for the extended characters like the euro sign (the ones that take two 7-bit units), and I do an instr() for each character in the source string, the euro sign gets converted to an upside-down question mark, and because the delta (the first Greek character in the GSM 03.38 character set) also becomes an upside-down question mark, the function thinks that the euro sign is in fact a delta, and so assigns a length of 1.
    To try to solve it, I created a table with an nchar(1) for the character and a smallint for the number of units it occupies. The characters are entered correctly, and show as euro signs and Greek letters, but as soon as I do a query, I get the same problem again. The code for the function is below:
      function get_gsm_0338_length(
        text_content in nvarchar2
      ) return integer
      as
        v_offset integer;
        v_length integer := 0;
        v_char nchar(1);
      begin
        for i in 1..length(text_content)
        loop
          v_char := substr( text_content, i, 1 );
          select l
          into v_offset
          from gsm_0338_charset
          where ch = v_char;
          v_length := v_length + v_offset;
        end loop;
        return v_length;
        exception
          when no_data_found then
            return length(text_content) * 2;
      end get_gsm_0338_length;Does anybody have any idea how I can get this to work properly?
    Thanks,
    - Peter

    Well, the person there used a varchar2, whereas I'm using an nvarchar2. I understand that you need the right codepage and such between the client and the database if you use varchar2, which is exactly the reason why I used the nvarchar2.
    However, if I call the function from /Java/, it does work (I found out just now). But this doesn't explain why SQL Developer and Toad are being difficult, and I'm afraid that, because this function is part of a much bigger application, I'll run into the same problem.
    - Peter

  • Oracle form is slow when first login and normal after that

    My Query is that one screen when queried is very slow on first login and normal with same query afterwards.What can be the cause.Forms 10g on Linux,Database 10g

    I had raised this issue to Oracle. It is now considered as bug:
    BUG 13005659 - PSR:PERF:BIP:POOR PERF ACCESSING CATALOG FOLDER IN BIP 11G WITH SECURITY ENABLED
    The notes:
    1373204.1: BI Publisher: Navigation in catalog folders is slow after enabling catalog file system security
    And the fix is now included in one-off patch for October 2011:
    Patch 13042018

  • Retrieving record from oracle DB very slow..pls help

    Hi, i'm writing a VB code to retrieving records from Oracle DB Server version 8. I'm using VB Adodb to retrieve the records from various tables. Unfortunately one of the table are very slow to response, the table only contain around 204900 records. The SQL Statement to retrieve the records is a simple SQL Statement that contain WHERE clause only. Any issue that will make the retrieving time become slow? Is that a Indexing? Oracle Driver? Hardware Spec? Or any solution for me to improve the performance. Thanks!

    Well, there are a few things to consider...
    First, can you try executing your query via SQL*Plus? If there are database tuning problems, your query will be slow no matter where you run it.
    Second, are you retrieving significantly more rows in this query than in your other queries? It can take a significant amount of time to retrieve records to the client, even if it's quick to select them.
    Justin

  • PHP Oracle connection randomly slow

    Hello,
    I have a very strange problem concerning the connection to a oracle database with php. Sometimes the same SQL-Statement takes a very long time to load for no obvious reason (more than 5 minutes). But if you try it later it pops up at once. During the waiting time Toad is just showing "SQL*Net message from client" for the session.
    Here the code:
    $db = "<connection string>";
    $c = oci_connect("user", "pwd", $db);
    $s = ociparse($c, "select content from database WHERE CATEGORY = '$category'");
    if(ociexecute($s)) {
    while (ocifetch($s))
    echo ociresult($s, "CONTENT");
    Maybe I should also mention that I'm using a page with frames with a navigation bar on the left which loads the code in the frame on the right with the variable $category. We are using Oracle9i Release 9.0.1 .
    I would really appreciate any help.

    Perceived slowness is something that is dealt with by using process called "tuning". Tuning process requires an extensive knowledge because it should go from end to end, starting with the application. There may be an issue with your application, database, operating system, middle tier or network and one has to know all of the above to be able to tune the application properly. It's always the application one tunes, because it's the application that makes the end users unhappy. In your posts, there is not enough information to even begin thinking about tuning, so I will outline the tuning process for you. One always begins the tuning process by blaming the network and by letting the network engineers use sniffer and dig out the slow component. Typical response from the network people is "network is OK but the server XXX is slow with responses
    and that's what causing the timeouts"). Now you know where the problem is so you can concentrate on a single server and figure out what the problem is. Whatever the problem is, it is usually solved by improving the cache hit ratio by increasing the SGA. Network engineers are
    used to that and they do not mind, but if you want to be mr. nice guy, you can go directly to your boss and ask him for more memory. That is so called modified method C, by Cary Millsap. That is why it's called "method C".

  • Oracle 8i giving slow response when running sql query

    hi ,
    i am using oracle 8i server ;
    and sql query giving slow response before some days;
    so which parameter need to increase
    DB_BLOCK_BFFERS OR SHARE_POOL_SIZE
    CURRENT SETING IS
    DB_BLOCK_BUFFER=256000;
    SHARE POOLSIZE=300M;
    pls advice to me
    thanks

    No parameters need to be increased. Tuning is not done but making arbitrary changes to values and hoping that good things will happen by accident.
    The thing you really should be worrying about is your antique database and likely its impact on your skill set unless you are one year away from retirement.
    Where's the actual version number?
    Where's the DDL?
    Where's the DML?
    Where's the Explain Plan?

  • Oracle Collaboration Suite Slow Performance

    Hi,
    I have encountered with problem with OCS 10.1.2 with following information:
    Hardware : DL-380G5
    Operating System : OEL 4 update 5 64 bit
    Oracle Product : Collaboration Suite 10.1.2
    The installation has been done in three server as follow:
    Server 1: Application Tier (OCS component such as mail, calendar , discussion , ...)
    Server 2: Infrastructure (Oracle Single Sign on)
    Server 3 : Infrastructure (Oracle Internet Directory)
    Patch Information : Cumulative Patch 10.1.2.4 (Note: 406284.1) + Mandatory Patch after 10.1.2.4 ( Note:
    423515.1) + Patch 10.1.0.5 on Infrastructure layer
    have been applied on Application tier and Infrastructure.
    Problem_ Everything goes well after reboot of all 3 servers and refresh but after 2 hours nobody can
    connect to OCS services due to slow performance
    Only restarting the servers cause the users can connect to OCS services again.
    Any Idea will be appreciated.
    Edited by: Oralinux on Oct 29, 2009 5:08 PM

    Did you ever find out why this was happening? We seemed to have developed a similar issue and we have had a Severity 1 level SR for 4 days now and no one seems to able to work it out.
    cheers
    paul

Maybe you are looking for