Solved

Can I force oracle to rebuild index from table !

Posted on 2002-04-25
8
2,360 Views
Last Modified: 2010-08-05
I a having a problem of corrupt index. I tried rebuild option but is still giving problem. After reading the usage I realised rebuild does not refer to data table but creates index from existing index.
any ideas ? how can I refer to table to rebuild the index orI have to drop and recreate it (which i don't want to do)
thanks
0
Comment
Question by:anil27
8 Comments
 
LVL 3

Accepted Solution

by:
p_yaroslav earned 50 total points
ID: 6967862
Hi!

Usually you have to drop and recreate corrupted index.
Ihave like problem on Oracle 8.0.5. Only after recreating index - all become OK!



Best regards!
Yaroslav.
0
 
LVL 47

Expert Comment

by:schwertner
ID: 6967864
Building indexes Oracle tries to use existing indexes. If you want to get a brand new index drop the corrupted index. The index creation will take more time as yet, but your new index will reflect the current situation. To help Oracle to index the table fast use big temparary tablespace for the implicit sorting which Oracle does indexing tables.
0
 

Author Comment

by:anil27
ID: 6968099
thanks !
I have dropped and recrested it and the problem is solved.
0
 
LVL 22

Expert Comment

by:DrSQL
ID: 6968582
anil27,
   In your comment (and it was very nice of you to provide feedback) you said that Yaroslav's answer solved your problwm, yet you graded it with a B.  Was this a mistake?  If so, we can get a moderator to fix it.  Remember, that the grades are to indicate whether or not the posted information directly led to your solution.  It's not about how hard it was or whether or not you liked the answer.  Grades are important for those searching for solutions in the knowledge base - they probably won't look at a "B" answer and yet that answer solved your problem.  Please post one more time to clarify this for us.

Good luck!
0
PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

 
LVL 4

Expert Comment

by:asimkovsky
ID: 6970336
There was a bug in older versions of Oracle8 (and maybe even up to 8.1.6). If an index already exists on a set of columns (say col1, col2, col3), and then you create an index that is a subset of that index (col1), Oracle will build the index by reading from the concatenated index, rather than the table. This is normal behavior. However, the bug was causing the index to be corrupted, and just doing a rebuild of the index would not fix it.  The only way to do it properly was to create the subset index first, then create the concatenated index afterwards, forcing Oracle to read from the table for each index.

Of course, if you just migrated to 8.1.7, the problem went away.

Andrew
0
 

Author Comment

by:anil27
ID: 6970389
thanks Andrew for the insight.
Regards
0
 

Author Comment

by:anil27
ID: 6970404
DrSql !
I have graded the answer as per my expectations and I have reasons for it :
The solution I accepted as answer is the one which actually worked and first posted so accepted. But this solution is not comprehensive as mentioned by scwertner the temporary tablespace may be required on some platforms. Moreover I asked for some insight into how can I make Oracle to look in to table again for reindexing which Andrew tried to answer.
I may be wrong but this is my perception about grading.
I hope I answered your concerns.
thanks & regards
0
 

Expert Comment

by:xrchen
ID: 11000077
by the way, how do you know the index is corruptted.
thanks,
0

Featured Post

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Join & Write a Comment

Suggested Solutions

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…
How to Create User-Defined Aggregates in Oracle Before we begin creating these things, what are user-defined aggregates?  They are a feature introduced in Oracle 9i that allows a developer to create his or her own functions like "SUM", "AVG", and…
This video explains at a high level with the mandatory Oracle Memory processes are as well as touching on some of the more common optional ones.
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.

760 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

Need Help in Real-Time?

Connect with top rated Experts

18 Experts available now in Live!

Get 1:1 Help Now