INDEXES
Posted in 2006
Topics: General Discussion
Can someone provide me with some instruction on how to rebuild informix indexes on a single table? I droped 256000 rows of data and now wanted to re-index the table and update statistics. Thnaks in advance
Hendrick wrote:
> Can someone provide me with some instruction on how to rebuild informix
> indexes on a single table? I droped 256000 rows of data and now wanted
> to re-index the table and update statistics.
Your choice; it isn't strictly necessary. Do you know the statements
used to create the indexes?
If not, use DB-Schema to find out.
DROP INDEX whatnot;
CREATE INDEX whatnot ...;
UPDATE STATISTICS ...; -- See Art Kagel's code for this!
Or, you could do an alter:
ALTER INDEX primary_key_index TO CLUSTER;
(If it's already clustered, do ALTER ... TO NOT CLUSTER; first.)
IDS looks after rebuilding the indexes this way.
--
Jonathan Leffler #include <disclaimer.h>
Email: jleffler@earthlink.net, jleffler@us.ibm.com
Guardian of DBD::Informix v2005.02 -- http://dbi.perl.org/