optimizations on the indexer