Re: Efficient pagination using multi-column cursors - Mailing list pgsql-performance

From large.goose2829@salomvary.com
Subject Re: Efficient pagination using multi-column cursors
Date
Msg-id 8a919391-8510-442b-b020-f9a9f4e80fbb@app.fastmail.com
Whole thread Raw
In response to Re: Efficient pagination using multi-column cursors  (Laurenz Albe <laurenz.albe@cybertec.at>)
List pgsql-performance
Folks, thanks everyone for the valuable inputs, I think I more-or-less understand now what the options are for my particular problem.

On Wed, Feb 26, 2025, at 17:14, Peter Geoghegan wrote:
On Wed, Feb 26, 2025 at 10:40 AM <large.goose2829@salomvary.com> wrote:
> Does this mean that it is not possible to come up with a plan that has the same performance as "WHERE (col_1, col_2, col_3) > (10, 20, 29)" using "handwritten" filters, or only for "mixed order"? Or not a theoretical limitation but a limitation of the current implementation of the query planner?

Perhaps the query planner should be taught to rewrite the query in
such a way as to make it unnecessary for you to do so -- I think that
that's what MySQL is doing for you. That is beside the point.

Would it make sense to file a feature request for PostgreSQL to implement that MySQL-like optimization mentioned earlier?

On Wed, Feb 26, 2025, at 17:15, Laurenz Albe wrote:
Here are my ideas for this situation:


Laurenz, your post is a goldmine of advanced solutions, thanks for sharing.


Cheers,
Márton

pgsql-performance by date:

Previous
From: Renan Alves Fonseca
Date:
Subject: Re: Bulk DML performance
Next
From: Motog Plus
Date:
Subject: Background writer not active