Limit  (cost=1.71..69.21 rows=51 width=268) (actual time=0.158..0.183 rows=51 loops=1)
  Buffers: shared hit=21
  ->  Incremental Sort  (cost=1.71..40391.63 rows=30516 width=268) (actual time=0.145..0.168 rows=51 loops=1)
        Sort Key: created_at, id
        Presorted Key: created_at
        Full-sort Groups: 2  Sort Method: quicksort  Average Memory: 41kB  Peak Memory: 41kB
        Buffers: shared hit=21
        ->  Index Scan using exp_idx on messages  (cost=0.42..39018.41 rows=30516 width=268) (actual time=0.039..0.070 rows=52 loops=1)
              Index Cond: ((chat_id = '43815b30-3214-43ab-907b-8302428adf62'::uuid) AND (created_at >= '2026-09-14 15:04:07.432+00'::timestamp with time zone))
              Filter: (ROW(created_at, id) > ROW('2026-09-14 15:04:07.432+00'::timestamp with time zone, 'b4df760e-4412-48fc-90cc-814d6b6c9617'::uuid))
              Rows Removed by Filter: 1
              Buffers: shared hit=12
Planning:
  Buffers: shared hit=150
Planning Time: 1.476 ms
Execution Time: 0.278 ms
