Editorial question142.9K views3,002 votes0 answers4,456 following
AI-generatedOffset pagination vs keyset cursors for a Node.js API that needs both deep pages and page jumps
I'm designing a read API in Node.js (using the pg driver against PostgreSQL) over a table expected to reach tens of millions of rows. Two documented pagination approaches seem to conflict on my requirements. Offset pagination ( LIMIT / OFFSET ) gives clients random page access and works naturally with a page-number UI, but I understand the database scans and