Results -9 to 0 of 56

Threaded View

  1. #11
    Player
    Larirawiel's Avatar
    Join Date
    Feb 2019
    Location
    Aldrassil
    Posts
    2,532
    Character
    Larirawiel Caennalys
    World
    Shiva
    Main Class
    White Mage Lv 100
    Quote Originally Posted by JTWrenn View Post
    So...
    35.8 million subscribers * 20913 equipable items *2 bytes = 1497.37 GB for the entire currently active population. It would require account wide sharing of the unlocked looks, but I also don't think every item has a unique looks so I think it could be done. Say double for old accounts, and that is totally doable. Each server would only need an extra TB and they would have a ton of space to handle it.

    So storage size isn't it, but technical systems might be I just can't figure out what weird reason that would be though.
    Sorry, but this is not true.

    For booleans you need one bit and not two bytes. One byte is 8 bit. So you could store true and false in one byte. Take the first bit of a byte and flip it to 0 or 1 and you are done.

    And your assumption, that there is one or two bytes for every item for every player in the game would be very inefficient in terms of storing and retrieving the data. The cardinality of the true/false column would be very low and this would propably lead to so called "full table scans". And full table scans are very slow. Especially when you have this huge amount of data.

    And this is the reason why almost nobody would store every item and every player and put a true/false-flag on it. Usually, it is made with a so called "m:n"- or many-to-many-relationship. It is way more efficient to store and retrieve the data. Because you would only store records of items, which the player really got. And the bridge table between player and item would contain many different IDs. The cardinality would be way better compared to a true/false column (yes, i know, some databases have special indexes for booleans) and a database index could be used.


    Cheers
    (0)
    Last edited by Larirawiel; 08-26-2022 at 06:16 AM.