第一次查询非常慢 [英] First Query Very Slow
问题描述
我在使用edmx文件执行的第一个查询时遇到了性能问题。 其他人已注意到此问题,并已发布指向以下内容的链接: http://msdn.microsoft.com /en-us/library/bb896240.aspx 。 本文介绍如何预生成视图以提高查询性能。
I am running into a performance problem on the very first query I perform with an edmx file. Others have noted the problem and have posted links to: http://msdn.microsoft.com/en-us/library/bb896240.aspx. This article describes how to pre-generate views to increase query performance.
这些msdn文章中的指南都不适合我。 我正在使用Visual Studio 2010 RC。
None of the guidance in these msdn articles works for me. I am working with Visual Studio 2010 RC.
是否有一个全面的指南,用于加快对在VS 2010RC上工作的实体框架上下文所做的第一个查询?
Is there a comprehensive guide for speeding up the first query made on a entity framework context working on VS 2010RC?
谢谢!
推荐答案
您是否需要更改跟踪? 一种选择是使用NoTracking,它可以为你提供性能提升。 这也可能对第一个查询没有帮助,但你使用的是预编译的LINQ查询吗?
Do you need change tracking? One option is to use NoTracking which should give you a perf boost. Also this likely won't help for a first query, but are you using pre-compiled LINQ queries?
希望有所帮助,
Jonathan
这篇关于第一次查询非常慢的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!