Stop Loading Entire Tables: Pagination Choices in Rails Active Record
Pagination keeps Rails controllers from loading entire tables into memory. Compare offset pagination with LIMIT/OFFSET to cursor pagination using a stable key, and see how to slice ActiveRecord safely.