$ ./scripts/seed_and_explain.sh
INSERT 0 0
INSERT 0 0
INSERT 0 0
DELETE 10000
INSERT 0 10000
VACUUM
 seeded_messages
-----------------
           10000
(1 row)

                                                                                                    QUERY PLAN
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 Limit  (cost=0.41..7.03 rows=51 width=70) (actual time=0.018..0.037 rows=51 loops=1)
   Buffers: shared hit=6
   ->  Index Scan using messages_chat_created_id_idx on messages  (cost=0.41..1298.32 rows=9999 width=70) (actual time=0.017..0.032 rows=51 loops=1)
         Index Cond: ((chat_id = 'bbbbbbbb-bbbb-4bbb-8bbb-bbbbbbbbbbbb'::uuid) AND (ROW(created_at, id) > ROW('0001-01-01 00:00:00+00'::timestamp with time zone, '00000000-0000-0000-0000-000000000000'::uuid)))
         Buffers: shared hit=6
 Planning:
   Buffers: shared hit=18
 Planning Time: 0.208 ms
 Execution Time: 0.104 ms
(9 rows)

                                                                                                    QUERY PLAN
------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
 Limit  (cost=0.41..7.83 rows=51 width=70) (actual time=0.039..0.054 rows=51 loops=1)
   Buffers: shared hit=5
   ->  Index Scan using messages_chat_created_id_idx on messages  (cost=0.41..1055.85 rows=7259 width=70) (actual time=0.038..0.049 rows=51 loops=1)
         Index Cond: ((chat_id = 'bbbbbbbb-bbbb-4bbb-8bbb-bbbbbbbbbbbb'::uuid) AND (ROW(created_at, id) > ROW('2026-01-01 01:23:20+00'::timestamp with time zone, '00000000-0000-0000-0000-000000000000'::uuid)))
         Buffers: shared hit=5
 Planning Time: 0.073 ms
 Execution Time: 0.087 ms
(7 rows)
