We have a large table of contacts (8 million records) that we promote to with mailings. When these people register we store them in a different members table. But we want to go back and update the contacts table each day with the members table ID for each conversion. I added a member_id column to the contacts table but I can't really use a member_id foreign key on that column as most will have a null value.
I'm trying to determine what the best type of index might be used on the member_id column to speed up queries on those people. Currently i have the column nullable with a unique index but queries on those people are taking several minutes which isn't very performant. Wondering if some more experienced people out there have dealt with this type of issue?