Uploaded image for project: 'Core Server'
  1. Core Server
  2. SERVER-27261

All secondary indexes are compressed but not primary key(_id)

    • Type: Icon: Bug Bug
    • Resolution: Done
    • Priority: Icon: Major - P3 Major - P3
    • None
    • Affects Version/s: 3.2.10
    • Component/s: WiredTiger
    • None
    • ALL
    • Hide

      1) start mongodb with below WiredTiger options
      {{ wiredTiger:
      engineConfig:
      cacheSizeGB: 1
      journalCompressor: none
      directoryForIndexes: false
      collectionConfig:
      blockCompressor: none
      indexConfig:
      prefixCompression: false}}
      2) Create collection with a few secondary indexes
      3) Insert a few documents which contains visible character string (like 'MATT')
      4) hexdump data file and each index files

      Show
      1) start mongodb with below WiredTiger options {{ wiredTiger: engineConfig: cacheSizeGB: 1 journalCompressor: none directoryForIndexes: false collectionConfig: blockCompressor: none indexConfig: prefixCompression: false}} 2) Create collection with a few secondary indexes 3) Insert a few documents which contains visible character string (like 'MATT') 4) hexdump data file and each index files
    • Storage 2017-01-23

      I've heard that index compression is not so usefult, so index block is not compressed.
      And in the manual, they don't mention about compression of index block.
      So I've thoght that index block is not compressed by default.
      There's no index compression options in Wiredtiger engine (I know we can compress index block by specifying special configString option).

      But actually this is not the case,
      After creating collection with a few secondary indexes, I have examined data file with hexdump.
      Primary key index is not compressed, but all secondary indexes are compressed.

      Is this MongoDB expected or not ?
      Why secondary indexes are compressed ? and primary index is not ?
      And (if this is expected case) could you mention this in mongodb manual ?

            Assignee:
            geert.bosch@mongodb.com Geert Bosch
            Reporter:
            sunguck.lee@gmail.com 아나 하리
            Votes:
            0 Vote for this issue
            Watchers:
            12 Start watching this issue

              Created:
              Updated:
              Resolved: