When I moved a table from one TS to another, the indexes became invalid. why?
Printable View
When I moved a table from one TS to another, the indexes became invalid. why?
Because rowid of the rows in the table changes and index becomes unusable not invalid.
Relative file number changes...so does Block number....when u move a segment from one tablespace to other.
Due to which RowId changes & index will be holding OLD rowid so it goes to INVALID state.
Abhay.
thanks for the reply guys. is this issue solved in 9i?
U need to rebuild index in 9i as well...
Abhay.
Abhay, here i would like to comment that status values for indexes can be 'VALID' or 'UNUSABLE'. Other stored objects can be 'VALID' or 'INVALID.' Either all_indexes, DBA_INDEXES or USER_INDEXES should be querried for the status of indexes.Quote:
Originally posted by abhaysk
Due to which RowId changes & index will be holding OLD rowid so it goes to INVALID state.
HTH
Wonder why didn't Oracle take care of such small things in 9i. All it was supposed to do is rebuild the index whenever such operations happened. Wonder if there is any specific reason why they didn't do it (or did they overlook such issues !)Quote:
Originally posted by abhaysk
U need to rebuild index in 9i as well...
Abhay.
Amar I didnt literally mean INVALID...it was jus to empasize theat indexes wud be unused if u moved the table.Quote:
Originally posted by adewri
Abhay, here i would like to comment that status values for indexes can be 'VALID' or 'UNUSABLE'. Other stored objects can be 'VALID' or 'INVALID.' Either all_indexes, DBA_INDEXES or USER_INDEXES should be querried for the status of indexes.
HTH
Abhay.
Aah you mean to say "I literally mean INVALID" or did i get it wrong :)Quote:
Originally posted by abhaysk
Amar I didnt literally mean INVALID...
Abhay.
Good Q...i blv they wudnt have overlooked..Quote:
Originally posted by quester
Wonder why didn't Oracle take care of such small things in 9i. All it was supposed to do is rebuild the index whenever such operations happened. Wonder if there is any specific reason why they didn't do it (or did they overlook such issues !)
Probably oracle corp guys might have thought....i mean logically...
that when user wants to move a table, then he may want to recreate the index in diff tablespace...in that case it wud be uswise to rebuild itself...;):p
i am waiting for Jomodic to come up with resaons...
abhay.