Because people put too much, and when design the home page is a query, held the single table to Count, lead to data query is heavy!
Now consider using other methods to replace the direct query, held method; Such as caching, set the number of separate lookup table, etc., for a great god give an idea? If there is one case, the best hope is changes little, solve the problem
CodePudding user response:
Personal feel or use like redis cache, the need of real-time query data into memory,The back-end to determine whether a database update, updated the redis,
As for redis is how to use the Internet a lot of examples, the original poster can go to check,
CodePudding user response:
I try it this way;The thinking of doing now is: set up a table stored in the cache, the data has increased directly inform the number of people to take corresponding only when login or loading time for the first time to read a database;
CodePudding user response:
This is a real problemCodePudding user response:
First feeling must be retrieved after doing a cache cache that is many things to use