Limit  (cost=0.42..10.37 rows=50 width=66) (actual time=0.009..0.018 rows=50 loops=1)
  Buffers: shared hit=6
  ->  Index Scan using messages_chat_history_idx on messages  (cost=0.42..6377.26 rows=32040 width=66) (actual time=0.008..0.015 rows=50 loops=1)
        Index Cond: ((chat_id = '87a5ea91-8f1b-41ae-8ff7-8f67b1711963'::uuid) AND (ROW(created_at, id) > ROW('2026-01-01 00:00:06.2+00'::timestamp with time zone, '9ad9f914-0b9b-41f7-814d-284d3d4e85e9'::uuid)))
        Buffers: shared hit=6
Planning Time: 0.046 ms
Execution Time: 0.027 ms
