The main thing is to compare the front-end data with the data in the database and find out different data for processing, right?
If it involves comparing with the data in the database. If we want to be faster, we must reduce our access to the database. Then we can read a lot of data from the database at one time and put it into a collection, which is called a database collection.
Compare the database collection with the data to be compared.