获得徽章 0
学习:流程图->SCXML->stately.ai
评论
[MARK] TS to JSDoc: github.com
评论
前端工程师 @潜水大师
#Offset pagination vs Cursor pagination

Cursor pagination is most often used for real-time data due to the frequency new records are added and because when reading data you often see the latest results first. There different scenarios in which offset and cursor pagination make the most sense so it will depend on the data itself and how often new records are added. When querying static data, the performance cost alone may not be enough for you to use a cursor, as the added complexity that comes with it may be more than you need.

Offset pagination allows you to jump to any page, while in Cursor-based pagination, you can only jump into the next/previous page.

There is also a substantial difference in the implementation underneath. The Offset will very likely have to load all the records from the first page to the page you want to get. There are techniques to avoid this.

More: ignaciochiazzo.medium.com
展开
评论
下一页
个人成就
文章被点赞 35
文章被阅读 6,538
掘力值 368
收藏集
2
关注标签
55
加入于