Informix

nested-group-icon.png

DB2

Expand all | Collapse all

Ifmx Nosql and key name: impact of the length of the 'key' name

  • 1.  Ifmx Nosql and key name: impact of the length of the 'key' name

    Posted Fri August 21, 2020 10:17 AM

    Hi Friends,


    Interesting ( according to me at least) question about best practices on NoSQL implementation in our beloved HDBMS (hybrid DBMS) 

    When you handle a NoSql Document, you have inside it a number of key/value pairs. OK

    Now when it is time to give names to the 'keys': what is the impact of giving a 'long' name to the key on storage consumed ?

    For instance, if i say something like 

    {"myverylongkeynamenumberone":"XXXX","myverylongkeynamenumbertwo":27}

    will it take more space (and if yes what are the numbers?) in my dbspace, as per compared with

    {"mvskn1":"XXXX","mvskn2",27}

    I know that the data is stored as BSON, this binary, but is there any compression mechanism such as a dictionary of the key names for instance, such as the ifmx compression does ?

    The idea is to start with significant names but avoiding unuseful space comsumption ...

    Any hints ?

    Thanks in advance
    Eric



    ------------------------------
    [eric] [Vercelletto] []
    [Founder]
    [kandooerp.org]
    [Pont l'Abbé] [France]
    [+33 626 52 50 68]

    Disclaimer: My own opinions are my own opinions and do not reflect on the IIUG, nor any other organization with which I am associated either explicitly, implicitly, or by inference. Neither do those opinions reflect those of other individuals affiliated with any entity with which I am affiliated nor those of the entities themselves.
    ------------------------------


  • 2.  RE: Ifmx Nosql and key name: impact of the length of the 'key' name

    Posted Fri August 21, 2020 10:43 AM
    No dictionary Eric. Each BSON item contains the key names for each field that exists in that item and only those fields. So, yes, longer names take up more space on disk and will affect performance.

    Art

    Art S. Kagel, President and Principal Consultant
    ASK Database Management


    Disclaimer: Please keep in mind that my own opinions are my own opinions and do not reflect on the IIUG, nor any other organization with which I am associated either explicitly, implicitly, or by inference.  Neither do those opinions reflect those of other individuals affiliated with any entity with which I am affiliated nor those of the entities themselves.








  • 3.  RE: Ifmx Nosql and key name: impact of the length of the 'key' name

    Posted Fri August 21, 2020 02:58 PM

    Sounds clear,

     

     

    Thanks Art, I will proceed accordingly ��

     

    Have a great Saturday!

     

    Eric