Synthetic chat rows: 12000 Query: keyset range on (created_at, id), LIMIT 50 QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------------------------- Limit (cost=0.42..32.35 rows=50 width=45) (actual time=0.038..0.052 rows=50 loops=1) Buffers: shared hit=7 -> Index Only Scan using ix_messages_chat_created_id on messages (cost=0.42..959.48 rows=1502 width=45) (actual time=0.037..0.049 rows=50 loops=1) Index Cond: ((chat_id = '16e6e2a6-54aa-4985-b7c0-9f0e0ecb0047'::text) AND (ROW(created_at, id) > ROW((CURRENT_TIMESTAMP - '01:40:00'::interval), ''::text))) Heap Fetches: 50 Buffers: shared hit=7 Planning: Buffers: shared hit=136 Planning Time: 0.620 ms Execution Time: 0.111 ms (10 rows)