optimize indexes automagically