Existing LIST1 and LIST2, row * column=5000 * 5
Table 1 of the first semester
Name of physics of Chinese maths English
Top 10 20 30 to 40
Old two 10 20 30 to 40
Old 10 20 30 to 40
Old four 10 20 30 to 40
.
.
.
Table 2 second semester
Name of physics of Chinese maths English
Old two 10 20 to 30 50
Top 10 20 30 to 40
Old 10 20 to 40 40
Old four 10 20 30 to 40
.
.
.
Store name and row position will change, names not repeat
Want to find out the second semester exam type 10 points higher than the only branch of the first semester, regardless of which section 10 points higher than that of launch name
Two layers of loop is too slow
Cases, as a result, second, third
Other: dealing with such problems have on the garage floor first, after comparison, then take the results of such solutions
CodePudding user response:
Put the join in the database once the results what is there against it?CodePudding user response:
Besides behind you should be more than it needs, someone transfer also want to find out,,,,,,,,,,,,,,,,,,,,,CodePudding user response:
Today the second identical questionYou do not intend to make L1 hash dictionary
?If L1 is a dictionary, then you only need to loop L2
This algorithm is 2 n, rather than a double circulation index level
CodePudding user response: