The Backend Engineering Show with Hussein Nasser cover image

2x Faster Reads and Writes with this MongoDB feature | Clustered Collections

The Backend Engineering Show with Hussein Nasser

00:00

Mongo DB Document: A Hidden Index

When you search for a document by its ID, you do the get on Mongo, the command get on ID. You actually do two reads. It's it's a, it's two B3 seeks. So to summarize, unclustered collection, we have the ID field as an index. That points to when you do a search, you find the ID, but then you don't find the document immediately that you're looking for,.You actually find a record ID, a pointer. And if you're lucky, and that page holds many other documents, you cash this whole thing in the buffer, buffer pool; hopefully the next record or your request is in the same document.

Transcript
Play full episode

The AI-powered Podcast Player

Save insights by tapping your headphones, chat with episodes, discover the best highlights - and more!
App store bannerPlay store banner
Get the app