Entity Framework with big table

  • Thread starter Thread starter Duvernet Vincent
  • Start date Start date
D

Duvernet Vincent

Guest
Hi,

Context :

I have an application which generate a large number of files (1 million ). I cannot reduce this amount of files.Read access to these files takes up a significant portion of the total processing time. The idea is to see if by saving all the files in a database, we then save time

Database :

The database has only 1 table :

[ID] int, primary key : simple counter
[IngId], int : counter for internal use
[HtmlCode], nvchar(MAX) : the full html file

First try :

// Retrieve records
var records = (from s in context.Records
orderby s.IngId
select s).ToList<Record>();

It works with a few number of records but in my case, total amount of html file is more than my computer RAM. So OutOfMemoryException is thrown.

Second try :

I would like to browse each element in Records and then get its IngId & HtmlCode.

How can I do this with entity framework ?

Thanks,

Vincent

Continue reading...
 
Back
Top