Ado.net性能:这是什么SNIReadSync办? [英] Ado.net performance:What does SNIReadSync do?

查看:160
本文介绍了Ado.net性能:这是什么SNIReadSync办?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我们有一个查询,需要2秒,在SQL Server Management Studio中运行,但它需要13秒钟的客户端屏幕上显示。 我用dotTrace来分析我的源$ C ​​$ C,并注意到有这个SNIReadSync法(的ADO.net组件的一部分),其需要花费大量的时间来完成其工作(9秒为单位)。我跑我的源代码在服务器,所以我可以省略了网络效应,结果是一样的。

We have a query that takes 2 seconds to run in Sql Server Management Studio but it takes 13 seconds to be shown on a client screen. I used dotTrace to profile my source code and noticed there is this SNIReadSync method (part of ADO.net assemblies)that takes a lot of time to do its job(9 seconds).I ran my source over server so I could omit the network effects and the result was the same.

如果我用的OleDbConnection或SqlConnection的没关系。

It doesn't matter if I'm using OleDBConnection or SqlConnection.

如果我使用一个DataReader或数据集没关系。

It doesn't matter if I'm using a DataReader or a DataSet.

连接池并没有解决这个问题(因为我的结果显示)。

Connection pooling does not solve this issue(as my result shows).

我GOOGLE了这个问题,我无法找到一个问题的答案是什么这个方法实际上是做的,我们如何才能改善它。

I googled this issue and I couldn't find an answer to the question that what this method is actually doing and how we can improve it.

下面是我发现的StakOverFlow这不是有益的或者: <一href="http://stackoverflow.com/questions/1610874/snireadsync-executing-between-120-500-ms-for-a-simple-query-what-do-i-look-for">http://stackoverflow.com/questions/1610874/snireadsync-executing-between-120-500-ms-for-a-simple-query-what-do-i-look-for

here's what I found on StakOverFlow that's not helpful either: http://stackoverflow.com/questions/1610874/snireadsync-executing-between-120-500-ms-for-a-simple-query-what-do-i-look-for

推荐答案

忽略 SNIReadSync 一会儿(我认为这可能是一个红色的鲱鱼)。

Ignoring SNIReadSync for a moment (I think this might be a red herring).

你所描述听起来像一个错误缓存查询计划。症状

The symptoms you are describing sound like an incorrectly cached query plan.

请更新您的数据(或重建索引),看看它是否仍然出现。

Please update your statistics (or rebuild indexes) and see if it still occurs.

这篇关于Ado.net性能:这是什么SNIReadSync办?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆