"enq: RO - fast object reuse" due to truncate temp table

Dear Guru's,
DB_VERSION=10.2.0.4
OS_VERSION=64-bit Windows 2008 R2
This morning one of our Production databases peformance was
I have collected AWR information during that time and found "*enq: RO - fast object reuse*" followed by "CPU time".
Also as per the ADDM :
RECOMMENDATION 2: SQL Tuning, 48% benefit (1603 seconds)
      ACTION: Investigate the SQL statement with SQL_ID "62fs5g3mqhd4b" for
         possible performance improvements.
         RELEVANT OBJECT: SQL statement with SQL_ID 62fs5g3mqhd4b and
         PLAN_HASH 1328042859
         TRUNCATE TABLE Transaction_Tmp
      RATIONALE: Waiting for event "enq: RO - fast object reuse" in wait class
         "Application" accounted for 98% of the database time spent in
         processing the SQL statement with SQL_ID "62fs5g3mqhd4b"
As per the Bug 8544896 - Waits for "enq: RO - fast object reuse" with high DBWR CPU [ID 8544896.8] ,
Workaround:
Flush the buffer cache before truncating
OR
set dbfast_obj_truncate = FALSE
However they have also mentioned for applying the patch to fix this issue ex:10.2.0.4 Patch 27 on Windows Platforms. But there exist the list of Patches i mean it's so confusing. I do not see anything that suits with my OS i.e. Windows 2008 64-bit :-(
I have following concerns :
Q1. Also according to "'enq: RO - fast object reuse' contention when gathering schema/table statistics in parallel [ID 762085.1]" , Both workarounds could have an impact on the database performance. Instead, it is recommended applying the corresponding patch
I mean shall i ignore this since i have encountered 'enq: RO - fast object reuse' during truncating the Temp Table and not while gathering statistics.
Q2. Or shall i try this workaround and observe the database performance ? ( which i am planning to perform currently)
Q3. Which is the correct Patch Number for the same? Since there are many Patches listed.
Thanks in advance

A MetaLink Research for the term “kcbo_service_ockpt” leads to Bug 7376934, which is a duplicate of Bug 7385253 – DBWR IS CONSUMING HIGH CPU.
Patch 7385253 is available for Linux x86_64, HP-UX, Solaris, AIX.
Reference:
MetaLink Note 762085.1 – Subject: ‘enq: RO – fast object reuse’ contention when gathering schema/table statistics in parallel

Similar Messages

  • Compile_schema is slow while fast object checkpoint

    Hi,
    The DBMS_UTILITY.compile_schema(U1,false) normally runs 10 seconds on our "U1" schema (11.2.0.3, oracle linux, 64 bit). But when truncate partition, parallel query runs on an other schema ("U2"), the compilation of "U1" takes more than 1 hour.
    top wait events: enq: RO - fast object reuse, enq: KO - fast object checkpoint.
    longest sqls of compile: truncate table UTL_RECOMP_ERRORS, truncate table UTL_RECOMP_COMPILED
    The compiled shema (U1) is other than U2, and no dependency between U1 and U2.
    Both U1 and U2 session wait for CKPT.
    If I select all invalid objects of U1, I can recompile them as fast as usual (10 secs) in a loop.
    No result found on google for "truncate table UTL_RECOMP_ERRORS".
    I know that "fast object checkpoint" can be needed as first part of truncate partition, parallel query. But why an independent schema has to wait for it? Is it a normal behaviour, or can be avoided via configuration?
    Thx: lados.

    Hi,
    Thanks for answer. I have read this article before I post my question here. The main differences, as I think:
    He wrote: "At same time some queries are used to fetch data from same table."
    But we have two independent users and tables.
    Our database is 11g, so that 10g patch is not good for us.
    We cannot set hidden parameter dbfast_obj_truncate on the database of our client.
    But is it normal, if the "segment level checkpointing" block the truncate of an other/independent segment? How it works in multiuser database? If one of the user runs truncate, direct read with lot of "segment level checkpoint", other users have to wait for compile_schema 1 hour? So I hope, it can be avoid with some config.
    Thx: lados.

  • Graphics2D and AffineTransform needs object-reuse for smooth animation!

    Hi,
    I'm currently working on a graphical framework for animation using Java2D but has come to a dead end. The goal of the framework is to deliver smooth animation on various platforms, but this seems impossible due to the following fact:
    I have a tree of graphical objects i render on a Graphics2D-object. Some of the objects to be rendered are transforms on the Graphics2D instead of visible objects - this way I can have transform-objects in my tree which will affect all child-objects. This is all very nice, but when doing transformations on the Graphics2D A LOT of objects are being created by the implementation of Graphics2D (SunGraphics2D). I've designed my framework to utilize object-reuse and cacheing-mechanisms to ensure no garbage collection is performed when actual animation is in progress - if gc's are performed, this results in visible pauses in the animation. Now, I would like to ask if someone knows how to get around this problem, or suggest I simply abandon Java2D?
    The details of my problem is the following:
    When doing transforms on the Graphics2D-object which is passed to every object in the tree (and hence, a lot of transformations are being done), a lot of FontInfo-objects are being created - even though I don't use any of them - it's all in the subsystem. The source in the SunGraphics2D is as follows:
    // this is called by my framework to rotate all childs in the tree
    public void rotate(double d) {
      transform.rotate(d);
      invalidateTransform(); // the evil starts here
    // this is called a lot of places in SunGraphics2D
    protected void invalidateTransform() {
      // a lot is thigs are going on in this method - cutted out...
      // before this method returns, the following takes place
      fontInfo = checkFontInfo(null, font); // now we are getting there
    // this is the method of pure evil object allocations
    public FontInfo checkFontInfo(FontInfo fontinfo, Font font1) {
      // every time this method is called, a FontInfo-object is allocated
      FontInfo fontinfo1 = new FontInfo();
      // and a lot of other objects are being created as well...
    }I have come to think, that Java2D is pretty old and should be pretty mature at this point, but now I doubt it since object-reuse is a pretty obvious way of doing optimizations.
    Has any of you experienced the same problem or maybe found a solution to doing transformations on a Graphics2D-object without a ton of objects being created?
    If you would like to have a look at the problem you can do the following:
    Make yourself a little program which is doing some transforms on a Graphics2D-object in a loop (to emulate the 25fps animation and the transform-objects in the tree). Now use your favorite memory profiler (I use JProbe Memory Profiler, free evaluation) and see for yourself - the objects which are garbage collected includes a ton of FontInfo-objects and many AffineTransform-objects.
    If I do not find any solution to this problem, I'm forced to face the fact, that Java2D is not suitable for animation-purposes - gc's during animation is no solution!
    Thank you for your time - hope to hear from you soon.
    Regards,
    // x-otic.

    I think the main point is java transform objects are to slow to use in animations. They definitly have there uses, but for fast animations you need something more optimized.
    If you assume a general graphic objects has getHeight, width, x, y, render(). You could do translations using these general properties at an abstract level, letting each graphic object implements its own way to render itself and use the properties.
    I tryed to make sense!

  • How can I take photo of fast objects with A3400?

    in A3400 I didn't find any option to change shutter speed. or there is no proper photo scene in menu.
    then how can I take a good photo of fast objects? in its catalog it says the speed of shutter is (1/2000 ~ 15 sec). when and how can I take a shut with 1/2000 sec ?
    thank for your help

    According to the spec sheet you can't control the shutter speed other than by using the modes available & none are for action. The camera's program might select a very high shutter speed in very bright light while shooting something very reflective like a white car or building etc.
    "A skill is developed through constant practice with a passion to improve, not bought."

  • Truncate all tables in schema

    Hi,
    I want to truncate all tables (300 tables) in a schema. There are some enabled constraints in this schema. I want to keep all tables attached objects (like indexes, constraints, etc). I’d like to create a procedure to do this job. What's the safe and right way for this?
    I am thinking as follows:
    1- Retrieve all user constraints name using user_constrants view and then disable them.
    2- Retrieve all user tables name using user_tables view and then Truncate them.
    3- Enable all constraints that were disabled in step 1.
    Is this a safe and right way?
    Let me know your thought please. Thanks.

    The table was probably created using double qoutes.
    declare
    v_new_tab_name varchar2(35);
    for c1 in (select table_name from user_tables) loop
       begin
           execute immediate ( 'truncate table '||C1.Table_Name );
       exception
          when others then
              v_new_tab_name := '"' || C1.Table_Name|| '"' ;
              execute immediate (' truncate table '||v_new_tab_name) ;
       end ;
    end loop;
    end;

  • Truncate 1000 tables

    What is the best way to truncate 1000 tables at a time ? Most of the table are of INITIAL size of 14M each. Also, some of the table contains CLOB column. We found that truncate all take more than 15 minutes. Any way to improve the speed ? We also tried the reuse storage, but the effect is not so obvious. Any advice ?
    Configuration:
    Oracle 10g RAC on window 2003

    Is this a Duplicate Post ? See truncate 1000 tables

  • Truncating a table from inside an application

    Hi all,
    Got a new problem to tackle. I am creating an application to calculate a very complex production bonus based on alot of different variables...
    I am working through retrieving all the data and created an apex temp table called site_bonus. I dump all the retireved values I get from Oracle for attendance, SIT data on discipline etc into the temp table as a count of number of occureneces to start the calculation of the bonus factors - here's the gotcha.....
    Prior to dumping the new run data into the temp table I want to truncate the table to remove anyprevious run data so that I dont get duplicate records cuased by a previous run. I created an on demand application process that basically does the following:
    truncate table "SITE_BONUS" /
    ( I basically copied it right from SQL workshop inside apex,by retrieving the SQL fromthe table truncate process where it works....
    When I run it anywhere inside my page as an on demand process It fails with the following error:
    ORA-06550: line 1, column 16: PLS-00103: Encountered the symbol "TABLE" when expecting one of the following: := . ( @ % ; The symbol ":= was inserted before "TABLE" to continue.
    Error
    OK
    I have tried it as a plsql process, an on demand process....and I get teh same error from any page inside my app and I cant figure out why I can do this from SQL worksop but cant call it from a page within my app.....
    Any ideas?
    Edited by: DSULLIVAN on Oct 28, 2009 3:13 PM - I corrected the typo

    You are trying : trucate
    trucate table "SITE_BONUS" /It should be : tuncate
    truncate table SITE_BONUSHope this helps,
    Sam
    +Please reward good answers by marking them correct or helpful!                                                                                                                                                                                                                                                                                                                                                                                                                                                                                       

  • A better way than a global temp table to reuse a distinct select?

    I get the impression from other threads that global temp tables are frowned upon so I'm wondering if there is a better way to simplify what I need to do. I have some values scattered about a table with a relatively large number of records. I need to distinct them out and delete from 21 other tables where those values also occur. The values have a really low cardinality to the number of rows. Out of 500K+ rows there might be a dozen distinct values.
    I thought that rather than 21 cases of:
    DELETE FROM x1..21 WHERE value IN (SELECT DISTINCT value FROM Y)
    It would be better for performance to populate a global temp table with the distinct first:
    INSERT INTO gtt SELECT DISTINCT value FROM Y
    DELETE FROM x1..21 WHERE value IN (SELECT value FROM GTT)
    People asking questions about GTT's seem to get blasted so is this another case where there's a better way to do this? Should I just have the system bite the bullet on the DISTINCT 21 times? The big table truncates and reloads and needs to do so quickly so I was hoping not to have to index it and meddle with disable/rebuild index but if that's better than a temp table, I'll have to make do.
    As far as I understand WITH ... USING can't be used to delete from multiple tables or can it?

    Almost, but not quite, as efficient as using a temporary table would be to use a PL/SQL collection and FORALL statements and/or referencing the collection in your subsequent statements). Something like
    DECLARE
      TYPE value_nt IS TABLE OF y.value%type;
      l_values value_nt;
    BEGIN
      SELECT distinct value
        BULK COLLECT INTO l_values
        FROM y;
      FORALL i IN 1 .. l_values.count
        DELETE FROM x1
         WHERE value = l_values(i);
      FORALL i IN 1 .. l_values.count
        DELETE FROM x2
         WHERE value = l_values(i);
    END;or
    CREATE TYPE value_nt
      IS TABLE OF varchar2(100); -- Guessing at the type of y.value
    DECLARE
      l_values value_nt;
    BEGIN
      SELECT distinct value
        BULK COLLECT INTO l_values
        FROM y;
      DELETE FROM x1
       WHERE value = (SELECT /*+ cardinality(v 10) */ column_value from table( l_values ) v );
      DELETE FROM x2
       WHERE value = (SELECT /*+ cardinality(v 10) */ column_value from table( l_values ) v );
    END;Justin

  • How to get the object class field value in CDHDR table for vendor

    hi
    how to get the object class field value in CDHDR table for vendor

    Try KRED/KRED_N as object class in CDHDR for Vendor.

  • Can I give access to truncate one table only ?

    Hi,
    We have system where it is deleting one table and inserting records using pro-cobol in a table owned by another schema. It means user b is inserting records in a's table i.e. t. Can I give access to truncate only a.t ? delete any table or drop any table will give access to b to truncate any table in 'a'. I do not want this. How can I achive this ?
    thanks & regards
    PJP

    As Justin already said there is no separate right to simple GRANT TRUNCATE ON TABLE to user.
    From the docs: http://download.oracle.com/docs/cd/B19306_01/server.102/b14200/statements_10006.htm#sthref9966
    To truncate a table or cluster, the table or cluster must be in your schema or you must have DROP ANY TABLE system privilege.
    So the best way would be to encapsulate this login in a packaged procedure as described by Justin.

  • Help with truncating a table using plsql procedure in different schema

    I have a plsql procedure in schema A that truncates a table that is given in as parameter.
    create or replace procedure truncate_table(schema, table_name)
    EXECUTE IMMEDIATE 'TRUNCATE TABLE '||schema||'.'||table_name;
    end;
    The above procedure has public execute grant.
    I need to truncate a table in schema B. I have a plsql procedure in schema B that calls the truncate_table procedure and passes in the schema B table name.
    Since the table is in schema B, should the delete grant on the table be given to user A or user B to truncate the table in schema B?
    Thanks in advance.

    Procedure created in schema A
    create or replace
    procedure truncate_table(l_schema varchar2, table_name varchar2) authid current_user
    as
    begin
    EXECUTE IMMEDIATE 'TRUNCATE TABLE '||l_schema||'.'||table_name;
    end;from schema B
    grant delete on table1 to Schema_A
    from schema A
    exec truncate_table('Schema_B','Table1');
    Hope this helps.
    Alvinder

  • Space is not released after truncating the table

    Team,
    We have a table of size 550gigs in size and we truncated the table , truncated sucessfully but space is not released in os level, what action we can take to release the space and this table has only one row and contains the binary data.
    Thanks
    PGR

    Team,
    We have a table of size 550gigs in size and we truncated the table , truncated sucessfully but space is not released in os level, what action we can take to release the space and this table has only one row and contains the binary data.
    Thanks
    PGR
    Hello,
    Yes space wont be released immediately .If large extents are in picture which I assume is your case it goes into deferred drop a background process which will execute after some time( time may vary).See below link for details.
    As per BOL if extents are more than 128 it goes in deferred drop.
    http://msdn.microsoft.com/en-us/library/ms177495.aspx
    You should wait for some time .keep checking the free space
    Below discussion will surely help you in understanding.See Jonathan's reply
    http://social.msdn.microsoft.com/Forums/en-US/4aa2537e-246b-4bfe-818d-3482531d9149/sql-server-2005-massive-400gb-table-dropped-space-not-released
    Please mark this reply as the answer or vote as helpful, as appropriate, to make it useful for other readers

  • How to TRUNCATE a table dynamically in a Stored Procedure?

    Hi everyone, How can I create a Procedure with dynamic sql to truncate a table name I pass by every time in Oracle? I am running the following query and nothing happens. It neither creates the procedure nor errors out.
    CREATE OR REPLACE PROCEDURE TruncateTable(TableName IN VARCHAR2(50))
    IS
    BEGIN
    SQLCmd VARCHAR(200);
    BEGIN
    SQLCmd := 'TRUNCATE TABLE ' || TableName;
    EXECUTE IMMEDIATE SQLCmd;
    END;
    Could someone please help me?
    Thanks

    Thanks Brendan for the reply. But, it neither does anything after I add a "/" on line9. Just wondering if the syntax of the proc is correct?

  • Privilege for truncating a table of other schema

    Hi friends
    I need to truncate a table of other schema. What privilege the other user has to give to carry out it.
    Thanks
    Edited by: user12892846 on 01-abr-2010 15:59

    DROP ANY TABLEWhile technically correct, above is somewhat dangerous because every schema could be impacted; even SYS.
    Assume SCHEMA_A owns TABLE_A & procedure below.
    CREATE & REPLACE PROCEDURE TRUNCATE_TABLE_A
    AS
    BEGIN
    EXECUTE IMMEDIATE 'TRUNCATE TABLE TABLE_A';
    END TRUNCATE_TABLE_A;
    GRANT EXECUTE ON TRUNCATE_TABLE_A TO SCHEMA_B;
    By doing as above SCHEMA_A can control who & which table(s) can be impacted (in is own schema only).
    Edited by: sb92075 on Apr 1, 2010 7:06 PM

  • Problem in enabling constraint - after disabling and truncation of table .

    Hello Friends,
    I have a table called DRR_TABLES that has list of table names . The requirement is to truncate the tables present in DRR_TABLES except KEY_IDS table and table_name like '%TYPE%' table.
    written a procedure . successfullly truncating the tables from DRR_TABLES but while enabling constraints after truncation , I am getting problem in enabling constraints .
    ERROR at line 1:
    ORA-02270: no matching unique or primary key for this column-list
    ORA-06512: at "schema123.TRUNCATE_DRR_TABLES ", line 49
    ORA-06512: at line 1
    Heres is the code .
    PROCEDURE TRUNCATE_DRR_TABLES is
    x varchar2(200);
    v_tablecount number := 0;
    cursor c is select TABLE_NAME from DRR_TABLES where population_source='PUBLISHING' and TABLE_NAME != 'KEY_IDS' and TABLE_NAME NOT LIKE '%TYPE%';
    BEGIN
    DBMS_OUTPUT.PUT_LINE (' TRUNCATING DRR TABLES ...........');
    OPEN c ;
    LOOP
    FETCH c INTO x ;
    EXIT WHEN c%NOTFOUND;
    for c1 in (select table_name, constraint_name from user_constraints where TABLE_NAME = x and status ='ENABLED' ORDER BY CONSTRAINT_TYPE DESC )
    loop
    begin
    execute immediate ('alter table '||c1.table_name||' disable constraint '||c1.constraint_name|| ' cascade');
    NULL;
    end;
    end loop;
    EXECUTE IMMEDIATE 'TRUNCATE TABLE ' || x ;
    v_tablecount := v_tablecount + 1 ;
    DBMS_OUTPUT.PUT_LINE('TABLE TRUNCATED :'|| x );
    END LOOP ;
    DBMS_OUTPUT.PUT_LINE (' TOTAL TABLES TRUNCATED ' || v_tablecount );
    CLOSE c;
    OPEN c ;
    LOOP
    FETCH c INTO x ;
    EXIT WHEN c%NOTFOUND;
    for c2 in (select table_name, constraint_name from user_constraints where TABLE_NAME = x and status = 'DISABLED' ORDER BY CONSTRAINT_TYPE)
    loop
    begin
    execute immediate ('alter table '||c2.table_name||' enable constraint '||c2.constraint_name);
    NULL;
    end;
    end loop;
    END LOOP ;
    CLOSE c ;
    END TRUNCATE_DRR_TABLES ;
    LINE 49 is the line corresponding to enable constraint statement.
    Edited by: kumar73 on 3 Sep, 2012 11:44 PM

    It is such a pity that a user having 321 posts till date is unaware of basics of Posting a Question.
    1. You need to provide us with your Oracle version
    select * from v$version;2. You need to understand and get accustomed to using tags before and after Code or SQL's for better readability.
    3. You need to provide us with the Table Structure and the Constraints Definition.
    There are many things that looks like Bad Coding practices:
    <font face="Times New Roman" size=2>
    1. Avoid RBAR (Loops).
    2. Implement Bulk Collect.
    3. Why do you need to disable the constraints before truncating? Are you kind of handling the Referential Integrity Constraints?
    4. Duplicate checking of Disabled Constraints.
    5. When the procedure is being executed at Production Environment, are you going to Monitor the DBMS_OUTPUT? Why not Log the Statements into a LOG Table?
    6. Why use a TableCount variable? Would the TableCount Variable be not equal to the Number of Records returned by Cursor C?
    7. What is the need to use a NULL statement after every Execute Immediate?
    8. What is the Need to surround each execute Immediate with Begin .. End block?
    9. Where is your Exception handling Block? Forgot to write?
    </font>
    What has been your effort in finding which Constraint/Table is causing you the trouble?                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                   

Maybe you are looking for

  • Field type TaxonomyFieldTypeMulti is not installed properly when opening Site columns page or saving site as template

    I have a site collection which I am moving from a SharePoint 2013 enterprise server to a SharePoint 2013 foundation server. This all seems fine apart from when I try and access the Site columns page (from Site settings) or when I save a Site as a tem

  • How can I save my photo books from IPhoto to my computer?

    How can I save my photo books from IPhoto to my computer? because I made two of them and after 2 prints I can open it again to sent it to print. Also I atarte one more and just gone I can find it anymore. I made one more and I sent it to print It is

  • Creating a vertical scrolling game.

    I'm in a java class in high school and for our final we must create a video game. My game is a vert. scrolling plane fighting game like the old 1942 arcade game. I need some help w/ how to make the screen scroll and how to make the enemy planes appea

  • Safari 6.0 Web Inspector CSS line number

    Please add the line number of the class or id on the css web inspector. The old version has the line number in front of the class The new one doesnt, to see it you need too put the cursor on the little arrow and shows the path on a tooltip. Please ch

  • Nokia 5130 7.97 OTA update

    My nokia 5130 current version is 6.93. Nokia suite shows that 7.97 is available, but I cant install it because usb port of mobile does not works. OTA update of mobile says no update available. Please make it available. Solved! Go to Solution.