1
SQLBeginner#fundamentals
LIMIT/OFFSET is simple but slows down at large offsets because skipped rows are still read. Keyset (seek) pagination filters on the last seen sorted key and stays fast.
-- offset pagination SELECT * FROM orders ORDER BY id LIMIT 20 OFFSET 10000; -- keyset pagination SELECT * FROM orders WHERE id > 10020 ORDER BY id LIMIT 20;