Sorry... maybe I am not explaining well enough.
The files are sent to us in txt files. we have to check to make sure they are not existing customers. If they are we have to remove the existing customers from the file and add it to a separate file to send back to the broker. The ones that dont exist we have to write the none existant customers to another file and also write them to our main database.
the program we are using now was written by another programmer. I have to try to speed up the process... the program tends to stall sometimes with bigger files.
What he has done is read the data into an array.. he is then checking the data in the array against the database. So that every loop he is writing to a .csv file.
I am wondering if it would be faster to write all records to a database. Use a join to send existing records to another table.
Then pull New records to another another table then write the new customers into the main table..
then create the .csv files from the two temporary tables.