Call now: 252-767-6166  
Oracle Training Oracle Support Development Oracle Apps

 
 Home
 E-mail Us
 Oracle Articles
New Oracle Articles


 Oracle Training
 Oracle Tips

 Oracle Forum
 Class Catalog


 Remote DBA
 Oracle Tuning
 Emergency 911
 RAC Support
 Apps Support
 Analysis
 Design
 Implementation
 Oracle Support


 SQL Tuning
 Security

 Oracle UNIX
 Oracle Linux
 Monitoring
 Remote s
upport
 Remote plans
 Remote
services
 Application Server

 Applications
 Oracle Forms
 Oracle Portal
 App Upgrades
 SQL Server
 Oracle Concepts
 Software Support

 Remote S
upport  
 Development  

 Implementation


 Consulting Staff
 Consulting Prices
 Help Wanted!

 


 Oracle Posters
 Oracle Books

 Oracle Scripts
 Ion
 Excel-DB  

Don Burleson Blog 


 

 

 


 

 

 
 

Fastest Way to Rebuild Oracle Index?

Oracle Database Tips by Donald BurlesonSeptember 15, 2015

Question: I have to rebuild several very large indexes and I need to know the fastest way to rebuild the index. 

What are the performance options for a fast index rebuild?

Answer:  When Oracle rebuilds an index, you have several tuning options to make it faster:  

  1. PARALLEL Scan:  Start an index rebuild with a full- scan, and this full-scan can be parallelized according to your cpu_count.

  2. NOLOGGING:  You can also use the NOLOGGING option for super-fast index rebuilding.  The only danger with using nologging is that you must re-run the create index syntax if you perform a roll-forward database recovery.  Using nologging with create index can make index rebuilding up to 30% faster.
     
  3. Partition the index:  If you have purchased the partitioning option, you can rebuild a local partitioned index faster than a single large index.

  4. SSD:  Some shops will use temporary solid-state disk to speed-up the initial index writes and move the index to platter disk storage at a later time.

  5. Parallel index rebuild jobs:  Also, remember that if you have the spare CPU and the indexes are on different disks, you can submit many index rebuild jobs simultaneously.  On a large server you can simultaneously rebuild dozens of indexes, each using parallel query, sort of a parallel parallelism for fast index rebuilds.  

Here is a summary of the differences between parallel index rebuilding techniques:

  • Alter index rebuild online parallel :  During a online index rebuild, Oracle will make a snapshot log on the target table to hold DML activity, read the table in a full-table scan (read consistent), build the new index and then apply the changes from the snapshot log after the index has been rebuilt.  You can use NOLOGGING and PARALLEL with the online rebuild:

alter index my_idx rebuild online parallel 63 nologging;
alter index my_idx noparallel;
alter index my_idx logging;

  • Alter index rebuild parallel:  During a "regular" index rebuild, an exclusive lock occurs as the existing index is read.  Hence, this command is designed for scheduled downtime periods where there is no DML activity.  However, this operation can be parallelized and run in NOLOGGING mode:

alter index my_idx rebuild parallel 63 nologging;
alter index my_idx noparallel;
alter index my_idx logging;

You can also automate and schedule the rebuilding of indexes.  

Also see these important notes on index rebuilding and rebuild performance.

 
Get the Complete
Oracle SQL Tuning Information 

The landmark book "Advanced Oracle SQL Tuning  The Definitive Reference"  is filled with valuable information on Oracle SQL Tuning. This book includes scripts and tools to hypercharge Oracle 11g performance and you can buy it for 30% off directly from the publisher.

 


 

 

Burleson is the American Team

Note: This Oracle documentation was created as a support and Oracle training reference for use by our DBA performance tuning consulting professionals.  Feel free to ask questions on our Oracle forum.

Verify experience! Anyone considering using the services of an Oracle support expert should independently investigate their credentials and experience, and not rely on advertisements and self-proclaimed expertise. All legitimate Oracle experts publish their Oracle qualifications.

Errata?  Oracle technology is changing and we strive to update our BC Oracle support information.  If you find an error or have a suggestion for improving our content, we would appreciate your feedback.  Just  e-mail:  and include the URL for the page.


                    









Burleson Consulting

The Oracle of Database Support

Oracle Performance Tuning

Remote DBA Services


 

Copyright © 1996 -  2016

All rights reserved by Burleson

Oracle ® is the registered trademark of Oracle Corporation.


 

��  
 
 
Oracle Training at Sea
 
 
 
 
oracle dba poster
 

 
Follow us on Twitter 
 
Oracle performance tuning software 
 
Oracle Linux poster