Reduce scope of locks when paginating to alleviate DB contention.