The fix would be a simple limit en an ski a certain amont, the just pud pagin in the ab as part of the query. Pagination's huge, especially once you've got good indexings,. can be so, so powerful. The gemradvce, i think, is if you couin t be doing aggregation work, try to do it date. They have incredibly smart algrithms built into them.