RSS Amplifier

Cole's blog · Aug 3, 2024

Don't use LIMIT OFFSET for pagination in PostgreSQL

0
Sign in to vote or save

This page cannot be shown here. You can still read it on the original site — the toolbar below keeps your place in the directory.

Introduction LIMIT / OFFSET pagination is one of the most common ways to implement pagination in your service. You can find countless tutorials online describing the method and its even the default in the popular web framework Django1. While it gets the job done for most use cases and smaller tables, you may begin to run into performance issues when paginating tables with millions of rows. Django…

Introduction LIMIT / OFFSET pagination is one of the most common ways to implement pagination in your service. You can find countless tutorials online describing the method and its even the default in the popular web framework Django1. While it gets the job done for most use cases and smaller tables, you may begin to run into performance issues when paginating tables with millions of rows. Django and Laravel2 even have warnings in their documentation about this type of pagination.

Read on /2024/08/03/pagination-in-postgresql/

Comments

Nothing yet. Say the first thing.

    Sign in to join the conversation.