玲大桌子 [英] ling large table

查看:94
本文介绍了玲大桌子的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



我面临下述问题。

我使用linq从表中继续每条记录。表包含130,000,000条记录,因此它非常庞大。是的我知道集成服务,但我需要使用winforms。而且我喜欢LINQ。
很好的问题是,如此大量的记录和将结果存储在内存中可能会导致内存不足问题。因此,我希望能够继续进行1000个记录而不是其他日期继续进行另外1000个记录等等。

问题是在如此巨大的桌子上制作object.skip(1000).take (1000)linq语句给了我一个超时的删除。

任何想法为什么会这样?

感谢你的帮助

Hi,

Im facing the problem described below.

I use linq to proceed each record from table. Table contains 130 000 000 records so its quite huge. Yes  I know about Integration services but I need to use winforms for that. And I like LINQ.

Ok the problem is that proceessing such a big numer of records and storing results in memory can make lack of memory problem. So that I would like to be able to proceed for example 1000 records than other day proceed another 1000 records and so on.

Problem Is that on such a huge table making object.skip(1000).take(1000)  linq statement gives me a timeout excpetion.

Any ideas why is it like that ?

thanks for help

推荐答案

嗨snorlaks,

欢迎来到MSDN论坛!

对于超时问题,您可以考虑修改某个DataContext的CommandTimeout属性,如本文所述, http://www.codeproject.com/KB/linq/LINQ2SQLCommandTimeout.aspx

此外,您是否对数据执行某些JOIN或类似的复杂操作在使用Skip和Take扩展方法之前的表? 请向我们提供有关您正在使用的LINQ to SQL查询以及LINQ to SQL生成的特定T-SQL的详细信息提供者。 有关详细信息,请参阅 http://weblogs.asp.net/scottgu/archive/2007/07/31/linq-to-sql-debug- visualizer.aspx an d http://msdn.microsoft .com / zh-CN / library / bb386930.aspx

Besides, do you perform some JOIN or similar complex operation on the data table before using the Skip and Take extension methods?   Please provide us with the detailed information about the LINQ to SQL queries that you are using and the certain T-SQL generated by the LINQ to SQL provider.   For detail, please see http://weblogs.asp.net/scottgu/archive/2007/07/31/linq-to-sql-debug-visualizer.aspx and http://msdn.microsoft.com/en-us/library/bb386930.aspx. 

祝你有愉快的一天!

最诚挚的问候,
Lingzhi Sun


这篇关于玲大桌子的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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