QUERY PLAN ---------------------------------------------------------------------------------------------------------------------------------------------------- Limit (cost=0.28..5.31 rows=50 width=61) (actual time=0.030..0.038 rows=50 loops=1) Buffers: shared hit=3 -> Index Scan using idx_messages_chat_created_id on messages (cost=0.28..733.49 rows=7285 width=61) (actual time=0.014..0.019 rows=50 loops=1) Index Cond: (chat_id = '90751165-fdcf-4664-a5ab-5414031412bc'::uuid) Buffers: shared hit=3 Planning: Buffers: shared hit=107 Planning Time: 0.793 ms Execution Time: 0.069 ms (9 rows)