Good day. I want to know how it will be better and faster to make a table of records in the game. There is a table with users who have a rating. It is necessary to display always the top 25 players of a million or more. In my head, there are two options.
- make a sample of the total number of players every time a player wants to see a table of records.
- start another table and each time as some user the rating changes, check it falls into that table or not.
The second option seems to me more benign, but it seems to me that it is possible to make something more beautiful, but I don’t know how. Maybe in mysql there are some tools that will help me achieve the desired? In general, any suggestions how to organize such top players advice would be helpful for me.