Oracle Database Slow Perfomance

Hi Dear,
We are using Oracle9i Enterprise Edition Release 9.2.0.1.0 - Production
Operating System Micsoft Window 2000 5.00.2195 With Service Pack 4.and conneted users max 70 all time. So we are facing slow database perfomance. Kindly resolve my problem with advance thanks
System configuration as below
System : Dell PowerEdge 1800
Processor : 3.00 GHZ
Ram : 2.00 GB
Cordial Regrds
Raheem

We are using below init file with name "init.ora.1122005225338"
# Copyright (c) 1991, 2001, 2002 by Oracle Corporation
# Cache and I/O
db_block_size=16384
db_cache_size=50331648
db_file_multiblock_read_count=32
# Cursors and Library Cache
open_cursors=600
# Database Identification
db_domain=uma
db_name=orauma
# Diagnostics and Statistics
background_dump_dest=D:\oracle\admin\orauma\bdump
core_dump_dest=D:\oracle\admin\orauma\cdump
timed_statistics=TRUE
user_dump_dest=D:\oracle\admin\orauma\udump
# File Configuration
control_files=("D:\oracle\oradata\orauma\CONTROL01.CTL", "D:\oracle\oradata\orauma\CONTROL02.CTL", "D:\oracle\oradata\orauma\CONTROL03.CTL")
# Instance Identification
instance_name=orauma
# Job Queues
job_queue_processes=10
# MTS
dispatchers="(PROTOCOL=TCP) (SERVICE=oraumaXDB)"
# Miscellaneous
aq_tm_processes=1
compatible=9.2.0.0.0
# Optimizer
hash_join_enabled=TRUE
query_rewrite_enabled=FALSE
star_transformation_enabled=FALSE
# Pools
java_pool_size=67108864
large_pool_size=8388608
shared_pool_size=50331648
# Processes and Sessions
processes=200
# Redo Log and Recovery
fast_start_mttr_target=300
# Security and Auditing
remote_login_passwordfile=EXCLUSIVE
# Sort, Hash Joins, Bitmap Indexes
pga_aggregate_target=25165824
sort_area_size=524288
# System Managed Undo and Rollback Segments
undo_management=AUTO
undo_retention=10800
undo_tablespace=UNDOTBS1

Similar Messages

  • SQL slow after upgrading to Oracle Database 10g Enterprise Edition Release

    Hi all:
    We have recently upgraded our database from Oracle9i Enterprise Edition Release 9.2.0.6.0 to Oracle Database 10g Enterprise Edition Release 10.2.0.1.0
    After that we found that our some sql getting very slow
    for example query with 9i showing result in 4 seconds while in 10g showing result in 28 seconds.
    Following is the execution plan of my query in Oracle9i
    Operation     Object     PARTITION_START     PARTITION_STOP     COST
    SELECT STATEMENT ()                    9458
    NESTED LOOPS ()                    9458
      SORT (UNIQUE)                    
       INDEX (RANGE SCAN)     BL_EQ_PK_N               2
      VIEW ()     CONTAINER_INFO               2
       UNION-ALL (PARTITION)                    
        TABLE ACCESS (BY INDEX ROW     SERVICE_EVENTS               1
         NESTED LOOPS ()                    11
          NESTED LOOPS ()                    10
           NESTED LOOPS (OUTER)                    9
            NESTED LOOPS ()                    8
             NESTED LOOPS ()                    7
              NESTED LOOPS ()                    6
               NESTED LOOPS ()                    5
                NESTED LOOPS ()                    4
                 NESTED LOOPS (OUT                    3
                  TABLE ACCESS (BY     EQUIPMENT_USES               2
                   INDEX (UNIQUE S     EQUSE_PK               1
                  TABLE ACCESS (BY     SHIPPING_LINES               1
                   INDEX (UNIQUE S     LINE_PK               
                 INDEX (UNIQUE SCA     EQHT_PK               
                TABLE ACCESS (BY I     EQUIPMENT_TYPES               1
                 INDEX (UNIQUE SCA     EQTP_PK               
               TABLE ACCESS (BY IN     EQUIPMENT_SIZES               1
                INDEX (UNIQUE SCAN     EQSZ_PK               
              TABLE ACCESS (BY IND     SHIP_VISITS               2
               INDEX (RANGE SCAN)     SVISIT_UK               1
             TABLE ACCESS (BY INDE     SHIPS               1
              INDEX (UNIQUE SCAN)     SHIP_PK               
            TABLE ACCESS (BY INDEX     CARE_VIR_MAP               1
             INDEX (UNIQUE SCAN)     VIR_VESVOY               
           TABLE ACCESS (BY INDEX      EQUIPMENT               1
            INDEX (RANGE SCAN)     EQ_EQUSE_FK               
          INDEX (RANGE SCAN)     SEVENTS_EQUSE_FK_N               
        NESTED LOOPS ()                    7
         NESTED LOOPS ()                    6
          NESTED LOOPS ()                    5
           NESTED LOOPS ()                    4
            NESTED LOOPS (OUTER)                    3
             TABLE ACCESS (BY INDE     EQUIPMENT_USES               2
              INDEX (UNIQUE SCAN)     EQUSE_PK               1
             TABLE ACCESS (BY INDE     SHIPPING_LINES               1
              INDEX (UNIQUE SCAN)     LINE_PK               
            INDEX (UNIQUE SCAN)     EQHT_PK               
           TABLE ACCESS (BY INDEX      EQUIPMENT_TYPES               1
            INDEX (UNIQUE SCAN)     EQTP_PK               
          TABLE ACCESS (BY INDEX R     EQUIPMENT_SIZES               1
           INDEX (UNIQUE SCAN)     EQSZ_PK               
         TABLE ACCESS (BY INDEX RO     EQUIPMENT               1
          INDEX (RANGE SCAN)     EQ_EQUSE_FK               and following is my query plan in Oracle 10g
    Operation     Object     PARTITION_START     PARTITION_STOP     COST
    SELECT STATEMENT ()                    2881202
    NESTED LOOPS ()                    2881202
      SORT (UNIQUE)                    2
       INDEX (RANGE SCAN)     BL_EQ_PK_N               2
      VIEW ()     CONTAINER_INFO               2881199
       UNION-ALL ()                    
        NESTED LOOPS (OUTER)                    2763680
         NESTED LOOPS ()                    2718271
          NESTED LOOPS ()                    2694552
           NESTED LOOPS ()                    2623398
            NESTED LOOPS (OUTER)                    2623380
             NESTED LOOPS ()                    2393965
              NESTED LOOPS ()                    2393949
               NESTED LOOPS ()                    2164536
                NESTED LOOPS ()                    1706647
                 NESTED LOOPS ()                    854120
                  TABLE ACCESS (FU     BL_EQUIPMENT               1515
                  TABLE ACCESS (BY     EQUIPMENT_USES               1
                   INDEX (UNIQUE S     EQUSE_PK               1
                 TABLE ACCESS (BY      EQUIPMENT               1
                  INDEX (RANGE SCA     EQ_EQUSE_FK               1
                TABLE ACCESS (BY I     EQUIPMENT_TYPES               1
                 INDEX (UNIQUE SCA     EQTP_PK               1
               TABLE ACCESS (BY IN     EQUIPMENT_SIZES               1
                INDEX (UNIQUE SCAN     EQSZ_PK               1
              INDEX (UNIQUE SCAN)     EQHT_PK               1
             TABLE ACCESS (BY INDE     SHIPPING_LINES               1
              INDEX (UNIQUE SCAN)     LINE_PK               1
            INDEX (RANGE SCAN)     SEVENTS_TSERV_FK_N               1
           TABLE ACCESS (BY INDEX      SHIP_VISITS               2
            INDEX (RANGE SCAN)     SVISIT_UK               2
          TABLE ACCESS (BY INDEX R     SHIPS               1
           INDEX (UNIQUE SCAN)     SHIP_PK               1
         TABLE ACCESS (BY INDEX RO     CARE_VIR_MAP               2
          INDEX (UNIQUE SCAN)     VIR_VESVOY               1
        NESTED LOOPS (OUTER)                    117519
         NESTED LOOPS ()                    98158
          NESTED LOOPS ()                    78798
           NESTED LOOPS ()                    78795
            NESTED LOOPS ()                    59432
             TABLE ACCESS (FULL)     EQUIPMENT_USES               20788
             TABLE ACCESS (BY INDE     EQUIPMENT_TYPES               1
              INDEX (UNIQUE SCAN)     EQTP_PK               1
            TABLE ACCESS (BY INDEX     EQUIPMENT               1
             INDEX (RANGE SCAN)     EQ_EQUSE_FK               1
           INDEX (UNIQUE SCAN)     EQHT_PK               1
          TABLE ACCESS (BY INDEX R     EQUIPMENT_SIZES               1
           INDEX (UNIQUE SCAN)     EQSZ_PK               1
         TABLE ACCESS (BY INDEX RO     SHIPPING_LINES               1
          INDEX (UNIQUE SCAN)     LINE_PK               1can somebody help me regarding this?
    Thanks
    Hassan

    I would say ..gather stats on 9i/10gfor the required table and indexes , then post the expalin plan.
    --Girish                                                                                                                                                                                                                               

  • Slow Problems with Oracle Forms 10g and Oracle Database 11g

    Hi, I wonder if there is a compatibility problem between Version 10.1.2.0.2 32 Oracle Forms and Oracle Database 11g Enterprise Edition Release 11.2.0.1.0 - 64bit Production. This is because my application runs correctly on a version of Oracle Database 10g, and when we migrated the database to an Oracle Database 11g, slowness problems came out.
    Thanks.

    We have the same issue happening with our custom forms and with some of the standard forms in EBSO. So far we have found that the form invoking a view causes ridiculous slowness in opening the form (40 mins). Using a table access has shortened the open time significantly. At this time Oracle DBAs at OOD have no clear idea why it is happening.
    we are on 11.1 database with 11.5 EBSO
    Edited by: user3223867 on Feb 4, 2011 7:55 AM

  • Database slow; How to check the Oracle query timings

    Hi,
    I have a quick question regarding a troubleshooting iam currently working on.
    We have a J2EE application runnig on WLS 81 SP3.
    We are experiencing a problem where the customer response time on our application is "too slow". We checked our N/W and they seems to be OK. The Iplanet webserver and BEA application servers looks good but on the Oracle database box - i saw "iowait" (when doing top UNIX command) to be 50-60 % which is extremly high. We are suspecting this to be our issue as the "iowait" is very high at the DATABASE box hence causing BEA servers to show "slow response" on certain pages which are database accentric.
    Now, in order to proove that the queries are taking "too longer" to execute from the time BEA server requested and it actually got the reply back from database, i need to dig down and get some "profiling" (due to some political reasons, i can request to turn on profling at the moment) done. So, is there any way i can verify the response time when the BEA server requested some information from the database and the time when Oracle database responded with all the information requested ?
    thanks for your help,

    Yes. Create a Date object prior to the database call. Then create another one when the call completes. Convert both to mililseconds and subtract. You will have network latency in that statistic, but especially if you are using connection pools, the vast majority should be database access.
    Another option is to turn on tk_prof or create an EXPLAIN plan table in Oracle. That will show the 'cost' of each query. Also, try running statistics on the database, that should help the optimizer.
    - Saish

  • &, &&, and @s causing ORACLE Database Project issues And SLOW Run

    Hello I am encountering an issue while "Run"ing functions/sp/packages from an ORACLE DATABASE PROJECT.
    We are supporting a legacy application that utilizes HTP.PRINT. We decided that it would be nice to have it as an Oracle Database Project but when we save the file it is croaking at us.
    We are using
    ODTwithODAC1110720
    Visual Studio 2008
    Oracle 10g r2
    The specific issue happens when an @ is the first line in the file and when utilizing && in javascript (all being emitted from HTP.Print). Now I know we can work around these limitations (escaping the &s and wrapping the line) but is there any way to get these to work in the IDE w/o the escaping and such?
    For instance:
    In visual Studio Create a Function1 as such
    DROP FUNCTION FUNCTION1;
    CREATE FUNCTION FUNCTION1 (
      PARAM1 IN NUMBER) RETURN NUMBER IS
    BEGIN
    HTP.PRINT ('    if (popupStatus == 1 && okDisabled==false) {');
             htp.print('
    <style>
    @media printfooter; {
    }   etc etc etc   ');
      RETURN PARAM1;
    END FUNCTION1;
    /You will get this result:
    Connected.
    ------ Running '***\Project1\Functions\Script1.sql' @**.** ------
    Function dropped.
    SP2-0310: unable to open file "media.sql"
    Enter value for okdisabled:
    Operation canceled by user
    -- this locks the file
    If I go ahead and hit OK (in a new unlocked file)
    SP2-0310: unable to open file "media.sql"
    Enter value for okdisabled: old   5: HTP.PRINT ('      if (popupStatus == 1 && okDisabled==false) {');
    new   5: HTP.PRINT ('      if (popupStatus == 1 ==false) {');
    **/You will notice that when the function is created it just skips the & and @s
    FUNCTION FUNCTION1 (
      PARAM1 IN NUMBER) RETURN NUMBER IS
    BEGIN
    HTP.PRINT ('    if (popupStatus == 1 ==false) {');
             htp.print('
    <style>
    }   etc etc etc   ');
      RETURN PARAM1;
    END FUNCTION1;and just a little insult to injury on this, each "run" takes upwards to 20-25 seconds from Visual studio (this is a deal breaker for us to use the tool -- when SQL Developer takes mere moments) -- is there a configuration setting awry?
    So I guess the questions are these (sorry for the ramble)
    1) How, in the VS 2008 IDE, can we accommdate & and && and @s without escaping/workarounds? (these work fine in developer)
    a) I have noticed that the escape character work around is ONE way ... thus if I have the package body in the Oracle Database Project, add "set escape \ " then escape all of my & and && and @s it works. but... the code is saved in Oracle without the escape characters (understandable) but if it changes in Oracle then I push the changes down I lose all of my escape characters.
    2) Why does each RUN take so long? working in developer & even the Server Explorer edited function are almost instantaneous.
    -- I want to add, during my escape character tests EACH RUN took upwards to 30-45 seconds, so for 4 small simple test cases it was approaching 2 minutes of just save time...
    so far these two shortcomings are barrier for our company to utilize these features (it's hard to try to sell the dept. on anything that doesn't handle escapes well AND -- the big AND -- takes entirely too long to save). any advise?
    thnx
    Edited by: tanging on Jul 1, 2010 4:47 AM

    we can just set the escape character and it works fine,
    set escape '~'
    create or replace ....when/if we have to pull down from production level we'll have to be mindful to change & and @s to have a preceding escape character (and add the set escape to the top) --> which is a step back from SQL Developer which handles this flawlessly.
    now the timing -- I believe it to be a timing issue on our network (therefore I've wasted your time). We have a default shared drive that is anything but speedy and our "default" homes in Visual Studio pointed to the shared drive. While the project/solution were on our local drives - the temp drive was the slow default. Changing that locally seems to have made the timing issue go away. (although on the first save of the body spec after the change and reboot it took 35 seconds but on subsequent runs it Ran in acceptable time limits).

  • What is slower - lan network socket or oracle database

    What is generally slower?
    Data transference via socket on a network connection on a lan line or inserting data into an oracle database via an Oracle Prepared Statement with a batch size of let�s say 500?

    Maybe this will clear it up: Oracle will be slightly
    slower. The transactions are occuring over the
    network anyway. So the rate can only be as good as
    the network itself. Presumably, the additional
    overhead DML imposes will make Oracle slightly slower
    than raw network traffic (the prototypical example
    would be reading a PDF from a BLOB and piping it back
    through middleware to a client).In normal configurations, what Saish says is true, but...
    Oracle can also be configured to accept database connections via inter-process communication (IPC), at least on many OSes; in this configuration, the application MUST reside on the database server itself, and the application must use Oracle's OCI driver, not the type 4 thin driver. Then, the application and Oracle use in-memory communication. Obviously, this isn't for everybody and can get very expensive when you scale out.

  • Slow startup of oracle database instance

    Hi,
    It take about 7 minutes to start an oracle database on a vmware linux machine.
    On the host system, the same database take less than one minute to startup.
    Hardware : hp proliant dl380 g4 (1 intel Xion 3.2), 6 gb of memory (3.9 for vritual machine)
    OS : Redhat linux AS 3.0 (both on host machine and vmware machine)
    vmware : 3.2 GSX
    Oracle : 10.1.0.3 (both on host and vm machine)
    Is this startup time normal or is there something that I could change?
    On the host machine a copy of the database takes less than a one minute to startup.
    Andre

    On the host machine a copy of the database takes less than a one minute to startup.Well if you have (as Andre) "same" databases on guest and on host, I can just repeat:
    Reconfigure vmware settings, search in help everything about let's say "performance of guest OS"!
    It's also exists vmware-Forum with bunch of usefull information.
    This is not Oracle related question.
    Cheers!

  • Memory issue in oracle database 11g ...

    Hi All,
    I have installed oracle11gR2 on Linux (CentOS 5.5)... SErver has good amount of HDD - 669G and 16G RAM. I have two database running on this server.
    I am getting out of memory error and end user also complains about dB is very slow... I have configured memory and SGA parameter in both the database and total allocation of memory and SGA maximum size 7.5G. So I assuemd that oracle database used RAM from whatever we configured in memory maximum parameter , in my case I have allocated upto 7.5G but when I run top command I can see almost 16G is in used and only few mbs left...
    can anyone suggest me my assumption about memory allcoation to database is correct or not ? or when I allocated memory to database (using memory max parameter) then why top showing all memory in used. This is database server and no other process is running except oracle.
    Thanks in advance...

    Just enable AMM as below and forget the nitty gritties of setting lots of memory parameters ;-D
    ALTER SYSTEM SET MEMORY_TARGET=6G SCOPE=SPFILE; --select the amount of memory as per your need                                                                                                                                                                                                                                                                                                                                                                                                   

  • Using AE(htmldb 2.0)  as for reporting tool for other oracle databases.

    Maybe I was mistaken, but when I first saw the HTMLDB demo's I saw this as a slick way to build a browser based reporting tool for the masses for quasi-ad-hoc reporting on some of our larger databases that currently have limited reporting capability, and also as a possible replacement for the many MSAccess applets we have.
    I just got 2.0 installed and working on a 9i database and went through the basic tutorials, but I can't find much info on how to connect to other oracle databases.
    Are my options as follows?:
    create dblinks from the local database that houses htmldb to all the other databases?
    or
    install htmldb schemas on each database I want to access from htmldb?
    or
    I'll keep looking, but if any of you have any pointers or know of a tutorial that explains the best way to do this it would be greatly appreciated!
    tia

    As for question 1, yep, that's what I mean. Example:
    In a schema in the App Express instance, create a user called "APP1_USER", and then
    create view app1_user.people as select * from people@link_user@remotedb
    As for the next question, using the built-in insert/update/delete processes will give you
    ORA-01461: can bind a LONG value only for insert into a LONG column
    among other errors. Apparently version 2.1 will fix this. See Cannot Update VARCHAR column in Remote DB
    We address this problem by creating pl/sql APIs for DML, and then writing our own insert/update processes. Slows us down a little, but even with that, App Express remains a productive choice for us.
    Another weird problem: auto-row fetch (built-in to HTML DB) doesn't work over db links when you have two columns for a primary key. Many ways around this, e.g. create sequence-populated primary key, create a view with single column that concatenates primary key column values (key1|key2)
    Hope this helps!
    -John

  • Performance Issues on Oracle Database Lite 10.3.0.3

    Hello,
    we have a big problem with one of our customers. He uses Oracle Database Lite in the standalone version. There are about 600 clients running a project with about 20 Publication Items. The customer works in the logistics field, so the Main time where nearly all clients want to sync and get their tours is from 02 AM to 05 AM, so that is the time with the most traffic.
    Everything went well before last week. Suddenly the compose cycle needs (at least between that hours) about ten times longer than before. Normally we had about 40 - 80 seconds, now we have about 300 - 500 average with max values from over 1200 seconds.
    Therefore we have a lot of conflicts and Disconnects on the clients. It is sometimes that bad, that nearly no client can sync successfully.
    We checked our Selects in the publication Items, all are very fast and look good in the explain plan, so that shouldnt be the problem.
    The installation is nearly in the Default state as oracle does when you install Oracle Lite. Are there any standard settings we can change? Does anyone had the same problem already?
    The Machine is a Windows Server 2003 with an Intel Xeon CPU E7-4820 and 4 GB of RAM.
    Of course our customer gets a lot of trouble because of that and we have to improve and fix that as fast as we can.
    Any recommendation or opinions are very welcome.
    If I have to give more Info about somewhat please feel free to ask, I will give it as fast as possible.
    Thanks in advance
    Holger

    Hey,
    many thanks for your proposals. The MGP runs every minute like the default settings are, because our application is a time sensitive. The data have to be very fast on the clients in the nights and thex are only a few minutes before available. I think the parameters are important in environemnts where the mgps runs only after a few minutes?
    Let me summarize the situation since my las post:
    We have days (nights) where everything goes quite well. Mainly that is thrusday and friday. But on the other hand, there are days where everything really is a mess.
    The mgp caycles increase and when you look to mobile manager you see 70 clients syncing very very slowly (about 300 - 600 seconds) for just a little bit of data. Then we get the disonnects and the messages in the err.log. 
    What do you think, is this somehow network related, or ist this a logical problem in the Mobile Server itself? 
    Like postes earlier, there are 500 clients syncing against a standalone mobile server.
    We just couldnt figure out, why the mgp times somehow and sometimes increase that much, that there are these problems.
    First we thought, that they sync newly over wireless (GPRS or Edge) and that syncing is that slowly, that everything goes down, but arent sure. Is this possible because of the architecture of the Mobile Server? That a very slow network can slow down the mgps and that does timeouts and all the other stuff?
    How many clients can a Standalone Mobile Server normally serve at same time without performance problems. What do you thin about the hardware I wrote? Is it powerful enough?

  • Sun T2 chips vs SPARC64 VI/VII chips for Oracle database servers

    We have recently found poor performance of Sun T5240 servers where (against previous V series servers with similar gross I/O capabilities on the disk volume)the timings for the recovery of the database, and the subsequent re-build of the tables and materialised views, are variable from slightly worse to atrocious. Given that the clock-speed is similar,and all significant oracle database parameters are the same, we couldn't see why these processes should take longer on the T5240. The statistics report from the database showed no I/O bottleneck on the new machine, instead it showed raised CPU times for some of the key slow statements.
    We found the attached oracle metalink document (ref 781763.1) <<Sun_T2_slow_for Oracle_DB.html>>
    Seems to be that if you can't control the content of large long-running SQL statements to parallelise them, don't buy a T-series box as the multithreading capability will work against you.
    Therefore we are looking at new servers to run other similar large Oracle apps and appear to have a number of choices within a similar price range
    Notably
    M3000 - 1 x SPARC VII CPU (quad core procesor)
    M4000 - 2 x SPARC VI CPU (dual core processor)
    as opposed to the
    T5240 - 2 x T2 CPU (8 core processor)
    Question is which of these CPU/Core combinations works best...are there performance figures? What's the difference between CPU's and number of cores?
    Any benchmarks to help us decide? Anyone experienced similar or tried these different combos for themselves?

    We tested a T5210 as a database server (running Ingres, not Oracle) and our batch performance was roughly equivalent to a dual CPU UltraSPARC III V480. Our guess is that the performance hit came from having a relatively small cache shared across so many threads. Like you, we're looking at using the M3000 or M4000 in preference.

  • Oracle Database 10g Express Edition for Linux x86

    Hi all,
    I try to download Oracle Database 10g Express Edition (Universal) at
    http://www.oracle.com/technology/software/products/database/xe/htdocs/102xelinsoft.html
    but I get an error page. So how can I download rpm files?
    Thanks a lot.
    Kind Regards

    Ok, in fact it's very slow..
    Thanks a lot!
    I'm still not able to download.. I'will try until I get it.
    Regards,
    Lavinia

  • Pagination support for non-Oracle databases?

    Hi,
    I just read this thread (Pagination Support on pagination support. Is there any way to get pagination with non-Oracle databases? We are using an IBM iSeries / AS/400 DB2 database right now, and we're planning to use some local lightweight database in the near future as well (probably Cloudscape/Derby or "IBM Everyplace database".)
    We currently use code like this:
    String sql = "SELECT art FROM Artikel art" +
                /* dynamically generated where statement is added here */
                + "ORDER BY art.artikelNummer";
    Query q = em.createQuery(sql);
    q.setFirstResult(firstResult);
    q.setMaxResults(maxResults);If I look in the TopLink logs, I see queries like this:
    SELECT ARTNR, ARALT, ARAFJ, ARXII, ARAVJ, ARXIV, ARANJ, AHGCD, ARNVJ, ARCRJ, ARARK, ARFKJ, ARTNK, ARGP1, ASGCD, ARGP2, ARPR1, ARGP3, ARPR2, AREX1, ARPR3, AREX2, ARPR4, AREX3, ARASA, ARINA, ASSCD, ARIA1, ARBAN, ARIN1, ARBAV, ARIA2, ARBAK, ARIN2, ARCES, ARIA3, ARCDT, ARIN3, ARCRE, ARIA4, ARCWK, ARIN4, ARHBH, ARIA5, ARDFA, ARIN5, ARDFG, ARIA6, ARDOS, ARIN6, AREPW, ARINN, ARFOD, ARIAS, ARFOE, ARINS, ARFOF, ARNAB, ARFOI, ARNIB, ARFON, ARNIA, ARFOS, ARNN1, ARFTA, ARNA2, ARVIV, ARNO2, ARGAP, ARNN3, ARGPT, ARNA4, ARGPD, ARNO4, ARGPA, ARNN5, ARGPO, ARNA6, ARHIS, ARNN6, ARISP, ARNIO, ARKHM, ARNNS, MAGCD, AROVJ, MTGCD, ARPL1, ARMXM, ARPL2, MRKCD, ARPL3, ARMVR, ARVKJ, ARMIM, ARV12, ARMDT, ARVVJ, ARMTE, AR#VR, ARMTU, ARZLS, ARMTM, ARIAT, ARMWK, ARAVS, MPCCD, ARNVS, ARBTW, ARFJS, ARXI2, ARG2S, ARXI3, ARE1S, ARXI4, ARE3S, ARXI6, ARIB1, ARXI1, ARIB2, ARXI5, ARIB3, AROPI, ARIB4, ARPRV, ARIB5, SZGCD, ARIB6, ARSPC, ARINO, ARSMF, ARIOS, VEAAN, ARNIS, ARSYN, ARNO1, ARVR1, ARNA3, ARV1S, ARNN4, ARVR2, ARNO5, ARV2S, ARNIN, ARVR3, ARNOS, ARV3S, ARP1S, ARTFA, ARP3S, ARTFG, ARS12, ARUVC, ARZLD, ARUCW, ARAJS, ARBKV, ARCJS, ARVVI, ARG3S, ARVVP, ARINB, VPOCD, ARIO2, VPECD, ARIO4, ARVIH, ARIO6, ARVHG, ARNBS, ARVRW, ARNN2, ARVPR, ARNA5, ARVVR, ARNAS, ARVVS, ARP2S, ARVV1, ARSVV, ARZK1, ARNJS, ARNA1, ARNO3, ARIO1, ARNO6, ARIO5, AROJS, ARE2S, ARVJS, ARIBS, ARIAD, ARIO3, ARG1S FROM ART WHERE ((((ARUVC = 'N') AND (ARHIS = 'N')) AND (ASGCD = 7)) AND (AHGCD = 15)) ORDER BY ARTNR ASC
    (Yeah, I know we have too much columns in the table...)
    So, no pagination in the query. As you can see, we have a mechanism in place to dynamically generate a where clause. This is because the user can set filters. The problem is, if our user sets a filter that causes the result set to be significantly smaller, the performance is way better than when he sets no filter at all. We suppose this is because the whole result set is sent to TopLink, regardless of the values of firstResult and maxResults.
    We are using TopLink Essentials 2.1-10, by the way.
    Message was edited by:
    Bart Kummel

    Hi all,
    I'm trying to subclass <tt>DatabasePlatform</tt> to add pagination support for the AS/400 DB2 database of my customer. To be fair, it is not going very well so far.
    The first problem is, the query Chris found by googling (Re: Pagination support for non-Oracle databases?), does not work for AS/400s version of DB2. In fact, although it is called "DB2", the database on the AS/400 system is a whole other database than the "normal" DB2 database that runs on Windows and *nix. The AS/400 DB2 simply does not have a "ROW_NEXT" function.
    Another option would be to use the <b>row_number() over()</b> mehtod. But, as can be read here, this function is only available from version V5R4 of OS/400. And guess what? We're stuck on V5R3 at this client. (We cannot upgrade, because there's an application in use that's written in Delphi and IBM dropped the Delphi binding from V5R4...)
    So I pretty much ran out of options. On the mailing list I linked to above, someone mentions the option to make a sort of stored procedure that generates a row count number. An example of how to do this can be found here. I implemented it, and ended up with this code:
    package com.myclientsname.persistence;
    import java.sql.Connection;
    import java.sql.PreparedStatement;
    import java.sql.ResultSet;
    import java.sql.SQLException;
    import org.eclipse.persistence.expressions.ExpressionBuilder;
    import org.eclipse.persistence.internal.databaseaccess.DatabaseCall;
    import org.eclipse.persistence.internal.expressions.ExpressionSQLPrinter;
    import org.eclipse.persistence.internal.expressions.SQLSelectStatement;
    import org.eclipse.persistence.internal.sessions.AbstractSession;
    import org.eclipse.persistence.logging.SessionLog;
    import org.eclipse.persistence.platform.database.DatabasePlatform;
    import org.eclipse.persistence.sessions.SessionProfiler;
    public class AS400Platform extends DatabasePlatform {
        private static final long serialVersionUID = 0L;
        public AS400Platform(){
             super();
             super.setShouldBindAllParameters(false);
        public void printSQLSelectStatement(DatabaseCall call, ExpressionSQLPrinter printer, SQLSelectStatement statement) {
            int max = 0;
            int firstRow = 0;
            if (statement.getQuery()!=null){
                max = statement.getQuery().getMaxRows();
                firstRow = statement.getQuery().getFirstResult();
            if ( !(max>0) && !(firstRow>0) ){
                super.printSQLSelectStatement(call, printer,statement);
                return;
            } else {
                statement.setUseUniqueFieldAliases(true);
                ExpressionBuilder builder = new ExpressionBuilder();
                statement.addField(builder.getField("COUNTER() AS CNTR"));
                printer.printString("SELECT * FROM (");
                call.setFields(statement.printSQL(printer));
                printer.printString(") AS R WHERE R.CNTR >= ");
                printer.printParameter(DatabaseCall.FIRSTRESULT_FIELD);
                if ( max > 0 ){
                    // Use of binding parameters is not allowed here, so use
                    // String concatenation instead...
                    printer.printString(" FETCH FIRST " + max + " ROWS ONLY");
            call.setIgnoreFirstRowMaxResultsSettings(true);
        public boolean wasFailureCommunicationBased(SQLException exception, Connection connection, AbstractSession sessionForProfile){
            if (connection == null || this.pingSQL == null){
                //Without a connection we are  unable to determine what caused the error so return false.
                //The only case where connection will be null should be External Connection Pooling so
                //returning false is ok as there is no connection management requirement
                    //If there is no ping sql then we can not perform the ping.
                return false;
            PreparedStatement statement = null;
            try{
                sessionForProfile.startOperationProfile(SessionProfiler.ConnectionPing);
                if (sessionForProfile.shouldLog(SessionLog.FINE, SessionLog.SQL)) {// Avoid printing if no logging required.
                     sessionForProfile.log(SessionLog.FINE, SessionLog.SQL, getPingSQL(), (Object[])null, null, false);
                statement = connection.prepareStatement(getPingSQL());
                ResultSet result = statement.executeQuery();
                result.close();
                statement.close();
            }catch (SQLException ex){
                try{
                    // Had to add this check because of NullPointerExceptions
                    // (maybe a bug?)
                    if(statement != null){
                        //try to close statement again in case the query or result.close() caused an exception.
                        statement.close();
                } catch (SQLException exception2) {
                    //ignore;
                return true;
            }finally{
                sessionForProfile.endOperationProfile(SessionProfiler.ConnectionPing);
            return false;
    }(As you can see, I had to override the <tt>wasFailureCommunicationBased()</tt> method as well, due to some unexpected NPE's. (A bug, perhaps?))
    This code does work. However, the performance is not very well. The first page comes relatively fast, but as you browse further in the table, each page comes slower. I assume this is because the counter() method has to be evaluated for each row in the table.
    I have to get the performance better and constant. Does anyone have an idea how to optimize this further?
    Best regards,
    Bart Kummel

  • Implementing SQL Plan Management on Oracle Database 11.2.0.2

    Environment:
    Oracle Linux 5 update 10 (UEK)
    Oracle GI 11.2.0.2.0 (Oracle ASM 11.2.0.2)
    Oracle Database 11.2.0.2.0 Enterprise Edition with RAC option (3 nodes)
    No PSU applied/CPU July 2013 applied to RDBMS
    Database servicing Siebel CRM 8.1.1.1 Application that uses bind peeking.
    Siebel CRM soon to be version 8.1.1.11
    There are a few bugs for SQL Plan Management (SPM) on 11.2.0.2 (see below).  The slowness and non-peeked binds issues seem very problematic.  I've seen a few bloggers recommend to not use SPM unless your at Oracle Database 12c.  Several of the bugs seemed to be fixed in 11.2.0.3 but we don't have any plans to move to 11.2.0.3 since we'll most likely be at 12.1.0.x in 7 months.  Any recommendation from the community on whether I should capture and use SQL Plan Management with 11.2.0.2?  Why, why not?  If there's other relevant information needed, let me know.
    Bug 9910484 - SQL Plan Management Capture uses excessive space in SYSAUX (Doc ID 9910484.8)
    Affects:
    Product (Component) Oracle Server (Rdbms)
    Range of versions believed to be affected Versions >= 11.1 but BELOW 12.1
    Versions confirmed as being affected
    •11.2.0.2
    •11.2.0.1
    •11.1.0.7
    Platforms affected Generic (all / most platforms affected)
    Fixed:
    •12.1.0.1 (Base Release)
    •11.2.0.3 (Server Patch Set)
    •11.2.0.2 Patch 4 on Windows Platforms
    •11.1.0.7 Patch 41 on Windows Platforms
    Bug 11719151 - SQL Plan Management capture causes slowness (Doc ID 11719151.8)
    Affects:
    Product (Component) Oracle Server (Rdbms)
    Range of versions believed to be affected Versions >= 11.2.0.2 but BELOW 12.1
    Versions confirmed as being affected
    •11.2.0.2
    Platforms affected Generic (all / most platforms affected)
    Fixed:
    •12.1.0.1 (Base Release)
    •11.2.0.3 (Server Patch Set)
    •11.2.0.2 Patch 22 on Windows Platforms
    Bug 9942454 - DBMS_SPM.LOAD_PLANS_FROM_SQLSET gets XML parsing error (Doc ID 9942454.8)
    Affects:
    Product (Component) Oracle Server (Rdbms)
    Range of versions believed to be affected Versions BELOW 12.1
    Versions confirmed as being affected
    •11.2.0.2
    •11.2.0.1
    •11.1.0.7
    Platforms affected Generic (all / most platforms affected)
    Fixed:
    •12.1.0.1 (Base Release)
    •11.2.0.3 (Server Patch Set)
    Bug 12732879 - Execution Plan of Query with non-peeked binds is not reproducible (Doc ID 12732879.8)
    Affects:
    Product (Component) Oracle Server (Rdbms)
    Range of versions believed to be affected Versions >= 9.2 but BELOW 12.1
    Versions confirmed as being affected
    •11.2.0.3
    •11.2.0.2
    •11.1.0.7
    Platforms affected Generic (all / most platforms affected)
    Fixed:
    •12.1.0.1 (Base Release)
    •11.2.0.4 (Future Patch Set)
    Bug 11687175 - High DFS lock handle waits in the database with SPM if FIXED_DATE is set (Doc ID 11687175.8)
    Affects:
    Product (Component) Oracle Server (Rdbms)
    Range of versions believed to be affected Versions >= 11 but BELOW 12.1
    Versions confirmed as being affected
    11.2.0.2
    11.2.0.1
    11.1.0.7
    11.1.0.6
    Platforms affected Generic (all / most platforms affected)
    Fixed:
    12.1.0.1 (Base Release)
    11.2.0.3 (Server Patch Set)
    Bug 13384234  ORA-29981 with select query with database Change notification
    Affects:
    Product (Component) Oracle Server (Rdbms)
    Range of versions believed to be affected Versions BELOW 12.1
    Versions confirmed as being affected
    11.2.0.2
    Platforms affected Generic (all / most platforms affected)
    Fixed:
    11.2.0.4 (Future Patch Set)
    Thanks so much.

    See these MOS Docs
    11.2.0.2 Patch Set - Availability and Known Issues (Doc ID 1179474.1)
    Important Changes to Oracle Database Patch Sets Starting With 11.2.0.2 (Doc ID 1189783.1)
    HTH
    Srini

  • What are the differences between the following Oracle database views?

    What are the differences between the following Oracle database views(or function)? Can they be instead of each other? Can all of them be used to pull out the execution plan from the library cache?
    V$SQL_PLAN
    DBA_HIST_SQL_PLAN
    dbms_xplan.display_cursor function

    junez wrote:
    What are the differences between the following Oracle database views(or function)? Can they be instead of each other? Can all of them be used to pull out the execution plan from the library cache?
    V$SQL_PLAN
    DBA_HIST_SQL_PLAN
    dbms_xplan.display_cursor functionV$SQL_PLAN-this is dynamic perfomance view which contain execution plan information for each child cursor loaded in the library cache.
    DBA_HIST_SQL_PLAN- data dictionary view also contain execution plan information for each child cursor bun in workload repository.Actually this view captures information from V$SQL_PLAN and is used with the DBA_HIST_SQLSTAT .
    dbms_xplan.display_cursor - function displays explain plan of any cursor loaded in the cursor cache. See more information below links:
    http://youngcow.net/doc/oracle10g/server.102/b14237/dynviews_2120.htm
    http://download.oracle.com/docs/cd/B14117_01/server.101/b10755/statviews_2154.htm
    http://download.oracle.com/docs/cd/B12037_01/appdev.101/b10802/d_xplan.htm#998179

Maybe you are looking for

  • Adobe Premiere Elements 0.9 project crash, HELP!

    This is the first time I am using these forums, so I hope I posted this in the right sektions. I need help and solutions for a Project which constantly crashes on my Adobe Premiere Elements 0.9. This program has been awesome and helped me create some

  • Java 6 update 3 changes

    Hi, I have been using my applet software now many years. It uses socket to connect server. After I downloaded this new Java update 1.6.0_03-b05 my software stop to working. Now I get errors to console: App1: java.security.AccessControlException: acce

  • Podcasts Gone

    Since the itunes upgrade I lost my podcasts, can't seem to get them back, any ideas?

  • My skype is logged in on someone elses phone ,i do...

    To contact customer services online, it states you must know the exact month and year you signed up to skype, i have no idea. So firstly, does anyone know how to find out the sign up date? Someone i know but have no contact with is logged into my sky

  • How can I take an item from one image and move it to another image?

    How can I take an item from one image and add it to another image, and rotate it to fit?