ActiveRecord offset pagination performance degradation on large datasets
ActiveRecord utilizes .limit and .offset to bound queries, enabling standard offset-based pagination. However, as the offset value increases, the database must scan and discard all preceding rows, leading to linear performance degradation. While keyset pagination (seek method) avoids this scan by using indexed columns in a WHERE clause, Ruby on Rails does no