-- run 2 -- keyset, page 10000 (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-07-05 04:33:00+00","940853"] Limit (cost=0.42..1.92 rows=20 width=37) (actual time=0.014..0.024 rows=20 loops=1) Buffers: shared hit=23 -> Index Scan Backward using orders_created_at_id_idx on orders (cost=0.42..59669.32 rows=800053 width=37) (actual time=0.013..0.022 rows=20 loops=1) Index Cond: (ROW(created_at, id) < ROW('2026-07-05 04:33:00+00'::timestamp with time zone, '940853'::bigint)) Buffers: shared hit=23 Planning Time: 0.063 ms Execution Time: 0.059 ms