Hi,
I've written some code that gets a huge list of "readings" in the database. It needs to perform some simple migration (changing a "Float" value in each reading).
The problem is that in a client database, there are 66,000 of these readings. Loading the entity collection is OK (takes about a minute), and performing the simple loop through to do the actual migration is OK (takes 1 - 2 minutes), but saving the entire entity collection kills aspnet_wp.exe. This is the error that happens about 5 minutes after I call SaveEntityCollection:
aspnet_wp.exe (PID: 3160) was recycled because memory consumption exceeded the 613 MB (60 percent of available RAM).
Sooooo, I need to work out why all the memory is consumed by the save, and if there are any alternatives that I can use while saving to not use so much memory...
More information follows:
I am fetching the entity collection using a pre-fetch path. Readings belong to "Monitoring Records", so MonRecords 1:N Readings. I save the collection with this command:
adaptor.SaveEntityCollection(readings, false, true);
I am currently using ASP.NET 2, with SQL Server 2000, and the latest version of LLBL (1.0.2005.1 Final, December 2005).
Is there a way to save the entity collection without killing memory?