I have over 3,000 contacts in my phone. My firestore will hold over 1,000,000 contacts.
I can pull contacts from firestore to client to compare, I can push contact from client to firestore to compare. But I do not consider any of the two means effective.
- pull over 1,000,000 records from firestore to check against 3,000 records is not efficient as online data may grow to over a billion.
- pushing 3,000 records at 10 per request will lead to too much requests to the firestore and incur unnecessary cost.
What is the best way to compare these two data and return common elements?