Posts about indexing
Articles, guides and engineering notes about indexing from the Relyt One team.
2 articles

Keyset pagination in Postgres: why OFFSET gets slow on deep pages, and the cursor query that doesn't
Why LIMIT/OFFSET pagination slows down page after page in PostgreSQL and returns duplicate or missing rows while data changes, and how keyset (cursor, seek) pagination with a row comparison and a matching index fixes both. Includes measurements on 1,000,000 rows, previous-page and has-more queries, and four traps: non-unique sort keys, NULLs, mixed sort directions and missing indexes. Every query replayed on Postgres 17.11.

UUIDv7 vs bigint vs UUIDv4 primary keys in Postgres 17: we measured the difference
Index size, page splits, WAL volume and insert cost for bigint identity, random UUIDv4 and time-ordered UUIDv7 primary keys, measured on PostgreSQL 17.11 with 5 million rows. Includes a UUIDv7 function for Postgres 17 that builds an index as compact as Postgres 18's built-in, and why the simple millisecond version doesn't in bulk loads.