I have a code which I use to remove already processed records from the new records. But with time as the processed record count is increasing it is becoming slow in processing. I am using the below code for your reference ,
completeDataIvosDT.AsEnumerable().Where(Function(row) Not processedDataDT.AsEnumerable().
Select(Function(r) r.Field(Of String)(“Claim Number”)).Any(Function(x) x = row.Field(Of String)(“Claim Number”))).
Need your suggestions how to make it fast because right now 40k data is there it takes 25 mins to run this. Please help.
@Yoichi any suggestions on how to split these and do something.
Could you maybe try by creating the prepared data for the comparison ? As it seems from the code you are trying to compare only one column from the other datatable.
We could get the Data prepared for that and stored it an array or a list, then perform the comparison on the list prepared. This way we should be able to reduce some time in Always iterating through the datatable and grabbing the values again.