询问者
SQLServer 2008 R2 首次查询较慢

问题
全部回复
-
你好,
>>现在想知道怎么解决首次查询读不到缓存的情况下 如何加快查询的速度?
首次查询是没有缓存的, 数据都是硬盘上,由于I/O 的原因,导致查询慢, 你如果是使用Entity framework 的话,可以通过预生成Views 来提高首次查询的性能。 详细信息,你可以参考下面的文档。
https://msdn.microsoft.com/en-us/library/hh949853%28v=vs.113%29.aspx?f=255&MSPPError=-2147217396
https://msdn.microsoft.com/library/bb896240.aspx
Best regards,
Zhanglong
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com. -
你好,
请问使用SSMS (SQL SERVER Management Studio)工具来查询的话,第一次是慢的吗?还是仅仅出现在Ado.net 的代码? 如果是ado.net 问题的话,请问一下你用的是是什么样的工程? asp.net, winform 还是其他的?
Best regards,
Zhanglong
MSDN Community Support
Please remember to click "Mark as Answer" the responses that resolved your issue, and to click "Unmark as Answer" if not. This can be beneficial to other community members reading this thread. If you have any compliments or complaints to MSDN Support, feel free to contact MSDNFSF@microsoft.com.