Optimize iterations on paging