Advertisement

08.19.2008 at 06:49PM PDT, ID: 23661768 | Points: 500
[x]
Attachment Details

Best way to do a massive import and check from an excel file

Asked by achaean1 in WebApplications, C# Programming Language

Tags:

Ok, here's the problem.

I have a C#.NET web application that imports several excel sheets on a daily basis. 2 are massive and have outgrown my relatively simple and fast existing import process.

First sheet contains on average about 100 thousand classes , these need to be checked against a database which now has about 1 million active and inactive classes ( which will only keep growing ) to check whether it's updating a class ( whether active or inactive ) or inserting a class.

Then, after that, there's a sheet of class days, they range between 150 and 300 rows. And for those I need to insert new days and delete days from classes that exist in the system and have a record in the new sheet, but not up to that number, example class A has 3 days in the database and this new sheet only has 2, need to delete that 3rd day. But if Class B exists in the system, but not on the sheet at all, then it's days remain in tact.

Anyway, I've had this system going for over a year ( back when the system was empty and the import sheets were less than 1/4 the size ). Then they grew, the database grew, and now the method I used to import these sheets in a timely fashion has become incredibly bad for memory use.

If I kill the aspnet_wp.exe process it clears out the memory usage, and I run the imports a few times before it starts crashing out due to memory limits.

So, anyway, what's the most memory efficient way to do this!

( My memory management skills in .net are not very high as I learned the language on the fly while doing projects freelance a few years ago and let it do its own garbage collection )

Concept suggestions are fine, don't need to suggest specific code or anything. Thanks!


Start Free Trial
[+][-]08.19.2008 at 08:00PM PDT, ID: 22265793

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.19.2008 at 11:17PM PDT, ID: 22266631

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]08.20.2008 at 11:45AM PDT, ID: 22272662

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]08.20.2008 at 11:05PM PDT, ID: 22276590

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]09.04.2008 at 07:17AM PDT, ID: 22387603

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]09.04.2008 at 11:37AM PDT, ID: 22391039

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628