Performance degradation in Update statement

Hi
I have a table t1 with 3 of the columns as :- c1 ,c2,c3.
there is a non unique index on c2 ,c3.
I am using an update statement as : update t1 set c1="value" where c2="some_value" and c3="some_value2" ;
this works fine in case the number of rows for the same c2 and c3 are less (~100) but takes a large time when ~30,000.
And it has to be run many times in my application (time out is occuring now)
Can anybody suggest a solution ?
Thanks
Message was edited by:
user580975

First off, setting a table to NOLOGGING does not affect the rate of redo generation unless you are also doing direct-path inserts (which is obviously not the case here and which come with their own set of issues). Note that the amount of redo being generated in these two examples is quite similar.
SCOTT @ jcave102 Local> create table all_obj_cpy as select * from all_objects;
Table created.
Elapsed: 00:00:10.78
SCOTT @ jcave102 Local> set autotrace traceonly;
SCOTT @ jcave102 Local> alter table all_obj_cpy logging;
Table altered.
Elapsed: 00:00:00.01
SCOTT @ jcave102 Local> update all_obj_cpy
  2  set last_ddl_time = sysdate - 1;
42511 rows updated.
Elapsed: 00:00:01.45
Execution Plan
Plan hash value: 1645016300
| Id  | Operation          | Name        | Rows  | Bytes | Cost (%CPU)| Time     |
|   0 | UPDATE STATEMENT   |             | 43776 |   384K|   137   (3)| 00:00:02 |
|   1 |  UPDATE            | ALL_OBJ_CPY |       |       |            |          |
|   2 |   TABLE ACCESS FULL| ALL_OBJ_CPY | 43776 |   384K|   137   (3)| 00:00:02 |
Note
   - dynamic sampling used for this statement
Statistics
        556  recursive calls
      46075  db block gets
       1558  consistent gets
          0  physical reads
   13575764  redo size
        924  bytes sent via SQL*Net to client
        965  bytes received via SQL*Net from client
          6  SQL*Net roundtrips to/from client
          6  sorts (memory)
          0  sorts (disk)
      42511  rows processed
SCOTT @ jcave102 Local> alter table all_obj_cpy nologging;
Table altered.
Elapsed: 00:00:00.01
SCOTT @ jcave102 Local> update all_obj_cpy
  2  set last_ddl_time = sysdate - 2;
42511 rows updated.
Elapsed: 00:00:01.32
Execution Plan
Plan hash value: 1645016300
| Id  | Operation          | Name        | Rows  | Bytes | Cost (%CPU)| Time     |
|   0 | UPDATE STATEMENT   |             | 43776 |   384K|   137   (3)| 00:00:02 |
|   1 |  UPDATE            | ALL_OBJ_CPY |       |       |            |          |
|   2 |   TABLE ACCESS FULL| ALL_OBJ_CPY | 43776 |   384K|   137   (3)| 00:00:02 |
Note
   - dynamic sampling used for this statement
Statistics
        561  recursive calls
      44949  db block gets
       1496  consistent gets
          0  physical reads
   12799600  redo size
        924  bytes sent via SQL*Net to client
        965  bytes received via SQL*Net from client
          6  SQL*Net roundtrips to/from client
          6  sorts (memory)
          0  sorts (disk)
      42511  rows processedSecond, if you did manage to do an unlogged operation, make absolutely certain you understand the recovery implications. You must do a complete backup of the database after an unlogged operation or the table will not be recovered in the event of a database failure. If you have a standby database for disaster recovery, unlogged operations would cause the standby to be useless (hence the option to force logging at the tablespace and/or database level).
While it's certainly possible that this is an Oracle server configuration problem, it would be relatively tough to configure a system so that a 30,000 row update would force excessive log switches. If it were a configuration problem, you'd expect that any update of 30,000 rows would be slow and that multiple sessions running smaller updates would also be slow, but I don't believe that describes the symptoms the original poster is concerned about.
Justin

Similar Messages

  • Severe performance degradation after update/clean install of 10.10 Yosemite

    Hello, Apple Community.
    I am submitting this general complaint in the name of myself and of my friend. We both have rather fresh MacBooks (15" Early 2014 with 2,5 GHz Core i7 and Late 2013 with 2,3 GHz Core i7, both with GeForce 750M as dedicated GPU).
    I decided to upgrade my (flawlessly running) Mavericks while my friend performed the clean install.
    Now we both experience serious performance degradation (in comparison to 10.9), visible especially in very low framerate of most of system UI animations (the worst are: showing/hiding mission control, switching spaces, displaying/hiding folder stacks - but the simple ones like magnifying the dock tend to stutter as well).
    Beside that, there are many fades (like the one between the login screen and the desktop or the one between the main screen of system preferences overview and particular settings panes) that often get distorted - it seems to be the issue connected with retina scaling (I am using the 1920x1200 mode), since both login screen and settings seem to be showing some parts of UI improperly magnified or zoomed that suddenly "skip" to their adequate proportions.
    Summing up - I am really unhappy with my initial 10.10 experiences, especially since I used to consider my hardware rather hi-end - the worst thing being that Yosemite runs on my friend's 2012 Mac Mini flawlessly.
    Do any of you guys experience the same issues with 10.10 and your rMBPs? Maybe just those of us with dedicated graphics?

    Hello Richard:
    As a side note, there is no such thing as a +"clean install."+ Apple changed that terminology to +"erase and install"+ several years ago.
    I am not sure if what you describe would work. Unless the new owner does not have broadband service, there is no reason why they cannot install your version of OS X 10.5 and then run software update when they get the system. I vaguely recall that when one does an erase and install the system prompts for passwords, etc at that time.
    I think I would erase the HD and then let the new owner go from there.
    Barry

  • IPhone 3G performance degrades after update to iOS4

    Another log on the fire - for the first time since I bought my iPhone 3G I am unhappy with it. Not only did the update to iOS4 significantly degrade the performance/responsiveness of my iPhone, but I also have no backup to revert back to. The update process within iTunes performed a backup of my phone before the iOS4 update, and after the update was completed (4-6 hours later) the backup of 3.1.3 was gone.

    I have to agree with pego19.
    I UNFORTUNATE was foolish enough to install iOS 4 on my iPhone 3G. Now I feel it is totally unusable due to slowness and crashing. I've actually had mail and SMS apps crash on me, as well as the whole phone to freeze forcing me to reset it. Something I cannot recall ever doing in the the 20 months of owning it.
    I am desperately trying to search ways to return to iOS 3, or preferrably iOS 2 (that it came with), as that was FAST. If that is not possible, I will have just forget about the iPhone and look for an alternative. I'm definately not going to buy a new iPhone, as this is more likely to happen again with it.
    What I don't undestand why I cannot just put the original iOS back to the phone that it came out with. Just as I can always restore any Mac to the original condition that it came in?
    And yes, my iPhone has never been jailbroken. It has always been unlocked by Apple since new (bought it while living in Brussels), so I have never needed to bother tinkering with it.

  • Long running update statement needs a performance improve.

    Hi,
    I have the following update statement which runs for over 3 hours and updates 215 million rows, is there anyway I can rewrite it so it performs better?
    UPDATE TABLE1 v
            SET closs = (SELECT MIN(slloss)
                               FROM TABLE2 l
            WHERE polnum = slpoln
            AND      polren = slrenn
            AND      polseq = slseqn
            AND      vehnum = slvehn
            AND      linecvg = sllcvg);Here is the execution plan:
    PLAN_TABLE_OUTPUT
    | Id  | Operation                     | Name        | Rows  | Bytes | Cost (%CPU)|
    |   0 | UPDATE STATEMENT              |             |   214M|  4291M|  2344K  (2)|
    |   1 |  UPDATE                       | TABLE1      |       |       |            |
    |   2 |   TABLE ACCESS FULL           | TABLE1      |   214M|  4291M|  2344K  (2)|
    |   3 |   SORT AGGREGATE              |             |     1 |    21 |            |
    |   4 |    TABLE ACCESS BY INDEX ROWID| TABLE2      |     1 |    21 |     5   (0)|
    |   5 |     INDEX RANGE SCAN          | TABLE2_N2   |     2 |       |     3   (0)|
    ----------------------------------------------------------------------------------Here are create table statements for TABLE1(215million rows) and TABLE2(1million rows):
    CREATE TABLE  TABLE2 (SLCLMN VARCHAR2(11 byte),
        SLFEAT NUMBER(2), SLPOLN NUMBER(9), SLRENN NUMBER(2),
        SLSEQN NUMBER(2), SLVEHN NUMBER(2), SLDRVN NUMBER(2),
        SLCVCD VARCHAR2(6 byte), SLLCVG NUMBER(4), SLSABB
        VARCHAR2(2 byte), SLPRCD VARCHAR2(3 byte), SLRRDT
        NUMBER(8), SLAYCD NUMBER(7), SLCITY VARCHAR2(28 byte),
        SLZIP5 NUMBER(5), SLCEDING VARCHAR2(1 byte), SLCEDELOSS
        VARCHAR2(1 byte), SLRISKTYPE VARCHAR2(1 byte), SLVEHDESIG
        VARCHAR2(1 byte)) 
        TABLESPACE S_DATA PCTFREE 10 PCTUSED 0 INITRANS 1
        MAXTRANS 255
        STORAGE ( INITIAL 106496K NEXT 0K MINEXTENTS 1 MAXEXTENTS
        2147483645 PCTINCREASE 0)
        NOLOGGING
        MONITORING;
    CREATE TABLE  TABLE1 (POLNUM NUMBER(9) NOT NULL,
        POLREN NUMBER(2) NOT NULL, POLSEQ NUMBER(2) NOT NULL,
        VEHNUM NUMBER(2) NOT NULL, CVGCODE VARCHAR2(8 byte) NOT
        NULL, LINECVG NUMBER(4), MAINVEH CHAR(1 byte), MAINCVG
        CHAR(1 byte), CVGLIMIT VARCHAR2(13 byte), CVGDED
        VARCHAR2(10 byte), FULLCVG CHAR(1 byte), CVGGRP CHAR(4
        byte), CYCVG CHAR(1 byte), POLTYPE CHAR(1 byte),
        CHANNEL CHAR(2 byte), UWTIER VARCHAR2(6 byte), SUBTIER
        VARCHAR2(6 byte), THITIER VARCHAR2(3 byte), COMPGRP
        VARCHAR2(8 byte), PRODGRP VARCHAR2(6 byte), UWSYS
        VARCHAR2(6 byte), BRAND VARCHAR2(8 byte), COMP NUMBER(2),
        STATE CHAR(2 byte), PROD CHAR(3 byte), RRDATE DATE,
        STATENUM NUMBER(2), EFT_BP CHAR(1 byte), AGYCODE
        NUMBER(7), AGYSUB CHAR(3 byte), AGYCLASS CHAR(1 byte),
        CLMAGYCODE NUMBER(7), AGYALTCODE VARCHAR2(25 byte),
        AGYRELATION VARCHAR2(10 byte), RATECITY VARCHAR2(28 byte),
        RATEZIP NUMBER(5), RATETERR NUMBER, CURTERR NUMBER,
        CURRRPROD CHAR(6 byte), CURRRDATE DATE, RATESYMB NUMBER,
        SYMBTYPE CHAR(1 byte), CVGTERR NUMBER(3), CVGSYMB
        NUMBER(3), VEHTERR NUMBER, VEHYEAR NUMBER, VEHMAKE
        VARCHAR2(6 byte), VEHMODEL VARCHAR2(10 byte), VEHSUBMOD
        VARCHAR2(10 byte), VEHBODY VARCHAR2(6 byte), VEHVIN
        VARCHAR2(10 byte), VEHAGE NUMBER(3), VEHSYMB NUMBER,
        DRVNUM NUMBER, DUMMYDRV CHAR(1 byte), DRVAGE NUMBER(3),
        DRVSEX VARCHAR2(1 byte), DRVMS VARCHAR2(1 byte), DRVPTS
        NUMBER(3), DRVPTSDD NUMBER(3), DRVGRP CHAR(7 byte),
        DRVSR22 VARCHAR2(1 byte), DRVVTIER CHAR(2 byte),
        BUSUSESUR CHAR(1 byte), EXCLDRVSUR CHAR(1 byte),
        CSCODED NUMBER(5), CSACTUAL NUMBER(5), CSOVERRD
        NUMBER(5), ANNMILES NUMBER(6), DLORIGDATE DATE,
        DLLASTDATE DATE, DLMONTHS NUMBER(6), MATUREDSC CHAR(1
        byte), PERSISTDSC CHAR(1 byte), ANNUALMILES_RANGE
        VARCHAR2(25 byte), CEDEDLOSS VARCHAR2(1 byte), CEDEDPOL
        VARCHAR2(1 byte), CEDEDCVG VARCHAR2(1 byte),
        CONSTRAINT TABLE1_PK PRIMARY KEY(POLNUM, POLREN,
        POLSEQ, VEHNUM, CVGCODE)
        USING INDEX 
        TABLESPACE V_INDEX
        STORAGE ( INITIAL 3874816K NEXT 0K MINEXTENTS 1 MAXEXTENTS
        2147483645 PCTINCREASE 0) PCTFREE 10 INITRANS 2 MAXTRANS 255)
        TABLESPACE U_DATA PCTFREE 10 PCTUSED 0 INITRANS 1
        MAXTRANS 255
        STORAGE ( INITIAL 4194304K NEXT 0K MINEXTENTS 1 MAXEXTENTS
        2147483645 PCTINCREASE 0)
        NOLOGGING
        MONITORING;Thank you very much!

    user6053424 wrote:
    Hi,
    I have the following update statement which runs for over 3 hours and updates 215 million rows, is there anyway I can rewrite it so it performs better?
    UPDATE TABLE1 v
    SET closs = (SELECT MIN(slloss)
    FROM TABLE2 l
    WHERE polnum = slpoln
    AND      polren = slrenn
    AND      polseq = slseqn
    AND      vehnum = slvehn
    AND      linecvg = sllcvg);
    Are you trying to perform a correlated update? If so, you can perform something similar to;
    Sample data;
    create table t1 as (
       select 1 id, 10 val from dual union all
       select 1 id, 10 val from dual union all
       select 2 id, 10 val from dual union all
       select 2 id, 10 val from dual union all
       select 2 id, 10 val from dual);
    Table created
    create table t2 as (
       select 1 id, 100 val from dual union all
       select 1 id, 200 val from dual union all
       select 2 id, 500 val from dual union all
       select 2 id, 600 val from dual);
    Table createdThe MERGE will update each row based on the maximum for each ID;
    merge into t1
    using (select id, max(val) max_val
           from t2
           group by id) subq
    on (t1.id = subq.id)
    when matched then update
        set t1.val = subq.max_val;
    Done
    select * from t1;
            ID        VAL
             1        200
             1        200
             2        600
             2        600
             2        600If you want all rows updated to the same value then remove the ID grouping from the subquery and from the ON clause.

  • Performance Issue: Update Statement

    Hi Team,
    My current environment is Oracle 11g Rac...
    My application team is executing a update statement (ofcourse it is there daily activity) ...
    updating rows of 1 lac, daily it takes about 3-4 minutes to run the statement.
    But today its taking more time i.e more than 8 hours.
    then I have generated the explain plan of the update statement and found that its taking full table scan.
    Kindly assist me in fixing the issue by letting me know where and how to look for the problem.
    **Note: Stats gather is updated
    Thanks in advance.
    Regards

    If you notice there are no indexes to the below update statement -
    UPDATE REMEDY_JOURNALS_FACT SET JNL_CREATED_BY_IDENTITY_KEY = ?, JNL_CREATED_BY_HR_KEY = ?, JNL_CREATED_BY_NTWRK_KEY = ?, JNL_MODIFIED_BY_IDENTITY_KEY = ?, JNL_MODIFIED_BY_HR_KEY = ?, JNL_MODIFIED_BY_NTWRK_KEY = ?, JNL_ASSGN_TO_IDENTITY_KEY = ?, JNL_ASSGN_TO_HR_KEY = ?, JNL_ASSGN_TO_NTWRK_KEY = ?, JNL_REMEDY_STATUS_KEY = ?, JOURNALID = ?, JNL_DATE_CREATED = ?, JNL_DATE_MODIFIED = ?, ENTRYTYPE = ?, TMPTEMPDATETIME1 = ?, RELATEDFORMNAME = ?, RELATED_RECORDID = ?, RELATEDFORMKEYWORD = ?, TMPRELATEDRECORDID = ?, ACCESS_X = ?, JOURNAL_TEXT = ?, DATE_X = ?, SHORTDESCRIPTION = ?, TMPCREATEDBY = ?, TMPCREATE_DATE = ?, TMPLASTMODIFIEDBY = ?, TMPMODIFIEDDATE = ?, TMPJOURNALID = ?, JNL_JOURNALTYPE = ?, COPIEDTOWORKLOG = ?, PRIVATE = ?, RELATEDKEYSTONEID = ?, URLLOCATION = ?, ASSIGNEEGROUP = ?, LAST_UPDATE_DT = ? WHERE REMEDY_JOURNALS_KEY = ?
    Explain Plan -
    | Id | Operation | Name | Rows | Bytes | Cost (%CPU)| Time | Pstart| Pstop | TQ |IN-OUT| PQ Distrib |
    | 0 | UPDATE STATEMENT | | | | 1055 (100)| | | | | | |
    | 1 | UPDATE | REMEDY_JOURNALS_FACT | | | | | | | | | |
    | 2 | PX COORDINATOR | | | | | | | | | | |
    | 3 | PX SEND QC (RANDOM) | :TQ10000 | 1 | 784 | 1055 (1)| 00:00:05 | | | Q1,00 | P->S | QC (RAND) |
    | 4 | PX BLOCK ITERATOR | | 1 | 784 | 1055 (1)| 00:00:05 | 1 | 10 | Q1,00 | PCWC | |
    |* 5 | TABLE ACCESS STORAGE FULL| REMEDY_JOURNALS_FACT | 1 | 784 | 1055 (1)| 00:00:05 | 1 | 10 | Q1,00 | PCWP | |
    Predicate Information (identified by operation id):
    5 - storage(:Z>=:Z AND :Z<=:Z AND "REMEDY_JOURNALS_KEY"=:36) filter("REMEDY_JOURNALS_KEY"=:36)
    Note
    - automatic DOP: skipped because of IO calibrate statistics are missing
    Edited by: GeetaM on Aug 17, 2012 2:18 PM

  • When table with clustered columnstore indexe is partitioned the performance degrades if data is located in multiple partitions

    Hello,
    Below I provide a complete code to re-produce the behavior I am observing.  You could run it in tempdb or any other database, which is not important.  The test query provided at the top of the script is pretty silly, but I have observed the same
    performance degradation with about a dozen of various queries of different complexity, so this is just the simplest one I am using as an example here. Note that I also included approximate run times in the script comments (this is obviously based on what I
    observed on my machine).  Here are the steps with numbers corresponding to the numbers in the script:
    1. Run script from #1 to #7.  This will create the two test tables, populate them with records (40 mln. and 10 mln.) and build regular clustered indexes.
    2. Run test query (at the top of the script).  Here are the execution statistics:
    Table 'Main'. Scan count 5, logical reads 151435, physical reads 0, read-ahead reads 4, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
    Table 'Txns'. Scan count 5, logical reads 74155, physical reads 0, read-ahead reads 7, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
    Table 'Workfile'. Scan count 0, logical reads 0, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
    Table 'Worktable'. Scan count 0, logical reads 0, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
     SQL Server Execution Times:
       CPU time = 5514 ms, 
    elapsed time = 1389 ms.
    3. Run script from #8 to #9. This will replace regular clustered indexes with columnstore clustered indexes.
    4. Run test query (at the top of the script).  Here are the execution statistics:
    Table 'Txns'. Scan count 4, logical reads 44563, physical reads 0, read-ahead reads 37186, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
    Table 'Main'. Scan count 4, logical reads 54850, physical reads 2, read-ahead reads 96862, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
    Table 'Worktable'. Scan count 0, logical reads 0, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
    Table 'Workfile'. Scan count 0, logical reads 0, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
     SQL Server Execution Times:
       CPU time = 828 ms, 
    elapsed time = 392 ms.
    As you can see the query is clearly faster.  Yay for columnstore indexes!.. But let's continue.
    5. Run script from #10 to #12 (note that this might take some time to execute).  This will move about 80% of the data in both tables to a different partition.  You should be able to see the fact that the data has been moved when running Step #
    11.
    6. Run test query (at the top of the script).  Here are the execution statistics:
    Table 'Txns'. Scan count 4, logical reads 44563, physical reads 0, read-ahead reads 37186, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
    Table 'Main'. Scan count 4, logical reads 54817, physical reads 2, read-ahead reads 96862, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
    Table 'Worktable'. Scan count 0, logical reads 0, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
    Table 'Workfile'. Scan count 0, logical reads 0, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
     SQL Server Execution Times:
       CPU time = 8172 ms, 
    elapsed time = 3119 ms.
    And now look, the I/O stats look the same as before, but the performance is the slowest of all our tries!
    I am not going to paste here execution plans or the detailed properties for each of the operators.  They show up as expected -- column store index scan, parallel/partitioned = true, both estimated and actual number of rows is less than during the second
    run (when all of the data resided on the same partition).
    So the question is: why is it slower?
    Thank you for any help!
    Here is the code to re-produce this:
    --==> Test Query - begin --<===
    DBCC DROPCLEANBUFFERS
    DBCC FREEPROCCACHE
    SET STATISTICS IO ON
    SET STATISTICS TIME ON
    SELECT COUNT(1)
    FROM Txns AS z WITH(NOLOCK)
    LEFT JOIN Main AS mmm WITH(NOLOCK) ON mmm.ColBatchID = 70 AND z.TxnID = mmm.TxnID AND mmm.RecordStatus = 1
    WHERE z.RecordStatus = 1
    --==> Test Query - end --<===
    --===========================================================
    --1. Clean-up
    IF OBJECT_ID('Txns') IS NOT NULL DROP TABLE Txns
    IF OBJECT_ID('Main') IS NOT NULL DROP TABLE Main
    IF EXISTS (SELECT 1 FROM sys.partition_schemes WHERE name = 'PS_Scheme') DROP PARTITION SCHEME PS_Scheme
    IF EXISTS (SELECT 1 FROM sys.partition_functions WHERE name = 'PF_Func') DROP PARTITION FUNCTION PF_Func
    --2. Create partition funciton
    CREATE PARTITION FUNCTION PF_Func(tinyint) AS RANGE LEFT FOR VALUES (1, 2, 3)
    --3. Partition scheme
    CREATE PARTITION SCHEME PS_Scheme AS PARTITION PF_Func ALL TO ([PRIMARY])
    --4. Create Main table
    CREATE TABLE dbo.Main(
    SetID int NOT NULL,
    SubSetID int NOT NULL,
    TxnID int NOT NULL,
    ColBatchID int NOT NULL,
    ColMadeId int NOT NULL,
    RecordStatus tinyint NOT NULL DEFAULT ((1))
    ) ON PS_Scheme(RecordStatus)
    --5. Create Txns table
    CREATE TABLE dbo.Txns(
    TxnID int IDENTITY(1,1) NOT NULL,
    GroupID int NULL,
    SiteID int NULL,
    Period datetime NULL,
    Amount money NULL,
    CreateDate datetime NULL,
    Descr varchar(50) NULL,
    RecordStatus tinyint NOT NULL DEFAULT ((1))
    ) ON PS_Scheme(RecordStatus)
    --6. Populate data (credit to Jeff Moden: http://www.sqlservercentral.com/articles/Data+Generation/87901/)
    -- 40 mln. rows - approx. 4 min
    --6.1 Populate Main table
    DECLARE @NumberOfRows INT = 40000000
    INSERT INTO Main (
    SetID,
    SubSetID,
    TxnID,
    ColBatchID,
    ColMadeID,
    RecordStatus)
    SELECT TOP (@NumberOfRows)
    SetID = ABS(CHECKSUM(NEWID())) % 500 + 1, -- ABS(CHECKSUM(NEWID())) % @Range + @StartValue,
    SubSetID = ABS(CHECKSUM(NEWID())) % 3 + 1,
    TxnID = ABS(CHECKSUM(NEWID())) % 1000000 + 1,
    ColBatchId = ABS(CHECKSUM(NEWID())) % 100 + 1,
    ColMadeID = ABS(CHECKSUM(NEWID())) % 500000 + 1,
    RecordStatus = 1
    FROM sys.all_columns ac1
    CROSS JOIN sys.all_columns ac2
    --6.2 Populate Txns table
    -- 10 mln. rows - approx. 1 min
    SET @NumberOfRows = 10000000
    INSERT INTO Txns (
    GroupID,
    SiteID,
    Period,
    Amount,
    CreateDate,
    Descr,
    RecordStatus)
    SELECT TOP (@NumberOfRows)
    GroupID = ABS(CHECKSUM(NEWID())) % 5 + 1, -- ABS(CHECKSUM(NEWID())) % @Range + @StartValue,
    SiteID = ABS(CHECKSUM(NEWID())) % 56 + 1,
    Period = DATEADD(dd,ABS(CHECKSUM(NEWID())) % 365, '05-04-2012'), -- DATEADD(dd,ABS(CHECKSUM(NEWID())) % @Days, @StartDate)
    Amount = CAST(RAND(CHECKSUM(NEWID())) * 250000 + 1 AS MONEY),
    CreateDate = DATEADD(dd,ABS(CHECKSUM(NEWID())) % 365, '05-04-2012'),
    Descr = REPLICATE(CHAR(65 + ABS(CHECKSUM(NEWID())) % 26), ABS(CHECKSUM(NEWID())) % 20),
    RecordStatus = 1
    FROM sys.all_columns ac1
    CROSS JOIN sys.all_columns ac2
    --7. Add PK's
    -- 1 min
    ALTER TABLE Txns ADD CONSTRAINT PK_Txns PRIMARY KEY CLUSTERED (RecordStatus ASC, TxnID ASC) ON PS_Scheme(RecordStatus)
    CREATE CLUSTERED INDEX CDX_Main ON Main(RecordStatus ASC, SetID ASC, SubSetId ASC, TxnID ASC) ON PS_Scheme(RecordStatus)
    --==> Run test Query --<===
    --===========================================================
    -- Replace regular indexes with clustered columnstore indexes
    --===========================================================
    --8. Drop existing indexes
    ALTER TABLE Txns DROP CONSTRAINT PK_Txns
    DROP INDEX Main.CDX_Main
    --9. Create clustered columnstore indexes (on partition scheme!)
    -- 1 min
    CREATE CLUSTERED COLUMNSTORE INDEX PK_Txns ON Txns ON PS_Scheme(RecordStatus)
    CREATE CLUSTERED COLUMNSTORE INDEX CDX_Main ON Main ON PS_Scheme(RecordStatus)
    --==> Run test Query --<===
    --===========================================================
    -- Move about 80% the data into a different partition
    --===========================================================
    --10. Update "RecordStatus", so that data is moved to a different partition
    -- 14 min (32002557 row(s) affected)
    UPDATE Main
    SET RecordStatus = 2
    WHERE TxnID < 800000 -- range of values is from 1 to 1 mln.
    -- 4.5 min (7999999 row(s) affected)
    UPDATE Txns
    SET RecordStatus = 2
    WHERE TxnID < 8000000 -- range of values is from 1 to 10 mln.
    --11. Check data distribution
    SELECT
    OBJECT_NAME(SI.object_id) AS PartitionedTable
    , DS.name AS PartitionScheme
    , SI.name AS IdxName
    , SI.index_id
    , SP.partition_number
    , SP.rows
    FROM sys.indexes AS SI WITH (NOLOCK)
    JOIN sys.data_spaces AS DS WITH (NOLOCK)
    ON DS.data_space_id = SI.data_space_id
    JOIN sys.partitions AS SP WITH (NOLOCK)
    ON SP.object_id = SI.object_id
    AND SP.index_id = SI.index_id
    WHERE DS.type = 'PS'
    AND OBJECT_NAME(SI.object_id) IN ('Main', 'Txns')
    ORDER BY 1, 2, 3, 4, 5;
    PartitionedTable PartitionScheme IdxName index_id partition_number rows
    Main PS_Scheme CDX_Main 1 1 7997443
    Main PS_Scheme CDX_Main 1 2 32002557
    Main PS_Scheme CDX_Main 1 3 0
    Main PS_Scheme CDX_Main 1 4 0
    Txns PS_Scheme PK_Txns 1 1 2000001
    Txns PS_Scheme PK_Txns 1 2 7999999
    Txns PS_Scheme PK_Txns 1 3 0
    Txns PS_Scheme PK_Txns 1 4 0
    --12. Update statistics
    EXEC sys.sp_updatestats
    --==> Run test Query --<===

    Hello Michael,
    I just simulated the situation and got the same results as in your description. However, I did one more test - I rebuilt the two columnstore indexes after the update (and test run). I got the following details:
    Table 'Txns'. Scan count 8, logical reads 12922, physical reads 1, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
    Table 'Main'. Scan count 8, logical reads 57042, physical reads 1, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
    Table 'Worktable'. Scan count 0, logical reads 0, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
    Table 'Workfile'. Scan count 0, logical reads 0, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
    Table 'Worktable'. Scan count 0, logical reads 0, physical reads 0, read-ahead reads 0, lob logical reads 0, lob physical reads 0, lob read-ahead reads 0.
    SQL Server Execution Times:
    CPU time = 251 ms, elapsed time = 128 ms.
    As an explanation of the behavior - because of the UPDATE statement in CCI is executed as a DELETE and INSERT operation, you had all original row groups of the index with almost all data deleted and almost the same amount of new row groups with new data
    (coming from the update). I suppose scanning the deleted bitmap caused the additional slowness at your end or something related with that "fragmentation". 
    Ivan Donev MCITP SQL Server 2008 DBA, DB Developer, BI Developer

  • Is their any limit on the number of column updates in a update statement!

    Hello All,
    Is their any limit on the number of columns to set in a single update statement.+
    am using oracle 11g .
    example :-
    UPDATE FMLY SET as_comp1 = v_as_comp1 , as_comp2 = v_as_comp2, as_comp3 = v_as_comp3, as_comp4 = v_as_comp4 , as_comp5 = v_as_comp5 ,      perslt18 = v_perslt18 , persot64  = v_persot64  , fam_size = v_fam_size , numchild = total_children , C_AGE1 = v_c_age1,  C_AGE2 = v_c_age2,  C_AGE3 = v_c_age3,  C_AGE4 = v_c_age4 WHERE FAMID = fmly_famid(i) ;
    and also is it good practice to issue single update or multiple updates ?
    example for the above update i can have multiple statements like .. does the performance matters if so which is good
    UPDATE FMLY SET as_comp1 = v_as_comp1 , as_comp2 = v_as_comp2, as_comp3 = v_as_comp3, as_comp4 = v_as_comp4 , as_comp5 = v_as_comp5
    WHERE FAMID = fmly_famid(i) ;
    UPDATE FMLY SET perslt18 = v_perslt18 , persot64 = v_persot64 , fam_size = v_fam_size
    WHERE FAMID = fmly_famid(i) ;
    UPDATE FMLY SET numchild = total_children WHERE FAMID = fmly_famid(i) ;
    UPDATE FMLY SET C_AGE1 = v_c_age1, C_AGE2 = v_c_age2, C_AGE3 = v_c_age3, C_AGE4 = v_c_age4 WHERE FAMID = fmly_famid(i) ;
    thanks/kumar
    Edited by: kumar73 on Sep 25, 2010 8:38 AM

    If you can do it in a single SQL statement then you should do that.
    Here's a mantra that I found to work out pretty good:
    http://asktom.oracle.com/pls/apex/f?p=100:11:0::::P11_QUESTION_ID:73891904732164

  • Performance degradation with addition of unicasting option

    We have been using the multi-casting protocol for setting up the data grid between the application nodes with the vm arguments as
    *-Dtangosol.coherence.clusteraddress=${Broadcast Address} -Dtangosol.coherence.clusterport=${Broadcast port}*
    As the certain node in the application was expected in a different sub net and multi-casting was not feasible, we opted for well known addressing with following additional VM arguments setup in the server nodes(all in the same subnet)
    *-Dtangosol.coherence.machine=${server_name} -Dtangosol.coherence.wka=${server_ip} -Dtangosol.coherence.localport=${server_port}*
    and the following in the remote client node that point to one of the server node like this
    *-Dtangosol.coherence.wka=${server_ip} -Dtangosol.coherence.wka.port=${server_port}*
    But this deteriorated the performance drastically both in pushing data into the cache and getting events via map listener.
    From the coherence logging statements it doesn't seems that multi-casting is getting used atleast with in the server nodes(which are in the same subnet).
    Is it feasible to have both uni-casting and multi-casting to coexist? How to verify if it is setup already?
    Is performance degradation in well-known addressing is a limitation and expected?

    Hi Mahesh,
    From your description it sounds as if you've configured each node with a wka list just including it self. This would result in N rather then 1 clusters. Your client would then be serviced by the resources of just a single cache server rather then an entire cluster. If this is the case you will see that all nodes are identified as member 1. To setup wka I would suggest using the override file rather then system properties, and place perhaps 10% of your nodes on that list. Then use this exact same file for all nodes. If I've misinyerpreted your configuration please provide additional details.
    Thanks,
    Mark
    Oracle Coherence

  • Performance degradation: unfetched field [PublishingPageContent] caused extra roundtrip

    Hi All,
       I am facing some serious application pool crash in one of my customer's Production site SharePoint servers. The Application Error logs in the event Viewer says -
    Faulting application name: w3wp.exe, version: 7.5.7601.17514, time stamp: 0x4ce7afa2
    Faulting module name: ntdll.dll, version: 6.1.7601.17514, time stamp: 0x4ce7c8f9
    Exception code: 0xc0000374
    Fault offset: 0x00000000000c40f2
    Faulting process id: 0x1414
    Faulting application start time: 0x01ce5edada76109d
    Faulting application path: c:\windows\system32\inetsrv\w3wp.exe
    Faulting module path: C:\Windows\SYSTEM32\ntdll.dll
    Report Id: 5a69ec1e-cace-11e2-9be2-441ea13bf8be
    At the same time the SharePoint ULS logs says -
    1)
    06/13/2013 03:44:29.53 w3wp.exe (0x0808)                       0x2DF0 SharePoint Foundation        
            General                                8e2s               
    Medium               Unknown SPRequest error occurred. More information: 0x80070005      8b343224-4aa6-490c-8a2a-ce06ac160773
    06/13/2013 03:44:35.03 w3wp.exe (0x0808)                       0x2DF0 SharePoint Foundation        
            General                                      
    8e25      Medium               Failed to look up string with key "FSAdmin_SiteSettings_UserContextManagement_ToolTip", keyfile Microsoft.Office.Server.Search.   
    8b343224-4aa6-490c-8a2a-ce06ac160773
    06/13/2013 03:44:35.03 w3wp.exe (0x0808)                       0x2DF0 SharePoint Foundation        
            General                                8l3c               
    Medium               Localized resource for token 'FSAdmin_SiteSettings_UserContextManagement_ToolTip' could not be found for file with path: "C:\Program Files\Common Files\Microsoft Shared\Web
    Server Extensions\14\Template\Features\SearchExtensions\ExtendedSearchAdminLinks.xml".              8b343224-4aa6-490c-8a2a-ce06ac160773
    2)
    06/13/2013 03:44:29.01 w3wp.exe (0x0808)                       0x2DF0 SharePoint Foundation        
            Web Parts                                    
    emt4     High       Error initializing Safe control - Assembly:Microsoft.Office.SharePoint.ClientExtensions, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c TypeName: Microsoft.Office.SharePoint.ClientExtensions.Publishing.TakeListOfflineRibbonControl
    Error: Could not load type 'Microsoft.Office.SharePoint.ClientExtensions.Publishing.TakeListOfflineRibbonControl' from assembly 'Microsoft.Office.SharePoint.ClientExtensions, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c'.               
    8b343224-4aa6-490c-8a2a-ce06ac160773
    06/13/2013 03:44:29.50 w3wp.exe (0x0808)                      
    0x2DF0 SharePoint Foundation                 Logging Correlation Data                     
    xmnv     Medium               Site=/    8b343224-4aa6-490c-8a2a-ce06ac160773
    3)
    06/13/2013 03:43:59.67 w3wp.exe (0x263C)                       0x24D8 SharePoint Foundation        
            Performance                     9fx9               
    Medium               Performance degradation: unfetched field [PublishingPageContent] caused extra roundtrip.     at Microsoft.SharePoint.SPListItem.GetValue(SPField fld,
    Int32 columnNumber, Boolean bRaw, Boolean bThrowException)     at Microsoft.SharePoint.SPListItem.GetValue(String strName, Boolean bThrowException)     at Microsoft.SharePoint.SPListItem.get_Item(String fieldName)    
    at Microsoft.SharePoint.WebControls.BaseFieldControl.get_ItemFieldValue()     at Microsoft.SharePoint.Publishing.WebControls.RichHtmlField.RenderFieldForDisplay(HtmlTextWriter output)     at Microsoft.SharePoint.WebControls.BaseFieldControl.Render(HtmlTextWriter
    output)     at Microsoft.SharePoint.Publishing.WebControls.BaseRichField.Render(HtmlTextWriter output)     at Microsoft.SharePoint.Publishing.WebControls.RichHtmlField.R...             
    b8d0b8ca-8386-441f-8fce-d79fe72556e1
    06/13/2013 03:43:59.67*               w3wp.exe (0x263C)                      
    0x24D8 SharePoint Foundation                 Performance                                  
    9fx9       Medium               ...ender(HtmlTextWriter output)     at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection
    children)     at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)     at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)    
    at System.Web.UI.HtmlControls.HtmlContainerControl.Render(HtmlTextWriter writer)     at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer, ICollection children)     at System.Web.UI.HtmlControls.HtmlForm.RenderChildren(HtmlTextWriter
    writer)     at System.Web.UI.HtmlControls.HtmlForm.Render(HtmlTextWriter output)     at System.Web.UI.HtmlControls.HtmlForm.RenderControl(HtmlTextWriter writer)     at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWrit...            
    b8d0b8ca-8386-441f-8fce-d79fe72556e1
    06/13/2013 03:43:59.67*               w3wp.exe (0x263C)                      
    0x24D8 SharePoint Foundation                 Performance                                  
    9fx9       Medium               ...er writer, ICollection children)     at System.Web.UI.Control.RenderChildrenInternal(HtmlTextWriter writer,
    ICollection children)     at System.Web.UI.Page.Render(HtmlTextWriter writer)     at System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)    
    at System.Web.UI.Page.ProcessRequest(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint)     at System.Web.UI.Page.ProcessRequest()     at System.Web.UI.Page.ProcessRequest(HttpContext context)    
    at Microsoft.SharePoint.Publishing.TemplateRedirectionPage.ProcessRequest(HttpContext context)     at System.Web.HttpApplication.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute()     at System.Web.HttpApplication.ExecuteStep(IExecutionSte...       
    b8d0b8ca-8386-441f-8fce-d79fe72556e1
    06/13/2013 03:43:59.67*               w3wp.exe (0x263C)                       
    0x24D8 SharePoint Foundation                 Performance                                  
    9fx9       Medium               ...p step, Boolean& completedSynchronously)     at System.Web.HttpApplication.PipelineStepManager.ResumeSteps(Exception
    error)     at System.Web.HttpApplication.BeginProcessRequestNotification(HttpContext context, AsyncCallback cb)     at System.Web.HttpRuntime.ProcessRequestNotificationPrivate(IIS7WorkerRequest wr, HttpContext context)    
    at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr managedHttpContext, IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)     at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr managedHttpContext,
    IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)     at System.Web.Hosting.PipelineRuntime.ProcessRequestNotificationHelper(IntPtr managedHttpContext, IntPtr nativeRequestContext, IntPtr module...              
    b8d0b8ca-8386-441f-8fce-d79fe72556e1
    06/13/2013 03:43:59.67*               w3wp.exe (0x263C)                      
    0x24D8 SharePoint Foundation                 Performance                                  
    9fx9       Medium               ...Data, Int32 flags)     at System.Web.Hosting.PipelineRuntime.ProcessRequestNotification(IntPtr managedHttpContext,
    IntPtr nativeRequestContext, IntPtr moduleData, Int32 flags)                 b8d0b8ca-8386-441f-8fce-d79fe72556e1
    06/13/2013 03:43:59.67 w3wp.exe (0x263C)                      
    0x24D8 SharePoint Foundation                 Performance                     g4zd               
    High       Performance degradation: note field [PublishingPageContent] was not in demoted fields.           b8d0b8ca-8386-441f-8fce-d79fe72556e1
    Anybody has any idea whats going on? I need to fix this ASAP as we are suppose to go live in next few days.
    Soumalya

    Hello Soumalya,
    Do you have an update on your issue? We are actually experiencing a similar issue at a new customer.
    - Dennis | Netherlands | Blog |
    Twitter

  • Performance Degradation with EJBs

    I have a small J2EE application that consists of a Session EJB calling 3 Entity EJBs that access the database. It is a simple Order capture application. The 3 Entity beans are called Orders, OrderItems and Inventory.
    A transaction consists of inserting a record into the order table, inserting 5 records into the orderitems table and updating the quantity field in the inventory table for each order item in an order. With this transaction I observe performance degradation as the transactions per second decreases dramatically within 5 minutes of running.
    When I modify the transaction to insert a single record into the orderitems table I do not observe performance degradation. The only difference in this transaction is we go through the for loop 1 time as opposed to 5 times. The code is exactly the same as in the previous case with 5 items per order.
    Therefore I believe the problem is a performance degradation on Entity EJBs that
    get invoked in a loop.
    I am using OC4J 10.1.3.3.
    I am using CMP (Container Managed Persistence) and CMT (Container Managed Transactions). The Entity EJBs were all generated by Oracle JDeveloper.
    EJB version being used is 2.1.

    One thing to consider it downloading and using the Oracle AD4J utility to see if it can help you identify any possible bottlenecks, on the application server or the database.
    AD4J can be used to monitor/profile/trace applications in real time with no instrumentation required on the application. Just install it into the container and go. It can even trace a request from the app server down into the database and show you the situation is down there (it needs a db agent installed to do that).
    Overview:
    http://www.oracle.com/technology/products/oem/pdf/wp_productionappdiagnostics.pdf
    Download:
    http://www.oracle.com/technology/software/products/oem/htdocs/jade.html
    Install/Config Guide:
    http://download.oracle.com/docs/cd/B16240_01/doc/install.102/e11085/toc.htm
    Usage Scenarios:
    http://www.oracle.com/technology/products/oem/pdf/oraclead4j_usagescenarios.pdf

  • Performance Degradation - High fetches and Prses

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

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

  • Performance degradation encountered while running BOE in clustered set up

    Problem Statement:
    We have a clustered BOE set up in Production with 2 CMS servers (named boe01 and boe02) . Mantenix application (Standard J2EE application in a clustered set up) points to these BOE services hosted on virtual machines to generate reports. As soon as BOE services on both boe01 and boe02 are up and running , performance degradation is observed i.e (response times varies from 7sec to 30sec) .
    The same set up works fine when BOE services on boe02 is turned off i.e only boe01 is up and running.No drastic variation is noticed.
    BOE Details : SAP BusinessObjects environment XIR2 SP3 running on Windows 2003 Servers.(Virtual machines)
    Possible Problem Areas as per our analysis
    1) Node 2 Virtual Machine Issue:
    This currently being part of the Production infrastructure, any problem assessment testing is not possible.
    2) BOE Configuration Issue
    Comparison  report to check the build between BOE 01 and BOE 02 - Support team has confirmed no major installation differences apart from a minor Operating System setting difference.Question being is there some configuration/setting that we are missing ?
    3) Possible BOE Cluster Issue:
    Tests in staging environment  ( with a similar clustered BOE setup ) have proved inconclusive.
    We require your help in
    - Root cause Analysis for this problem.
    - Any troubleshooting action henceforth.
    Another observation from our Weblogic support engineers for the above set up which may or may not be related to the problem is mentioned below.
    When the services on BOE_2 are shutdown and we try to fetch a particular report from BOE_1 (Which is running), the following WARNING/ERROR comes up:-
    07/09/2011 10:22:26 AM EST> <WARN> <com.crystaldecisions.celib.trace.d.if(Unknown Source)> - getUnmanagedService(): svc=BlockingReportSourceRepository,spec=aps<BOE_1> ,cluster:@BOE_OLTP, kind:cacheserver, name:<BOE_2>.cacheserver.cacheserver, queryString:null, m_replaceable:true,uri=osca:iiop://<BOE_1>;SI_SESSIONID=299466JqxiPSPUTef8huXO
    com.crystaldecisions.thirdparty.org.omg.CORBA.TRANSIENT: attempt to establish connection failed: java.net.ConnectException: Connection timed out: connect  minor code: 0x4f4f0001  completed: No
         at com.crystaldecisions.thirdparty.com.ooc.OCI.IIOP.Connector_impl.connect(Connector_impl.java:150)
         at com.crystaldecisions.thirdparty.com.ooc.OB.GIOPClient.createTransport(GIOPClient.java:233)
         at com.crystaldecisions.thirdparty.com.ooc.OB.GIOPClientWorkersPool.next(GIOPClientWorkersPool.java:122)
         at com.crystaldecisions.thirdparty.com.ooc.OB.GIOPClient.getWorker(GIOPClient.java:105)
         at com.crystaldecisions.thirdparty.com.ooc.OB.GIOPClient.startDowncall(GIOPClient.java:409)
         at com.crystaldecisions.thirdparty.com.ooc.OB.Downcall.preMarshalBase(Downcall.java:181)
         at com.crystaldecisions.thirdparty.com.ooc.OB.Downcall.preMarshal(Downcall.java:298)
         at com.crystaldecisions.thirdparty.com.ooc.OB.DowncallStub.preMarshal(DowncallStub.java:250)
         at com.crystaldecisions.thirdparty.com.ooc.OB.DowncallStub.setupRequest(DowncallStub.java:530)
         at com.crystaldecisions.thirdparty.com.ooc.CORBA.Delegate.request(Delegate.java:556)
         at com.crystaldecisions.thirdparty.org.omg.CORBA.portable.ObjectImpl._request(ObjectImpl.java:118)
         at com.crystaldecisions.enterprise.ocaframework.idl.ImplServ._OSCAFactoryStub.getServices(_OSCAFactoryStub.java:806)
         at com.crystaldecisions.enterprise.ocaframework.ServiceMgr.do(Unknown Source)
         at com.crystaldecisions.enterprise.ocaframework.ServiceMgr.a(Unknown Source)
         at com.crystaldecisions.enterprise.ocaframework.ServiceMgr.getUnmanagedService(Unknown Source)
         at com.crystaldecisions.enterprise.ocaframework.AbstractStubHelper.getService(Unknown Source)
         at com.crystaldecisions.enterprise.ocaframework.e.do(Unknown Source)
         at com.crystaldecisions.enterprise.ocaframework.o.try(Unknown Source)
         at com.crystaldecisions.enterprise.ocaframework.o.a(Unknown Source)
         at com.crystaldecisions.enterprise.ocaframework.o.a(Unknown Source)
         at com.crystaldecisions.enterprise.ocaframework.p.a(Unknown Source)
         at com.crystaldecisions.enterprise.ocaframework.ServiceMgr.getManagedService(Unknown Source)
         at com.crystaldecisions.sdk.occa.managedreports.ps.internal.a$a.getService(Unknown Source)
         at com.crystaldecisions.enterprise.ocaframework.e.do(Unknown Source)
         at com.crystaldecisions.enterprise.ocaframework.o.try(Unknown Source)
         at com.crystaldecisions.enterprise.ocaframework.o.a(Unknown Source)
         at com.crystaldecisions.enterprise.ocaframework.o.a(Unknown Source)
         at com.crystaldecisions.enterprise.ocaframework.p.a(Unknown Source)
    We see the above warning coming 2 or 3 times before the request is processed and then we see the report. We have checked our config's for the cluster but didn't find anything concrete.
    Is this a normal behavior of the software or can we optimize it?
    Any assistance that you can provide would be great

    Rahul,
    I have exactly the same problem running BO 3.1 SP3 in a 2 machine cluster on AIX.  Exact same full install on both machines.  When I take down one of the machines the performance is much better. 
    An example of the problem now is that when i run the command ./ccm.sh -display -username administrator -password xxx on the either box when they are both up and running, I sometimes receive a timeout error (over 15mins)
    If I run SQLplus direct on the boxes to the CMS DB then the response is instant.  Tnspings of course shows no problems
    When I bring down one of the machines and run the command ./ccm.sh -display again then this brings back results in less than a minute...
    I am baffled as to the problem so was wondering if you found anything from your end
    Cheers
    Chris

  • Performance degradation in pl/sql parsing

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

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

  • Performance degradation after setting filesystemio_option=setall from none.

    Hi All,
    We have facing performance degradation after setting filesystemio_option=setall from none on my two servers as mentioned below.
    Red Hat Enterprise Linux AS release 4 (Nahant Update 7) 2.6.9 55.ELhugemem (32-bit)
    Red Hat Enterprise Linux Server release 5.2 (Tikanga) 2.6.18 92.1.10.el5 (64-bit)
    We are seeing lots of Disk I/O happening. We expected "*filesystemio_option=setall* " will improve performance but it is degrading. We getting slowness complains.
    Please let me know do we need to set somethign else along with this ...like any otimizer parameter( e.g. optimizer_index_cost_adj, optimizer_index_caching).
    Please help.

    Hi Suraj,
    <speculation>
    You switched filesystemio_options to setall from none, so, the most likely reason for performance degradation after switching to setall is the implementation of directio. Direct I/O will skip the filesystem buffer cache, and and allow Oracle to read directly from disk to the database buffer cache. However, on a system where direct I/O is not implemented, which is what you had until you recently messed with that parameter, it's likely that you had an undersized database buffer cache, but that was ok, because many (most) of the physical I/Os your database was doing, were actually being serviced by the O/S filesystem buffer cache. But, you introduced direct I/O, and wiped out the ability of the O/S to service any physical I/Os from filesystem buffer cache. This means that every cache miss on the database buffer cache, turns into a real, physical, spin-the-disk, move-the-drive-head, physical I/O. And, you are suffering the performance consequences.
    </speculation>
    Ok, end of speculation. Now, assuming that what I've outlined above is actually going on, what to do? Why is direct I/O lower performing than buffered, non-direct I/O? Shouldn't it's performance be superior?
    Well, when you have an established system that's using buffered I/O, and you switch to direct I/O, you almost always will have to increase the size of the database buffer cache. The problem is that you took a huge chunk of memory away from the the O/S, that it was using to buffer your I/Os and avoid physical I/O. So, now, you need to make up for it, by increasing the size of the database buffer cache. You can do this, without buying more memory for the box, because the O/S is no longer going to need to use so much memory for filesystem buffers.
    So, what to do? Is it worth switching? Well, on balance, it makes sense to use direct I/O, and give Oracle a larger database buffer cache, for the simple fact that (particularly on a server that's dedicated to being an Oracle database server), Oracle has far more sophisticated caching algorithms, and a better understanding of the various types of data being cached, and so should be able to make more efficient use of the memory, than the (relatively) brain dead caching algorithms of the kernel and filesystem mechanisms.
    But, once again, it all comes down to this:
    What problem are you trying to solve? Did you have any I/O related issues? Do you have any compelling reason to implement direct I/O? Rule #1 is "if it ain't broke, don't fix it." Did you just violate rule #1? :-)
    Finally, since you're on Linux, you can use the 'free' command to see how much memory is on the box, how much is free, and how much is dedicated to filesystem cache buffers. This response is already pretty long, so, I'm not going to get into details, however, if you're not familiar with the command, the results could be misleading. Read the man page, and try to be clear about understanding it before you make any assumptions about the output.
    Hope that helps,
    -Mark

  • Performance degradation when using foreign keys

    Hi,
    I face drastic performance degradation when I add foreign keys to a table and perform insert / update on that table.
    I have a row store table to  which I need to insert around 1,50,000 records.
    If the table has no foreign key reference it takes maximum of 5 seconds but if the same table has references to other tables (in my case there are 3 references), the processing speed reduces drastically to 2 minutes.
    Is there any solution / best practice that can help me in gaining performance (processing speed) in this situation?
    Thanks
    S.Srivatsan

    Hi Sri,
    When you perform one insert in any database table which is having foreign key relationships, it will check the corresponding parent tables to check whether the master data is available or not. If your table is having 2 foreign key relationship, it happen twice per insert. Hence the performance will degrade. This is one of the reasons why ECC  doesn't establish foreign key relationship in the back end database. The case is not just for INSERT, for UPDATE & DELETE the same is applicable.
    Sreehari

Maybe you are looking for

  • My iphone can't find a telephone network

    Hi, I bought my iPhone a year ago and it was working pretty well until it couldn't find phone networks anymore. I(ve already tried restoring and it didn't work. please help me! thank you P.S : sorry if I make mistakes when I write, I'm french

  • Mac not reading RAID drives

    I have been having problems with my ATA VideoRaid drive of sometimes the computer not recogning it and not mounting it to the desktop or finder. I go to the system profiler, and it recognizes it there. It is connected through a SCSI cable connection.

  • Idocs not updated.

    hi,    i am using an Idoc message type : HRMD_A and basic type : HRMD_A07 for updating values in the segment EP10105 in LSMW. When the Idocs are processed they are getting posted succefully, but the values are not getting reflected in the table. any

  • Register Issues

    Hi! I can't seem to register Adobe Photoshop Album Starter Edition 3.0 I get a code in the email, but when I try and enter it, I get an error that says "Your unlock code was not activated. Administrator privilages are needed to activate the unlock co

  • Table name for Carry forward entries

    Hi Experts , What is the table for the carryforward entries in FI/CO. In which table we can see the carryforward entries. Thnx Venky.