password history: just limit the result set range to simplify iteration logic