Indexing optimization