I'm trying to compare 100,000 records on a local database (L) with 100,000 records on a remote database (R).
Basically I want to know if an element in L exists in R. To determine that, I have to make a request against the R for each L, which takes a long time (I know, there should be a better way, there isn't, that's the API I've got).
So I would like to test a small sample of L against R, and then infer with some level of confidence how many are present in the whole R. How many do I have to test to have a 99% confidence level?