De-fragmenting tables. Some questions
Posted in 1997
Hi all, One of our heavily accessed tables is pretty badly fragmented and I need to de-fragment it ( if such a word exists ). Before you ask, ours is an OLTP kind of env, and so fragmenting is not such a good idea. 1. What is the best way to de-fragment. Should I create a whole new chunk big enough to hold my table ( about 12 million rows, with rowsize = 144 ) and then some ( to allow for growth ) ? In that case, can I de-allocate the space that this table is currently using in the old chunk and re-use it in the new chunk ?? But then, I am not sure we can reduce the size of a chunk, can we ( though we can reduce the size of a logical volume ). 2. Or am I supposed to re-arrange all the tables ( atleast the ones that are hopelessly intermingled with this table ) across the existing chunks to keep this table in one chunk and push the rest of the tables on to the remaining ? 3. Is there a third(fourth, fifth .. ) way ?? What are the pros/cons, and what precautions that I should take ( apart from a backup ?! ) Also, what is the difference in keeping this table on a dbspace vs a chunk of a dbspace ?? As usual, thanks for all suggestions Sujata ******************************************************************************** ***** Sujata Soman E-Mail: ssoman@omm.com Database Administrator ( Informix ) O'Melveny & Myers, Los Angeles ******************************************************************************** ******