Manish Pandey
Manish Pandey

Reputation: 175

Linq to entity performance issues with large set of data

I am currently working with EF4 and in one of my scenario i am using join and wanted to retrieve the data but as the resultant data is so much EF4 is even fail to generate the query plan..As a work around i tried to load the data in simple generic list( using Selecting all data from both the tables) and then tried to join on that two list but still i am getting outofmemory exception as one table contains around 100k records and second table contains 50k records i wanted to join them in query...but still with noluck using EF...please suggest me any work around of this...

Upvotes: 0

Views: 613

Answers (2)

guest1
guest1

Reputation: 1

What we did is that we wrote custom SQL and executed it with Context.Database.SqlQuery(sql, params)

Upvotes: 0

James Johnson
James Johnson

Reputation: 46047

I can't think of any scenario where you would need a result set containing 100k+ records. It may not be the answer you want, but the best way to improve performance is to reduce the amount of records that you're dealing with.

Upvotes: 1

Related Questions