|
|
|
|
|
by petethepig
1472 days ago
|
|
There's not much about it online. They do mention it in the docs, they call this "prefix compression" [0], so you can search for that. This article describes it [1], although it is somewhat high level. They only use this for indexes. It works really well for internal mongo ids (they all start with timestamps if I remember correctly). It also works well for compound indexes. Pro tip: for compound indexes always go from low-cardinality attribute to high-cardinality attribute to get the best results from prefix compression (it's also good for speed of queries). [0] https://www.mongodb.com/docs/manual/reference/glossary/#std-... [1] https://medium.com/swlh/mongodb-indexes-deep-dive-understand... |
|