title: Suppose I need to make an app similar to truecaller and my backend database is mongodb. Performance Vs Storage?
body: <p>lets take example of <strong>TrueCaller</strong> app. Suppose I need to make an app with similar function and my backend database is mongodb. So each time a user installs my app around 1000 contacts get added to the database. <strong>(Suppose I already have 10000 phonenumbers)</strong> Since I dont want same phonenumber  to be stored twice what I do is I check whether the number is present already. Thus a total of <strong>1000x10000=10million</strong> comparisons may take place. 10million comparisons from 1 user. Now suppose 10 users install simultaneously. it becomes 100 million comparisons. <em>So should I just add all numbers to the database directly without any comparisons?</em></p>