move iteration start time to after database locking.