Re:What's new in the Postgres 16 query planner (a.k.a. optim...
by jasonjayr on Friday February 09, 2024 @08:49AM
(#39314809)
Paginating with an open cursor, perhaps?
[ Parent
| on HN ]
Re:What's new in the Postgres 16 query planner (a.k.a. optim...
by londons_explore on Friday February 09, 2024 @10:15AM
(#39315588)
Exactly. Web services of the 90's would let a user run a query which returns say 1 million rows, but view them in pages of perhaps 10 rows with a next page/previous page link. The query runs only once, and the million row result set is never created in full - a bit more of it is generated each time the user clicks next page. And if the user clicks previous page, the query needs to be reversible to regenerate previous results.
Very few people use that functionality today to my knowledge. Keeping a query 'open' uses hundreds of megabytes of RAM on the server, so most applications want the query done and ended right away.