Simplified limit + offset algorithm.