BC remote Oracle DBA - Call (800) 766-1884
Free Oracle Tips

Oracle Consulting Oracle Training Development

Remote DBA

 

Remote DBA Plans
Remote DBA Service

 
Remote DBA Oracle Home
Remote DBA Oracle Training
Remote DBA SQL Tuning Consulting
Remote DBA Oracle Tuning Consulting
Remote DBA Data Warehouse Consulting
Remote DBA Oracle Project Management
Remote DBA Oracle Security Assessment
Remote DBA Unix Consulting
Burleson Books
Burleson Articles
Burleson Web Courses
Burleson Qualifications
Oracle Internals Magazine
Oracle Links
Remote DBA Oracle Monitoring
Remote DBA Support Benefits
Remote DBA Plans & Prices
Our Automation Strategy
What We Monitor
Oracle Apps Support
Print Our Brochure
Contact Us (e-mail)
Oracle Job Opportunities
Oracle Consulting Prices





   

 

 

   
  Oracle Tips by Burleson

Using Reverse-Key Indexes

A reverse-key index prevents unbalancing of the B-tree and the resulting hot blocking, which will happen if the B-tree becomes unbalanced. Generally, unbalanced B-trees are caused by high-volume insert activity in a parallel server where the key value is only slowly changing, such as with an integer generated from a sequence or a data value. A reverse key index works by reversing the order of the bytes in the key value; of course, the rowid value is not altered, just the key value. The only way to create a reverse-key index is to use the CREATE INDEX command. An index that is not reverse-key cannot be altered or rebuilt into a reverse-key index; however, a reverse-key index can be rebuilt as a normal index.      

One of the major limitations of reverse-key indexes is that they cannot be used in an index range scan, since reversing the index key value randomly distributes the blocks across the index leaf nodes. A reverse-key index can only use the fetch-by-key or full-index(table)scans methods of access. Let’s look at an

example:

See Code Depot   

The above command would reverse the values for the po_num column  as  it creates the index. This would assure random distribution of the values across the index leaf nodes. But what if we then determine that the benefits of the reverse key do not outweigh the drawbacks? We can use the ALTER command to rebuild the index as a NOREVERSE index:


www.oracle-script.com

Remote DBA Service
 

Oracle Tuning Book

Free Oracle dictionary reference poster

BC Oracle support

Oracle books by Rampant

Oracle monitoring software

North Carolina Oracle Users Group

 

 Arabian horse breeder

Seeing eye horses

 

 

Burleson is the American Team

American Flag

 

 

BC Remote Oracle Support
P.O. Box 511 • Kittrell, NC, 27544

Remote DBA

Remote DBA Services

 

Copyright © 1996 -  2011 by Burleson Enterprises. All rights reserved.

Oracle® is the registered trademark of Oracle Corporation.