Oracle Consulting, Oracle Support and Oracle Training by Spyridon N. Kaparelis
osCommerce

Oracle

My Account      
  Oracle Scripts (Search) » Categories » Oracle Real Cases » My Account          
Categories
Free Oracle Support (1)
Administration-> (120)
FlexCube (4)
ORA errors (14)
Oracle Application Server (1)
Oracle APPS DBA-> (38)
Oracle APPS DBA jobs (1)
Oracle Books (18)
Oracle RAC (3)
Oracle Real Cases (29)
Oracle Security (6)
Oracle SQL tricks (32)
Other Oracle sites (3)
Performance Tuning-> (53)
Site info
About Spyridon N. Kaparelis
Privacy Notice & Disclaimer
Buy Oracle APPS DBA Books
Ask for Free Oracle Support
Multiple truncates taking too long

Summary
Doing multiple concurrent truncates you may get a very long time to be completed. When the truncate is executed individually, they are completed fast. Monitoring the system while doing the truncates you may see the local write time wait event.

What is local write wait?
Typically DBWR has to free up some buffers when you want to read something from the disk. During this process there are chances that you will be waiting for your local buffer (i.e blocks dirtied/invalidated by your session) to be written to disk. During this time the waits are shown as local write waits.

Why concurrent truncates causes local write waits and Library Cache Pin/Locks?
Processes that involve tables being truncated and repopulated in multiple (for example in concurrent batches). The underlying problem is we have to write the object's dirty buffers to disk prior to actually truncating or dropping the object. This ensures instance recoverability and avoids a stuck recovery. It seems at first glance perfectly reasonable to simply truncate a table, then repopulate for another usage. And then to do the poplulate/truncate operations in concurrent batches to increase throughput. However, in reality the concurrent truncates get bogged down as DBWR gets busy flushing those dirty block buffers from the buffer cache. You will see huge CI enqueue waits. The multiple truncate operations in concurrent streams absolutely kill throughput. This is specially critical with large buffers.

Workaround
There are 2 or 3 possible workarounds.

1. If you have large buffer cache try to reduce it, it may help.

2. Second solution is to create the tables being truncated on a tablespace that has different Oracle block size than the rest of the tablespaces. By doing this, the tables will be placed on a different buffer pool, which will improve truncate time. Having a separate buffer pool for tables will also reduce RO enqueue contention when multiple AE jobs are running in parallel and truncating tables.

3. Third solution is to apply Oracle patch 6844739, but rarely solves the problem

Added by Spyridon N. Kaparelis at Tuesday 31 March, 2009
Notifications more
NotificationsNotify me of updates to Multiple truncates taking too long
Tell A Friend
 
Reviews more
Write ReviewWrite review for the script
Read Latest Oracle News
Search at the site
 
Press Enter to search

Advanced Search
Search Error Messages

Oracle8i
Oracle9i
Oracle10g
Oracle11g
Search Oracle Docs

Metalink
Oracle8i
Oracle9i
Oracle10g
Oracle11g


osCommerce
Oracle APPS DBA Kaparelis | Oracle RAC | Oracle PLSQL | Oracle Tips | Oracle Consulting | Oracle Metalink | Oracle Support Oracle Training | Oracle Certification | Oracle Articles | Oracle DBA | Oracle Magazine | Oracle User Groups Oracle 7.3 Oracle 8 Oracle 8i Oracle9i Oracle10g Oracle11g EBS E-Business Suite 11.5.10 Oracle Apps Tuning Oracle SGA tuning sql tracing oracle session oracle errros ORA error ORA-600 Ora-00600 oracle jobs dba jobs apps dba jobs oracle experts oracle guru oracle oracle real application cluster oracle index oracle optimazation query oracle explain plan query optimization oracle I/O oracle memory tuning oracle xstress test oracle education oracle university oracle certification OCP OCA oracle support contracts oracle monitoring RAC interconnect developer oracle forms reports oracle application server Rman spyros dba oracle backup Veritas recovery catalog rcvcat oracle Σπυρίδων Καπαρέλης Ora-00600:[] Sp???d?? ?. ?apa????? oracle monitor daily operations free oracle support free consulting oracle seminars oracle arhitecture Unix linux HP-UX AIX Sun Solaris Windows TAR Service Request Metalink oracle disaster recovery oracle Data Guard Oracle Database Administrator Oracle Services low cost oracle support oracle patches upgrades apps dba spyros patch upgrade oracle opatch OUI export import oracle data pump ADDM ASM oracle OAS PGA shared pool ?p?st????? Oracle Application Server 10g consultans Oracle ERP CRM Apache WebUtil oracle 10g 11g 12g New Features Oracle courses development Oracle News forums Oracle Technical Docs FAQ Oracle Professionals Oracle DataCenter Data Center IT Oracle prices oracle software pricelist oracle carriers Oracle RDBMS Oracle Σπύρος Καπαρέλης Oracle Fusion Spiros Kaparelis oracle Spyros Kaparelis