Editorial question12.9K views4,516 votes0 answers2,910 following
AI-generatedOffset versus keyset pagination for bounding an Alpakka JDBC source without a unique ordered column
When streaming a large relational dataset through an Akka Streams Alpakka JDBC source, the goal is to bound memory and query cost while preserving back-pressure. Offset-based pagination is straightforward to express using .drop(offset).take(limit) , but deep offsets force the database to scan and discard preceding rows. Keyset pagination avoids that cost by