Mongo Docsでは、最大インデックス サイズについて説明しています。
Index Key
The total size of an indexed value must be less than 1024 bytes.
MongoDB will not add that value to an index if it is longer than 1024 bytes.
を使用するdb.collection.stats()
と、ドキュメントの平均サイズが 5 MB であることがわかります。ドキュメントの 50% を占めるフィールドにインデックスを作成している場合、インデックス サイズは になり50% * 5 MB = 2.5 MB
ますか?
単一のドキュメントのインデックスサイズがどのように計算されるかについて混乱しています。