I am creating a key that may have a lot of characters in the player data. I am wondering what is the number of characters limit?
I am creating a key that may have a lot of characters in the player data. I am wondering what is the number of characters limit?
I think this might be an example of "There's no limit now, but if you abuse it too badly, we'll make a limit"
You can see some data size limits in the following url, replace {titleId} with your actual titleId:
https://developer.playfab.com/en-us/{titleId}/limits
Or just: Game Manager -> Settings -> Limits
I believe the key has to fit within a basic database row, and that row needs to be under some fairly small size. The values are saved to another location with a larger capacity, and a ref is saved in the row, so the value is an independent size (with an explicit limit, as shown).
So, while I don't know the MAX length of the key, I know it has a relatively small max, like... 500 bytes or... something on that scale. The values have limits in the 100KB scale +/- based on your tier, so there is no good reason to abuse the key size, in order to extend what you're saving in the value.
And, the "real" answer is: No, there's no explicit limit. There probably IS a limit where your api-calls will begin to perform [very] poorly, for potentially many reasons, and/or your api-calls will just fail (not necessarily consistently either). Barring all of that, if you're using the key size to abuse the value size limits, you'll force us to MAKE a limit.
So in other words, please don't get too crazy. If you're doing something exploitative, we'll see it and if it threatens the performance of the service, we'll enforce a reasonable limit to protect the stability of the servers.
I believe this is the data you're looking for (max length of a value string in the free vs indie/pro tiers): https://community.playfab.com/questions/13455/limits-for-pro-tier.html. Let us know if that doesn't answer your question, though.
Reading your original post, I think Brendan's answer most closely addresses your question. I think I got confused by "key", and I think Brendan was right when he answered for "value"?
Referencing this:
https://api.playfab.com/documentation/client/method/GetUserData
My answer applies to request.Keys.
Brendan's answer applies to the value, IE: value = result.Data[{key}]
Keys should be JUST big enough to be unique identifying strings.
Values should be the data, and their lengths are defined by the tier limits.
Is that finally, sufficiently clear? :D
Sorry about that, we all got our words crossed.
Please have look at this forum discussion:
https://community.playfab.com/questions/5383/questions-about-limits.html
4 People are following this question.