3 ms·
It's a product thing. For visual pagination, people are used to skip pages. So you have to use offsets. You can limit the the number of pages you can request an
by tzahifadida 4y ago
It's a product thing. For visual pagination, people are used to skip pages. So you have to use offsets. You can limit the the number of pages you can request and the size.
For machine api's, you can design the most efficient solution. Which is probably some streaming solution. But these are difficult for clients. So usually you compromise. Most of the time I use pages because I don't want developers to churn of this is too hard for them to use keys or cursors. You can also use a schema based tenant system where applicable which makes the problems easier with smaller indexes and tables to sort.
- ignaciochiazzo 4y agoSometimes the data is so big, and performance is critical that you don't have any other option than not to use offset.