What should I do if I want to query a large amount of data to the front-end display? For example, if mysql has million pieces of data, and then it is queried in php and displayed on the front end, how can we increase the speed?
Reply to discussion (solution)
The cache technology depends on the frequency of data updates. if the update is fast, we recommend that you use memcache cache. if the update is not updated much, you should use file cache.
Million data is displayed on one screen ??
Are you kidding? Who can view 1 million rows of data?
If it's for you, do you see it?
No, it must be displayed by page ··
Million data is displayed on one screen ??
This is because the interviewer came to test me during my previous interview. At that time, I couldn't think of a better way, that is, to use the simplest query.
Paging. Index the table. If the data update is slow, cache the data.