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

State explicit formulas for index related stuff

    XMLWordPrintableJSON

Details

    • Icon: Improvement Improvement
    • Resolution: Won't Fix
    • Icon: Minor - P4 Minor - P4
    • Server_Docs_20231030
    • None
    • manual
    • None

    Description

      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.

      Attachments

        Activity

          People

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

            Dates

              Created:
              Updated:
              Resolved:
              7 years, 29 weeks ago