Is there a limit to how many items can be in a table datastore?

I’m making an inventory system and I want it to be how islands and bcw has theirs. They have infinite Inventory and I’m wondering if it’s a problem if I were to store hundreds of values. (if they were to have all items in their inventory)

I guess its 4mb per key the max limit, no matter the “elements/entries” is about size

1 Like

I’m 90% sure the data store has a 50 character limit, not sure if that equals up to the 4mb limit.

On a side note, make sure to keep within the data store’s request budget so further requests don’t throttle.

I think your confused with another limit? Which is the key character or datastore name limit, not the overall data that can be saved (4mb).

Here is the roblox documentation about limits with datastores for more detail about these limits

Here are the highlights of the limits from the documentation above:

These are the character limits for datastores:

Component Maximum Number of Characters
Data Store Name 50
Key Name 50
Scope 50
Data (Key Value) 4,194,304 per key

How often you can read and write data in datastores:

Request Type Limit
Read 25 MB per minute
Write 4 MB per minute

This is how often you can call each method per minute:

Request Type Functions Requests per Minute
Get GetAsync() 60 + numPlayers × 10
Set (limit is shared among all listed functions) SetAsync()
RemoveAsync() 60 + numPlayers × 10

Each key can store up to somewhere around 4.1 million characters - as in, 4.1 million characters in a string (since datastores automatically type-coerces your data into strings).

That’s a lot of data you can store in a single key, actually - and if you compress that data (which you should, because of throughput limits) you can save even more.

Frankly, this is a bit of a non-concern. If you believe that 4.1m characters isn’t enough for you, consider sharding your datastores.

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.