[英]What method should I use to store large amount of data in SQL?
I want to store game Inventory information into SQL.我想将游戏库存信息存储到 SQL 中。
What method should I use to best benefit performance costs?我应该使用什么方法来最大程度地提高绩效成本?
The data I want to store is:我要存储的数据是:
I can think about 2 ideas:我可以考虑2个想法:
UserID | Items
---------+-----------
70001 | 3001 ;10000;65001;...
70002 | 0 ;0 ;0 ;...
70003 | 1 ;0 ;10 ;...
table: 70001Inv
SlotID | ItemID
----------+-----------
000 | 3001
001 | 10000
002 | 65001
The third method is probably the best method.第三种方法可能是最好的方法。 .
. .
. a single table with three columns:
具有三列的单个表:
UserID | SlotID | ItemID
--------+---------+-------
XXX | 000 | 3001
XXX | 001 | 0
XXX | 002 | 65001
That is, the UserID is stored in the table, with a separate row for each combination.也就是说,UserID 存储在表中,每个组合都有一个单独的行。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.