Alter index shrink space vs alter index rebuild?
My segment advisors recommend that i shrink space for an index. When I analyze my index using my own script (check for percentage of deleted rows and the height), it shows that i should perform a rebuild for the index.
Now, I am confuse between the below:
(1) alter index XXX shrink space
(2) alter index XXX rebuild.
What is the differences between the 2 and which should i peform first?
Help needed urgently! Thanks in advance.