Will table with 100K Strings in it cause problematic issues?

I’m making a system where a player can buy an item for very little amounts of cash, resulting in many stock buys. It starts out at 1000 for every server, and people can buy it to prevent it from running out, as they use the items to sell to npcs. I was thinking about making a system where if you buy the stock, and someone else sells it, the stock buyer would get a percentage of the money.

The easiest way I think of doing this is by having a table of the items with the player’s name as a string if they bought it, or as “Server” if they left the game or it was a starting stock. However, I feel like when I start to add more items it’s going to cause some major issues.

So I was wondering if 100k string values in a table would cause drastic problems?
If so, is there another way of doing this?
I was thinking about physical String values inside a folder or something, but I’m not sure
Any tips would be appreciated.

Instead of saving the name of the user, and the name of the stock:

  • Store the UserId of the user in the table (will also ensure they don’t lose the stock if they change their username). This’ll dramatically decrease the storage it requires
  • Store a unique ID number of the stock, to reduce space further. This ID can just be the number it was created as. (First stock would be 1, 10th would be 10, etc.). Note that this won’t be needed if you have a unique datastore key for each stock.

Datastores can save up to 4MB of data (4,000,000B), and a single number (NOT digit) takes up about 8 bytes. This means that by storing it how I listed above, you can store the 100K+ IDs you need.


If you don’t need to save it via datastore:
It should be fine. The server has enough storage on it that you won’t have any issues

1 Like

If the 100k strings is relating to literally storing how many of a certain item a player has, you can just store the item name and how many of the item they own as an integer alongside it. Preferrably use something like a stock ID, so you can freely update the item names in your code without worrying about trying to change them everywhere else.