DEV Community

Discussion on: Why You Shouldn't Use OFFSET and LIMIT For Your Pagination

 
siy profile image
Sergiy Yevtushenko

In general case optimization of the query is based on indexes (and a lot of other other information) anyway. The approach described in post relies on the primary key indexing, but when ordering does not match primary key ordering, then appropriate index is necessary.