Answer the question
In order to leave comments, you need to log in
How to quickly sort through a large amount of data?
Hello colleagues, there was such a task.
I am writing an Api, once a day it will receive data from the user base in a json array, I need to take these users and for which line (it is not yet known, id or phone number) to compare with their base and return a json array with the status whether they are signed These users are in my database or not. the problem is that once a day, right at one moment, it can come from 20 thousand records, how would I quickly go through them, and so that the server does not lie down ... Who faced? Can you tell me the best way to deal with this?
Answer the question
In order to leave comments, you need to log in
In my opinion it is necessary:
First: To sort out records not once, and parts. At the same time, save this data in the cache.
Second: Use queues.
PS: If there are other options, I would be glad to hear too.
1) break the task into small ones, add up the result.
2) make a replica and choose in it.
Make the task asynchronous.
string (not yet known, id or phone number)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question