Re: Rebuilding Indexes and Recovering Space
Posted in 2000
From: Joe Maloney <mpir@compuserve.com> > >I am new to Informix, having mis-spent (in this forum's eyes) the last >dozen and more years working with Brand O and Brand MSS. Never mind. :-) >I have been tasked with rebuilding indexes on one of our databases. I >have spent a significant amount of time looking for the simple >equivalent of Brand O's 'rebuild index' command or Brand MSS magic >button. Well, there's a couple of ways of doing this: 1. Disable/enable indexes; (2 statements) 2. Take a schema and drop/recreate; (lots of statements) 3. Alter fragment on index; (1 statement) >In searching this archive, I found several references to 'set indexes >for table <fred> disable' and '...enable' that appears to be the >solution I have been looking for (I am not going to quibble about two >lines versus 1, as long as I don't have to research the 'create index' >statement.) > >My question is: will using the set disable/enable pair recover dead >space from the index that may remain from massive deletes from it's >tables? Or this this automagically handeld by the special 'Btree >Cleaning Thread' generated by 'Update Statistics'? or do I need to drop >and recreate the index(es)? AFAIK, disable/enable will rebuild the index and so should do the job, but I stand under correction here. The alter fragment will also rebuild the index and so should also do the job. I'd probably go for alter fragment. ________________________________________________________________________ Get Your Private, Free E-mail from MSN Hotmail at http://www.hotmail.com