-
Type: Task
-
Resolution: Won't Fix
-
Priority: Minor - P4
-
Affects Version/s: None
-
Component/s: manual
-
Labels:None
The docs ought to include formulas for calculating the sizes of various index-related things:
- the sizes of compound index keys (this changed from v0 to v1 indexes)
- the estimated size of an index based on the number and average size of index keys
Eliot says that v0 index keys are BSON objects with empty keys, so the key size should be 4 + <number of fields> + <sizes of fields> + 1. If all the fields are fixed size (e.g., numbers/booleans/ObjectIds/Dates/Timestamps), then all index keys should be the same size. For any variably sized scalar field (e.g., string/binary/etc.), the size of the field includes a 4-byte length and typically an extra byte (null byte for strings, subtype for binary.
Anyway, this is a start.