tabs ↹ over ␣ ␣ ␣ spaces

by Jiří {x2} Činčura

Eager loading cost – another stuff to consider

4 Apr 2009 1 mins Databases in general, Entity Framework

Julie Lerman made a great post about The cost of eager loading in Entity Framework. And everything there is true, in fact if you take my Entity Framework training, you will know that with all reasons and you’ll also learn performace improvements you may incorporate into your solution.

I want to make some small addition to this post. There’s another stuff to think about. That’s the cost of processing query on server.

You should always consider the cost of parsing, compiling, finding execution plan etc. the query on server as well as fetching the intermediate data (which may cause cleaning up caches etc.). Thus sometimes (and we’re back to balance as Julie said) it’s better to issue couple of smaller (not so complex) queries, rather than one huge query.

Profile Picture Jiří Činčura is .NET, C# and Firebird expert. He focuses on data and business layers, language constructs, parallelism, databases and performance. For almost two decades he contributes to open-source, i.e. FirebirdClient. He works as a senior software engineer for Microsoft. Frequent speaker and blogger at www.tabsoverspaces.com.