In previuos post we disscused how to find tablespace frgmantation.Here we will disscus how to avoide table fragmentation in oracle.
Once we identify tablespace fragmentation , what do you do about it? Honeycomb fragmentation is easy to fix. All that needs to be done is to combine adjacent free segments into one by issuing a coalesce statement:
alter tablespace USERS coalesce;
Bubble fragmentation is more difficult to handle. Of course, the best course of action is to prevent it in the first place. The best weapon for this is to use locally-managed tablespaces.If you are using Oracle 8.1.6 or higher you can convert any current dictionary-managed tablespaces to locally-managed tablespaces.
If you are afraid of how long this procedure might take on large tablespaces, do not be. It actually runs very fast. If, for some reason, you would like to take a tablespace that is locally-managed back to dictionary management, you can issue this command:
Expert are always welcome for their valuable comment or suggestion for the above post.