# chat_id=5a01823c-52b2-4e4c-86be-855d220e160d count=10000 QUERY PLAN ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ Limit (cost=0.29..5.61 rows=51 width=65) (actual time=0.019..0.029 rows=51 loops=1) Buffers: shared hit=3 -> Index Scan using messages_chat_created_idx on messages (cost=0.29..1041.68 rows=9967 width=65) (actual time=0.017..0.023 rows=51 loops=1) Index Cond: ((chat_id = '5a01823c-52b2-4e4c-86be-855d220e160d'::uuid) AND (ROW(created_at, id) > ROW('1970-01-01 00:00:00+00'::timestamp with time zone, '00000000-0000-0000-0000-000000000000'::uuid))) Buffers: shared hit=3 Planning: Buffers: shared hit=108 Planning Time: 0.751 ms Execution Time: 0.097 ms (9 rows)