Limit  (cost=0.42..167.46 rows=51 width=462) (actual time=0.032..0.057 rows=51 loops=1)
  Buffers: shared hit=5 read=4
  ->  Index Scan using messages_chat_history_idx on messages  (cost=0.42..18702.46 rows=5710 width=462) (actual time=0.030..0.050 rows=51 loops=1)
        Index Cond: ((chat_id = '64fbbeee-3c1b-b5be-9d4f-5bd05fe83171'::uuid) AND (ROW(created_at, id) > ROW('2026-06-16 00:00:00.729+00'::timestamp with time zone, '816028d8-560b-edb9-b9ae-2bfe37b74505'::uuid)))
        Buffers: shared hit=5 read=4
Planning:
  Buffers: shared hit=151 read=1
Planning Time: 1.206 ms
Execution Time: 0.107 ms
