advertisement
Premier Club Log In/Registration
  Include Code  Search Tips
TODAY'S HEADLINES  |   ARTICLE ARCHIVE  |   SKILLBUILDING  |   TIP BANK  |   SOURCEBANK  |   FORUMS  |   NEWSLETTERS
Browse DevX
Amazing Results
Do you know any other tips/tricks for detecting unbalanced indexes? Contact Boris Milrud at milrud@hotmail.com or talk in the database.oracle.general discussion group!
Partners & Affiliates
advertisement
advertisement
advertisement
Average Rating: 3.5/5 | Rate this item | 23 users have rated this item.
 

Detecting and Fixing Out-of-Balance Indexes

Indexes are Oracle database objects that provide a fast, efficient method of retrieving data from database tables. 


advertisement
ndexes are Oracle database objects that provide a fast, efficient method of retrieving data from database tables. The physical addresses of required rows can be retrieved from indexes much more efficiently than by reading the entire table. Effective indexing usually results in significant improvements to SQL performance too.

Oracle's default index structure is B*-tree, which stands for "Balanced tree." It has a hierarchical tree structure. At the top is the header. This block contains pointers to the appropriate branch block for any given range of key values. The branch block points either to another branch block, if the index is big, or to an appropriate leaf block. Finally, the leaf block contains a list of key values and physical addresses (ROWIDs) of rows in the database.

Theoretically, any row in a table, even a big one, could be retrieved in a maximum of three or four I/Os (input/output operations): one header block, one or two branch block(s), and one leaf block.

Oracle indexes are not self-balancing. They become fragmented after a large number of INSERTs and DELETEs, which may lead to significant performance degradation. In this 10-Minute Solution I show you how to detect these "out-of-shape" indexes and cure them.



How do you prevent Oracle indexes from becoming fragmented?



Use a PL/SQL stored procedure to detect out-of-balance indexes and rebuild them by utilizing index statistics from the INDEX_STATS view. Run it periodically to keep indexes in your database in good shape.

  Next Page: How Indexes Become Fragmented
Page 1: IntroductionPage 3: Is Your Index Out of Balance?
Page 2: How Indexes Become FragmentedPage 4: A PL/SQL Procedure
Please rate this item (5=best)
 1  2  3  4  5
advertisement
Advertising Info  |   Member Services  |   Permissions  |   Contact Us  |   Help  |   Feedback  |   Site Map  |   Network Map  |   About

internet.commediabistro.comJusttechjobs.comGraphics.com

Search:

WebMediaBrands Corporate Info

Legal Notices, Licensing, Reprints, Permissions, Privacy Policy.
Advertise | Newsletters | Shopping | E-mail Offers | Freelance Jobs