messages=10000

Limit  (cost=0.29..53.65 rows=50 width=64) (actual time=0.017..0.028 rows=50 loops=1)
  Buffers: shared hit=3
  ->  Index Scan using messages_history_idx on messages  (cost=0.29..211.62 rows=198 width=64) (actual time=0.017..0.023 rows=50 loops=1)
        Index Cond: ((chat_id = 'f472217b-e12b-4007-9998-1c24221d01ca'::uuid) AND (ROW(created_at, id) > ROW('2026-10-14 17:46:51.250266+00'::timestamp with time zone, 'be5a4036-03e8-45a7-8d19-42244139c1d4'::uuid)))
        Buffers: shared hit=3
Planning:
  Buffers: shared hit=33
Planning Time: 0.174 ms
Execution Time: 0.063 ms
