Optimize the index according to the fetch that is done