Uploaded image for project: 'CouchDB'
  1. CouchDB
  2. COUCHDB-1382

Use term_to_binary with minor_version=1 to reduce disk size of data and indexes

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Resolved
    • Trivial
    • Resolution: Fixed
    • 1.1.1
    • 1.2
    • Database Core
    • None
    • doesn't matter

    Description

      Now, couchdb store data using term_to_binary/1 (with no options).

      According manual, term_to_binary/2 has option minor_version, which value 1 changes storage format for floats.
      Default behaviour, float consume 33 bytes of disk space.
      With minor_version=1, float consume only 9 bytes of disk space.

      minor_version=1 is supported since Erlance 11B-4, but minimum couchdb supported erlang version is still 13, so no problem to implement this.

      Also, term_to_binary/2 has "compressed" option, it may also reduce disk space, but will use more cpu for that.

      Attachments

        Activity

          People

            Unassigned Unassigned
            angry_elf Alexey Loshkarev
            Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: