Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

rebuilding index in oracle 10.2.0.3 online

Posted on 2009-03-30
4
Medium Priority
?
952 Views
Last Modified: 2013-12-18
Experts,

i am planning to rebuild index online. my DB version is 10.2.0.3. i need some suggestion to rebuilding index.

how to find which index need to be rebuild?
what cases we need to rebuild indexes?
how to rebuild local indexes (partitioned indexes)?
how to rebuild global indexes?
what are the precautions i need to take while rebuild index online.
is there any negative impacts if i rebuild the index online?

please any one guide me to rebuild indexes.  
0
Comment
Question by:pavan27
  • 3
4 Comments
 
LVL 4

Expert Comment

by:marper
ID: 24021870

Rebuilding indexes online will slow down an access to the corresponding table so do it hen there is not much activity going on around.
To rebuild an index:
 ALTER INDEX <schema_name>.<index_name> REBUILD;
To rebuild a partitioned index:
rebuild the individual partitions:

ALTER INDEX <index-name>
  REBUILD PARTITION <partition-name>
PARALLEL(DEGREE 4, INSTANCES 3)  
0
 
LVL 1

Author Comment

by:pavan27
ID: 24022162
Thanks for quick response.

how do i find which index need to be rebuild?
is there any way to find which job /procedure/process will be slow while we are rebuilding index online?

is there any way to find resource consumption like temp space, memory utilization before rebuild the index?
0
 
LVL 4

Expert Comment

by:marper
ID: 24022258
I attached the script which determines whether an index is a good candidate for a rebuild or for a bitmap index.  All indexes for a given schema or for a subset of schema's are analyzed (except indexes under SYS and SYSTEM).


rebuild-indx.sql.txt
0
 
LVL 4

Accepted Solution

by:
marper earned 2000 total points
ID: 24022304

I would also suggest that you read these articles too:
http://en.wordpress.com/tag/index-rebuild/ 
 
You will find some answers of your questions
Generally, when an index is sewed, parts of an index are accessed more frequently than others. As a result, disk contention may occur, creating a bottleneck in performance.
It is important to periodically examine your indexes to determine if they have become skewed and might need to be rebuilt.
Oracle index nodes are not physically deleted when table rows are deleted, nor are the entries removed from the index. Rather, Oracle "logically" deletes the index entry and leaves "dead" nodes in the index tree where that may be re-used if another adjacent entry is required.
 
However, when large numbers of adjacent rows are deleted, it is highly unlikely that Oracle will have an opportunity to re-use the deleted leaf rows, and these represent wasted space in the index. In addition to wasting space, large volumes of deleted leaf nodes will make index fast-full scans run for longer periods.  
0

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Working with Network Access Control Lists in Oracle 11g (part 1) Part 2: http://www.e-e.com/A_9074.html So, you upgraded to a shiny new 11g database and all of a sudden every program that used UTL_MAIL, UTL_SMTP, UTL_TCP, UTL_HTTP or any oth…
Cursors in Oracle: A cursor is used to process individual rows returned by database system for a query. In oracle every SQL statement executed by the oracle server has a private area. This area contains information about the SQL statement and the…
This video shows how to copy a database user from one database to another user DBMS_METADATA.  It also shows how to copy a user's permissions and discusses password hash differences between Oracle 10g and 11g.
This video explains what a user managed backup is and shows how to take one, providing a couple of simple example scripts.
Suggested Courses

877 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question