Datastores, the efficient way to use them

Is giving each individual DataStore bad practice or is storing them all in one datastore better?

1 Like

Depends what you’re trying to do. If you don’t expect data to reach the datastore limits, use one, otherwise use multiple where necessary.

It’s not bad practice to use multiple datastores. It is, however, bad practice to unnecessarily use more datastores.

Each of my data stores are layered out like this

root <p_userid>--
                 |
                 |
                 |-- Success (Used to determine if the player is new)
                 |
                 |-- Data (JSON Encoded table that holds necessary data)
                 |
                 |-- Id (Used for different saves)
1 Like

Storing everything as one is more efficient, then you wouldn’t need to do multiple calls (and, some might fail from time to time).

If I understand OP correctly - that being that he is referencing having one datastore for each player - then I disagree. Having one unique datastore for each player is partially the premise behind berezaa’s data saving method and, when combined with using an OrderedDatastore for each player to create a “back-log” of saved data, it can greatly reduce the chance of data loss.

However if they are referencing having one datastores per data set (i.e one for coins, one for levels, etc) then yes, having them all in one place is definitively more efficient and reduces the risk of running into calls being stuck in queues.

That’s what I’m saying.

I don’t have individual datastores for individual parts of a player, there are 2, the main one and a backup

1 Like