Uploaded image for project: 'Documentation'
  1. Documentation
  2. DOCS-224

State explicit formulas for index related stuff

    • Type: Icon: Task Task
    • Resolution: Won't Fix
    • Priority: Icon: Minor - P4 Minor - P4
    • Server_Docs_20231030
    • 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.

            Assignee:
            Unassigned Unassigned
            Reporter:
            richard.kreuter Richard Kreuter (Inactive)
            Votes:
            0 Vote for this issue
            Watchers:
            5 Start watching this issue

              Created:
              Updated:
              Resolved:
              7 years, 40 weeks, 3 days ago