IEnumerable list looping performace issues for 50K records.
I have a two lists which is loaded from DB.
First List have Watermeter Data which has 50K records, Another List is AddressList which has 2.5Lakh Records,
I want to get the primary key value from AddressList by sending the LOT name (which is unique in AddressList), For joining using the Ienumerable object it's taking lot of hours.
Dim oFinalStagingList = (From oStaging In oWaterMeterStagingList, oAddr In oAddressList
Where oStaging.Lot= oAddr.Lot
Select
{
oStaging.WaterMeterStagingKey,
oStaging.Lot,
oAddr.AddressKey
}).toarray()
For Each record As Object In oFinalStagingList 'inserting the data in to DB Next
It's taking lot of hours while making the oFinalStagingList IEnumerable<Object>. Please help me how to increase the performance.