Is it bad practice to use multiple data tables for the same thing?

I’m creating an inventory system with consumables and need to store the amount of hunger and thirst they replenish in a data table. However, there are very few planned consumables compared to the other sorts of items, so those two rows in the data table storing that info will often go unused.

If I understand correctly, the larger the data table and the more variables stored within it, the longer it takes for the game to query through it.

Could I create a second data table that only includes information related to consumables where the rows have the same names so information from them can be looked up when needed? It would definitely be less annoying for me to look at, but would it be more optimized? Thanks!

UDataTable row lookup by row name is generally very fast. Rows are stored in a TMap keyed by FName, so it is not doing a linear search by row name.

A full iteration would only be needed if you are searching by some other value instead of the row name, like with any other container.

Oh well great because I’m pretty much just searching for row name. I had heard they did a linear search so apologies for that. Then if it’s not any faster and could lead to issues if two row names referencing the same thing are accidentally different, I think I’ll keep it all in one. I might use a composite data table to look a bit more organized. Thanks!