so let's say i'm building this contact management system. There is a USER table and a CONTACT\_INFO table. 
For every USER, I can have zero or more CONTACT\_INFO records. The way I've defined it, I've setup a foreign key in my CONTACT\_INFO table to point to the relevant USER record. 

I would like do a search for all the USER records that do not have CONTACT\_INFO records. 

I expect that this could be done:

```
SELECT * FROM user u WHERE u.user_id NOT IN (SELECT DISTINCT c.user_id FROM CONTACT_INFO);

```

My concern is that as the tables grow, this query's performance can degrade significantly. 

One idea I'm playing with is to add a column in the USER table that says if it has any CONTACT\_INFO records or not. Also, I was wondering, if upon inserting any record into CONTACT\_INFO, the DBMS has to verify that the record exists, it would already be accessing that record for the sake of verification and so updating it, when I update a CONTACT\_INFO record should not be that costly, performance-wise. 

As always, feedback is appreciated.