Would it be better to do
local tab={a,b,c}
Plr:SetAsync(Plr.Name,tab)
Or
Plr:SetAsync(Plr.Name.."a",a)
Plr:SetAsync(....b)
...c
And by better I mean taking less space, and to what extend is one actually better than the other.
Would it be better to do
local tab={a,b,c}
Plr:SetAsync(Plr.Name,tab)
Or
Plr:SetAsync(Plr.Name.."a",a)
Plr:SetAsync(....b)
...c
And by better I mean taking less space, and to what extend is one actually better than the other.
I would suggest saving multiple keys to the datastore, rather than one key with a table / dictionary of all your data.
I'm saying this because, there is virtually no limit to how much you can store in a single datastore, but there is a limit to how much you can save per key. You can only save up to 64 kibibytes per key! This is equivelant to 2 ^ 16 string characters.
So, because your DataStore may grow to be too much data for one key, I just suggest having mupltiple keys.
This discussion is preserved as it was. New answers, comments, and votes are closed.
5 comments
Couldn't you save tables with JSON?
Yeah, but what does that have to do with the data limit.
I don't know, I just read it here. I don't know if it applies to DataStores. http://wiki.roblox.com/index.php?title=Data_persistence
2^16 string characters is for the key as in for all players?
2 ^ 16 chracters per key.. and @funyun, You couldn't save tables with Data Persistence without JSONEncoding them. But now we have DataStores so that information is irrelevant.