cancel
Showing results for 
Search instead for 
Did you mean: 

Reorganize composite indexes

huber1
Participant
2,779

I'd like to reindex (reorganize) the indexes of the database primary and foreign key indexes. Some of them are composite indexes (both primary and foreign key). There is mentioning in the Sybase DOCX of reorganizing composite indexes here:

http://dcx.sybase.com/index.html#1201/en/dbusage/improving-using-perform.html

But if I enter these terms in Search there I get no results. I am looking for the commands that do the reorganizing of indexes so I can use them in a script? I know I can rebuild indexes "manually" in Sybase Central. Regards, Robert

Accepted Solutions (0)

Answers (2)

Answers (2)

Breck_Carter
Participant

See REORGANIZE TABLE statement... in spite of the name, it can be used to reorganize indexes.

huber1
Participant
0 Kudos

I overlooked that, thank you for pointing it out.

VolkerBarth
Contributor

Another means would be the ALTER INDEX statement with the REBUILD clause - I don't know whether this behaves differently from a REORGANIZE TABLE with the corresponding indexes...

huber1
Participant
0 Kudos

Thanks Volker for this alternative. Both statements do work. I also wonder what might be the difference, if there is one?

VolkerBarth
Contributor
0 Kudos

A good question on its own - I simply don't know. Feel free to ask that as a separate question:)