php - Four txts a, b, c, and d. Compare how many of the three txts bcd are in a. These four files are about 250M.
怪我咯2017-05-16 13:07:52
0
3
457
The rules are as follows:
< /p>
I have tested it myself and set up these two ini_set('memory_limit', '-1');set_time_limit(0);, and then after running it for a long time, it reported a 500 error. Please help!!!
Lots of data. It is estimated that the database will die easily. For simple comparison, first write a script to save the data into redis. The cache key of table a is a.0 a.1 a.2 or something, b.000000036 or something. The last two rules remain the same. After importing, determine the total number of data in a
You can write a script to cache the contents of the four texts into four Redis collections, and then find the intersection. This is very fast. I wonder if this is allowed?
Lots of data. It is estimated that the database will die easily. For simple comparison, first write a script to save the data into redis. The cache key of table a is a.0 a.1 a.2 or something, b.000000036 or something. The last two rules remain the same. After importing, determine the total number of data in a
Write a for loop
You can write a script to cache the contents of the four texts into four Redis collections, and then find the intersection. This is very fast. I wonder if this is allowed?
The 500 error is that there is not enough memory. You can execute a few lines to release the useless memory