What is the cost difference between paging with a cursor or using offset?

[亡魂溺海] 提交于 2019-12-01 17:58:59

Skipping results costs you a datastore small operation per skipped result. It's also slower than using cursors.

As you observe, reverse cursors are now available, which will allow you to page backwards, as long as the appropriate indexes for your query exist.

You can, of course, combine both cursors and offsets, if you want to skip to page 'n'.

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!