perform fewer queries on some pages