I have two tables, already populated with data as follows :
table1 data are citizens data, with fields:
uniqid (a uniqueIP for person, like social sec num)
first_name
last_name
birthdate
address
table2 with fields:
first_name
last_name
birthdate
address
gender
healthinsurance_type
...
table1 data and table2 data come from different and separate agencies. Names from those tables could be typed differently, and so on.
table1 is authoritative for names and ID. table2 is what I need to work on, but there's no ID (citizenID).
Now I need each row in table2 to get a citizenid, associated from table1, so that in the end I get table2 with additional ID column, correctly associated with each person.
Something like search in table1 for a person (a row in table2) where some conditions match, and if a record exists in table1, put the ID of that record to a column in table2.
But do it fast and for all rows.
row count of table1 is around 2 million.
row count of table2 is around 900.000