Speed up sync by pulling out fewer events from the database.