Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
majewsky
on Oct 16, 2017
|
parent
|
context
|
favorite
| on:
Efficient pagination of a SQL table with 100M reco...
Some APIs expose the key offset mechanism. For example, in most OpenStack APIs, instead of ?page=2, you say ?marker=12345, where 12345 is the ID of the last object on the previous page. The end of the pagination is signalled by an empty response.
pdkl95
on Oct 16, 2017
[–]
HN uses this technique for each user's comment list ("threads" link in the header). The "next" link at the bottom of each page is
/threads?id=${USER_NAME}&next=${NEXT_COMMENT_ID}
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: