Hello, I have vb.net optimization question.
I am reading some 50,000+ records from a file, and each record contains a unique PersonID (numeric) along with other data.
Before I process the record, I need to check that personID against the database to make sure it exists in our system. If it does, then I proceed. If it does not, I go to the next record in the file.
Currently I am doing a SELECT statement for each record I have in the file. If I get a record, then I know it exists.
Is there a faster and/or a more efficient way to check and see if that PersonID exists in the database?
Assume a table called FOO with a single field called PersonID.
Thank you,
`Le
I am reading some 50,000+ records from a file, and each record contains a unique PersonID (numeric) along with other data.
Before I process the record, I need to check that personID against the database to make sure it exists in our system. If it does, then I proceed. If it does not, I go to the next record in the file.
Currently I am doing a SELECT statement for each record I have in the file. If I get a record, then I know it exists.
Is there a faster and/or a more efficient way to check and see if that PersonID exists in the database?
Assume a table called FOO with a single field called PersonID.
Thank you,
`Le