Limit  (cost=0.29..5.09 rows=50 width=24) (actual time=0.012..0.026 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.011..0.023 rows=50 loops=1)
        Index Cond: ((chat_id = 'e34da6ac-f9fa-4164-a125-2738762f7487'::uuid) AND (ROW(created_at, id) > ROW('2026-01-01 03:00:05+03'::timestamp with time zone, '8d6ba025-20e1-4445-ad74-36ec90a5e755'::uuid)))
        Heap Fetches: 50
        Buffers: shared hit=5
Planning:
  Buffers: shared hit=33
Planning Time: 0.152 ms
Execution Time: 0.047 ms
