Abstract: Disclosed herein are system, method, and computer program product embodiments for sorting a disarranged index keys in an index. First an operation is performed on a table that includes an index set on at least one column, where the operation causes the index keys in the index to become disarranged. The disarranged index keys are rearranged into a proper order using an in-place index sort. To rearrange the index keys in the index, a determination is made whether the index is a tail-end index and whether the index is a fixed-size index. Based on the determination, the in-place index sort is performed on the index, where the in-place index sort arranges the index keys in the index into the proper order.