-- run 1 -- 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.012..0.022 rows=20 loops=1) Buffers: shared hit=23 -> Index Scan Backward using orders_created_at_id_idx on orders (cost=0.42..59559.47 rows=796758 width=37) (actual time=0.012..0.021 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.068 ms Execution Time: 0.053 ms