Paginate the query to reduce memory usage
Merge pull request #1 from 25th-floor/master

Using a paginated query to reduce memory usage