Another algorithm for the index selection