DataStores; per player or per-data set?

Off the back of this tweet, I’ve been wondering for a while now about the differences between having a player-unique DataStore;
DataStoreService:GetDataStore(Player.UserId, "PlayerData")
And a DataSet DataStore;
DataStoreService:GetDataStore("PlayerData", Player.UserId)

To my understanding, these would both result in the same use-functionality. However, every unique player that would join a game, would now have to call a unique DataStore;

local ThisPlayerData = DataStoreService:GetDataStore(ThisPlayer.UserId)
local ThisPlayerExperience = ThisPlayerData:GetAsync("Stats").Experience

as opposed to having a reusable pointer;

local ExperienceDataSet = DataStoreService:GetDataStore("Experience") 
function GetData(ThisPlayer)
local ThisPlayerData = ExperienceDataSet:GetAsync(ThisPlayer.UserId)
end

All the documentation I have found; Documentation - Roblox Creator Hub
leads me to believe that both of these methods are valid with near, if not completely, identical error and fail cases.

To this end, my concerns surround the saving/loading of our target player’s data;

PlayerData = {
    Settings = {}; --Player's settings
    GlobalStats = {}; --Stats shared across all game saves
    Game1Stats = {}; --Game save 1
    Game2Stats = {}; --Game save 2
    ...
} 

I see no reason these can’t all exist under one DataStore entry, but is there a best practice here? Should the Data be split into it’s respective sub-sections as unique entries? Would that not increase the amount of calls I’d need to make?

This is not an area I’m particularly familiar with, but if anyone has any insight or experience to share (and is willing to put up with a few questions) I’d really appreciate it! Thank you!

1 Like

You’ll probably get a better reply than that, but it’s pretty much the same ;
Main difference is the limit, which is 260k characters Per GetDataStore

This means that you can easily surpass the default limit if you set more that one,
keys like (UserId.."_Slot1"), but for the most part, you won’t need it at all,

However, Data loss seems to be a hot topic since forever, which is why quite a few people
have been using Berezaa’s method, Completely make saves unrelated to each others so that
a recovery is guaranteed to be found if a issue ever comes

1 Like

Is that system/method still fully allowed and supported by Roblox, or could it be removed at a moment’s notice?

That’s a good question, i’d say a removal can be possible in years due to the following :

  • Limit is 260k, but it is completely removed with this method (bypassed)
  • if the method is popular/overused, Roblox will be forced to lock
    the amount of GetDataStore per Game
  • Roblox have quite the history for features removal from Community abuse
    (Mobile Ad Revenue, Tix Botting, Private Modules…)

But you should be fine setting up about 3-4 different GetDataStore, alot of games use more than one, some people use one exclusively for seperate loads such as a Cross-server marketplace or Blacklist (ban) so they’ll hardly be able to truly enforce a limit such as a singleton GetDataStore

1 Like

Am I right in reading that DS2 uses per-player datastores, including OrderedDataStores?