Limit (cost=0.29..8.11 rows=101 width=77) (actual time=0.011..0.020 rows=101 loops=1) Buffers: shared hit=4 -> Index Scan using idx_messages_chat_id_created_at_id on messages (cost=0.29..1549.43 rows=20001 width=77) (actual time=0.010..0.015 rows=101 loops=1) Index Cond: (chat_id = 'e6a45519-82bb-44d1-9c50-60d6694ddbb6'::uuid) Buffers: shared hit=4 Planning: Buffers: shared hit=107 Planning Time: 0.259 ms Execution Time: 0.038 ms