1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

Why are the custom fields created in the database so memory-heavy?

Discussion in 'General XenForo Discussion and Feedback' started by stefanstp, Oct 10, 2013.

  1. stefanstp

    stefanstp Member

    I'm switch from vBulletin 3.8 to XenForo and wonder why the custom fields (xf_user_field_value) are not created in the database as in vBulletin:

    UserID field1 field2
    1(userid) 12345(icq) 67890(msn)
    2(userid) 346676(icq) 7466046(msn)

    but in xenforo:
    user_id field_id field_value
    1 icq 12345
    1 msn 67890
    2 icq 346676
    2 msn 7466046
    etc.

    In my more than 300,000 members, the extremely occupied memory is noticeable. In vBulletin approximately 27 MB required XenForo need for the same data after importing about 130 MB (in phpmyadmin by only 7 fields per user and not 20 as in vbulletin). Is the reason the Compact-Format? What the benefits? Sorry for my bad english :cry:.

    xen.jpg ).

    What is the reason?
     
  2. Jeremy

    Jeremy XenForo Moderator Staff Member

    It's a fundamental shift in DB design. IIRC, vBulletin serialized every friend into a single record. XenForo only stores the data that's needed.
     
  3. stefanstp

    stefanstp Member

    Yes, but with the custom fields are created in the database even lines (without content), even though the member has not completed all profile fields. Since it would have been more practical to apply only the elements in the database that were actually completed, or I got this wrong?

    ubuntu5.jpg
     
  4. Mike

    Mike XenForo Developer Staff Member

    Technically, an empty value can be construed differently than the lack of a value (the lack of a value indicating that they have never attempted to set a value for the field).
     
  5. stefanstp

    stefanstp Member

    Where exactly is the advantage, just so I can better understand? A few of my external scripts based on the custom fields that I need to reprogram it. So I wonder, that the storage of the data is done very differently here, although I have to save as in vBulletin felt quite practical. Is the mysql query faster?
     
  6. Jeremy

    Jeremy XenForo Moderator Staff Member

    You are now able to query an individual field, rather than fetching the full amount of fields.
     

Share This Page