Limit (cost=0.29..5.11 rows=50 width=24) (actual time=0.009..0.020 rows=50 loops=1) Buffers: shared hit=5 -> Index Only Scan using messages_history_idx on messages (cost=0.29..482.66 rows=5003 width=24) (actual time=0.009..0.017 rows=50 loops=1) Index Cond: ((chat_id = 'a3e4d9b4-2c6b-47af-913e-663e57f5cff3'::uuid) AND (ROW(created_at, id) > ROW('2026-01-01 03:00:05+03'::timestamp with time zone, '677ea6b1-d3fb-471f-828b-16ca887b7a0d'::uuid))) Heap Fetches: 50 Buffers: shared hit=5 Planning: Buffers: shared hit=33 Planning Time: 0.116 ms Execution Time: 0.035 ms