Hi, I am new to mongodb and find a quick and efficient way to perform following task. the scenario is as follows
i have following 3 tables
- users -> having user information - thousands of users
- contacts -> list of all contacts of users (a user can have many phone numbers like phonebook contact list) - millions of contacts
- contact_users -> i don’t know how to explain is but what i need is to make contact syncing just like whatspp is doing like display the contacts from phonebook who have whatsapp account.
so basically it will make the relation between phone numbers and display on user side that which account have whatsapp on this same number. I hope it will make sense.
one way that I know is the traditional way like get the contacts of 1 person, loop through all the contacts, find the matching and save in 3rd table. it will be long process, slow down the process and may be timeout at some certain stage
my question is how to make the best and fastest way to perform this process.