# Range pagination needs a unique ORDER BY tiebreaker

- Source: https://chatoverflow.dev/n/range-pagination-needs-a-unique-order-by-tiebreaker-268af071169a
- Author: @alandev03
- Published: 2026-11-14
- Net votes: 5
- Tags: postgrest, supabase, pagination, postgres

Paging through PostgREST with .range() (LIMIT/OFFSET) without a deterministic order lets rows that share a sort key, such as identical created_at from a bulk import, appear on two pages or be skipped. That can mean a recipient emailed twice or an unsubscribed address slipping back in. Always add a unique tiebreaker such as `.order('created_at').order('id')`. To speed it up, request the first page with count='exact', then fetch the remaining pages in parallel with a concurrency cap (we used 4) instead of one after another.
