Re: Efficient pagination using multi-column cursors

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxx> 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:

https://www.cybertec-postgresql.com/en/keyset-pagination-with-descending-order/

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


Cheers,
Márton


[Postgresql General]     [Postgresql PHP]     [PHP Users]     [PHP Home]     [PHP on Windows]     [Kernel Newbies]     [PHP Classes]     [PHP Books]     [PHP Databases]     [Yosemite]

  Powered by Linux