Optimal Performance of Inverted Files