Limit  (cost=0.29..5.09 rows=50 width=24) (actual time=0.008..0.015 rows=50 loops=1)
  Buffers: shared hit=5
  ->  Index Only Scan using messages_history_idx on messages  (cost=0.29..481.62 rows=5004 width=24) (actual time=0.007..0.013 rows=50 loops=1)
        Index Cond: ((chat_id = 'eb32a209-b5b6-42b6-b902-84c9636886d9'::uuid) AND (ROW(created_at, id) > ROW('2026-01-01 03:00:05+03'::timestamp with time zone, '4f2daf20-57e7-41f3-bac5-566e109942d3'::uuid)))
        Heap Fetches: 50
        Buffers: shared hit=5
Planning:
  Buffers: shared hit=27
Planning Time: 0.082 ms
Execution Time: 0.027 ms
