Reduce the number of queries performed during indexing