mohammad amin
mohammad amin

Reputation: 78

How to design and handle big tables in mysql?

Suppose I have a Games table, a Players table, and a Game Admin(Who can add game to system) table , and a score table contains game id gamer id and score for each game level.

Each Game has many Players players are not game admin. Each Game Admin has a few Games .the score table may be more over 15 million records .

i have 2 idea : please tell me pros and cons

According to my estimation system will not have more than 100 games so :

1.create new table for each game to prevent store all scores in one table

2.keep gamer and players main profile in one database and create new database for each games?

Which option is more suitable? Please if you have another idea share with me . thank you

Upvotes: 0

Views: 71

Answers (1)

ScaisEdge
ScaisEdge

Reputation: 133360

From the point of view of the performance of queries, the two solutions are substantially equivalent in that they have as a result the fact of having more tables of smaller dimensions. The only difference is due to three aspects, the first is related to access and connection time or authentication to the database in the case of multiple databases accession to the various boards and routed upstream from dns and in particular from the dbname but thisIt implies that for every access to the table of the game you should prevdere a new connection. In the second case, the use of new connections may be less but you should note that you have to worry about in your code to manage the dynamic identification of the table to be accessed. Finally in the number of databases that you can access you are often subject to restrictions for what concerns the rights of use or the service contract with your provider if you do use hosted solutions.

Upvotes: 1

Related Questions