Command: docker compose exec -T api python -m scripts.explain_history
Dataset: 10000 messages; page after message 9000; ORM query; limit 51
Limit  (cost=0.29..75.12 rows=51 width=1055) (actual time=0.013..0.028 rows=51 loops=1)
  Buffers: shared hit=10
  ->  Index Scan using messages_history_idx on messages  (cost=0.29..1535.22 rows=1046 width=1055) (actual time=0.013..0.024 rows=51 loops=1)
        Index Cond: ((chat_id = 'ff693a1b-4e99-43c9-bb51-68b5acdd972b'::uuid) AND (ROW(created_at, id) > ROW('2026-01-01 00:00:09+00'::timestamp with time zone, 'e35d4a84-afe1-4aae-8f55-27be1490c84e'::uuid)))
        Buffers: shared hit=10
Planning:
  Buffers: shared hit=7
Planning Time: 0.078 ms
Execution Time: 0.056 ms
Synthetic data rolled back.
