Limit (cost=0.29..5.10 rows=50 width=24) (actual time=0.006..0.014 rows=50 loops=1) Buffers: shared hit=5 -> Index Only Scan using messages_history_idx on messages (cost=0.29..481.54 rows=5000 width=24) (actual time=0.006..0.011 rows=50 loops=1) Index Cond: ((chat_id = '6451ea94-2976-441e-810a-aaacc217325d'::uuid) AND (ROW(created_at, id) > ROW('2026-01-01 03:00:05+03'::timestamp with time zone, '5d3f8e7b-1854-48aa-960f-1cbad60a7432'::uuid))) Heap Fetches: 50 Buffers: shared hit=5 Planning: Buffers: shared hit=33 Planning Time: 0.070 ms Execution Time: 0.025 ms