Prompt how correctly to implement the structure of the database, what database is better suited for this task and how best to tune for performance.
Now, it looks like this: there is a large user table users, which includes a variety of information (id, name, and other characteristics). There is a table with lists list, which can contain these users. This table consists of 2 fields: the id of the list and a string that includes user IDs that are in this list (an example of a string: [1, 2, 18, 10]).
The problem is that I need to display a list of users (information about the user taken from the users table). The list can include 1000 or more users. What is the best way to implement? It is possible that the database should lie entirely in RAM? You might want to use caching for frequently accessed data. Maybe the structure of the database can be improved? Also, what is the optimal way to select 1000 records from database for a particular primary key id value?