.net - Entity Framework Includes -
is there recommended maximum amount of .include statements use in entity framework query.
i think read somewhere microsoft recommends no more 3 cant find source.
thanks in advance.
see performance considerations entity framework http://msdn.microsoft.com/en-us/data/hh949853.aspx (p 8.2.2) :
it takes relatively long time query multiple include statements in go through our internal plan compiler produce store command. majority of time spent trying optimize resulting query. generated store command contain outer join or union each include, depending on mapping. queries bring in large connected graphs database in single payload, acerbate bandwidth issues, when there lot of redundancy in payload (i.e. multiple levels of include traverse associations in one-to-many direction).
i suggest use sql profiler or ef profiler (f.e. efprof) can performance issues
Comments
Post a Comment