在不同的DataTable上的表现 [英] Performance on Distinct DataTable

查看:81
本文介绍了在不同的DataTable上的表现的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想问下面的代码是否需要很长时间来处理数据表中的100k数据?

i would like to ask whether the code below would take long time to process with 100k of data in a datatable?

DataTable distinctDataTable = sqlDataTable.DefaultView.ToTable(true );

DataTable distinctDataTable = sqlDataTable.DefaultView.ToTable(true);

我用100k的数据尝试了这个代码,它似乎停在上面的代码行,当我试图步骤时不会进入下一行代码。最初我认为在adapter.fill()上会有困难和更长的时间。但不知何故
它运行正常,现在的问题是在我希望从选择中获得不同价值的代码。并且它不会像应该的那样工作并永远停留。是否可以替换上面的代码以获得更好的100k数据性能。

i've tried this code with 100k of data, it seems that it stopped by at the line of code above and won't proceed to the next line when i tried to step into code. initially i thought it would have difficulty and longer time on the adapter.fill(). but somehow it works fine, the problem right now is at the code where i want to get distinct value from a selection. and it wouldn't work as it should be and stuck forever. is there any alternative to replace the code above for better performance on 100k of data.

推荐答案

您好,

感谢您发帖。

从您的描述中,我很难提供更多有用的建议您。通常,我建议您可以向我们提供更多代码段或演示应用程序。
v-xugong@microsoft.com

From your description, it's hard to me to provide more helpful suggestions to you. Generally, I suggest you can provide more code snippets or demo application to us. v-xugong@microsoft.com

另外,我建议您使用visual studio性能工具来衡量和定位代码中与性能相关的问题。

http:// msdn.microsoft.com/en-US/library/z9z62c29(v=VS.100).aspx

Plus, I suggest you use visual studio performance tool to measure and target performance-related issues in your code. http://msdn.microsoft.com/en-US/library/z9z62c29(v=VS.100).aspx

如果您有任何发现,请随时告诉我们。

Please feel free to let us know if you have any finding.

谢谢,


这篇关于在不同的DataTable上的表现的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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