Minimizing amount of data stored in the temporal last n index