You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Consider a scenario where I retrieve and render X elements from the table for my first page of database results and allow the user to page into N other pages of X results each. Assume there is P% chance the user will naviate to the page i+1 given they are on page i.
What is the best strategy from the app developers perspective here? (options below)
Query the database for the first page and then query the database again via LIMIT...OFFSET for each next page
Prefetch results for M pages and only access the database on the first page
It would be great if benchmarking gave some insight into how to navigate this situation.
The text was updated successfully, but these errors were encountered:
docs: https://www.postgresql.org/docs/current/queries-limit.html
context: https://news.ycombinator.com/reply?id=37501161&goto=item%3Fid%3D37499375%2337501161
Consider a scenario where I retrieve and render
X
elements from the table for my first page of database results and allow the user to page intoN
other pages ofX
results each. Assume there is P% chance the user will naviate to the pagei+1
given they are on pagei
.What is the best strategy from the app developers perspective here? (options below)
LIMIT...OFFSET
for each next pageM
pages and only access the database on the first pageIt would be great if benchmarking gave some insight into how to navigate this situation.
The text was updated successfully, but these errors were encountered: