Reduce the number of queries.