Don't let multiple threads make the same query.