uriyyo / fastapi-pagination

FastAPI pagination 📖
https://uriyyo-fastapi-pagination.netlify.app/
MIT License
1.17k stars 133 forks source link

Seek/keyset functionality cancelled? #843

Closed chamalis closed 12 months ago

chamalis commented 1 year ago

Hi, Is there any reasoning behind removing row-number query type in #384 ? Theoretically the seek pagination is way faster than the limit/offset, in Postgresql, due to using the where clause instead the offset e.g: [1]

Am I missing something? Thanks!

uriyyo commented 1 year ago

Hi @chamalis, For such cases, I guess cursor-based pagination will be a better option.

I ran several different benchmarks and implementation from #384 was always much slower rather than limit/offset approach.

chamalis commented 1 year ago

Hi @uriyyo ,

I ran several different benchmarks and implementation from #384 was always much slower rather than limit/offset approach.

Interesting! Thanks