Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

rebuild an Index Informix Database

Status
Not open for further replies.

inma

Technical User
Apr 5, 2001
49
ES
I need to rebuild an Index Informix Database, but I don´t know how to do it.
Can anybody help me?
 
inma:

If you want to rebuild an index, first you must drop it. Logged in as user informix, from dbaccess or isql, query language:

#Suppose your index name is cr_index1:

drop index cr_index1

after dropping the index, recreate it from isql or dbaccess:

create index cr_index on table_name (col_name1, col_name2)

if it's a unique index, it's:

create unique index .....

Informix provides an argument to the oncheck utility (if you're running informix online) which will "fix" an index without dropping it:

for the entire database:

oncheck -cI <database name>

for a particular table:

oncheck -cI <database name>:<table_name>

BTW, there is an Informix Online forum in Tek-tips, if you're interested.

Regards,


Ed
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top