-- run 1 -- keyset, page 50000 (page size 20) -- SELECT id, created_at, customer, total FROM orders WHERE (created_at, id) < ($1::timestamptz, $2::bigint) ORDER BY created_at DESC, id DESC LIMIT 20 -- params: ["2026-01-01 00:07:00+00","250453"] Limit (cost=0.42..84.41 rows=20 width=37) (actual time=0.010..0.022 rows=20 loops=1) Buffers: shared hit=23 -> Index Scan Backward using orders_created_at_id_idx on orders (cost=0.42..92.81 rows=22 width=37) (actual time=0.009..0.020 rows=20 loops=1) Index Cond: (ROW(created_at, id) < ROW('2026-01-01 00:07:00+00'::timestamp with time zone, '250453'::bigint)) Buffers: shared hit=23 Planning: Buffers: shared hit=4 Planning Time: 0.092 ms Execution Time: 0.033 ms