比较i4o与PLINQ以获得更大的集合 [英] Comparing i4o vs. PLINQ for larger collections

查看:91
本文介绍了比较i4o与PLINQ以获得更大的集合的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

对于有i4o或PLINQ经验的人,我有一个问题.我需要查询一个大对象集合(大约400K).逻辑非常简单明了.例如,有一个Person对象的集合,我需要查找与相同的firstName,lastName,datebirth或FirstName/lastname的第一个首字母匹配的人员,等等.使用LINQ to Object只是一个耗时的过程. /p>

我想知道i4o (http://www.codeplex.com/i4o )

或PLINQ可以帮助提高查询性能.哪一个更好?如果有什么办法.

谢谢!

解决方案

对于40万个对象,我想知道数据库(进程内或进程外)是否会是一个更合适的答案.然后,这将抽象索引创建过程.特别是,任何数据库都将在不同的列上支持多个不同的索引,从而使所有引用的查询都非常受支持,而不必专门为每个查询编写代码(只需让查询优化器为之担心).

在内存中使用它可能是有效的,但您(使用Vanilla .NET)可能必须做更多的手动索引管理.听起来,i4o当然值得研究,但我没有任何现有的比较数据.

I have a question for anyone who has experience on i4o or PLINQ. I have a big object collection (about 400K ) needed to query. The logic is very simple and straightforward. For example, there has a collection of Person objects, I need to find the persons matched with same firstName, lastName, datebirth, or the first initial of FirstName/lastname, etc. It is just a time consuming process using LINQ to Object.

I am wondering if i4o (http://www.codeplex.com/i4o)

or PLINQ can help on improving the query performance. Which one is better? And if there has any approach out there.

Thanks!

解决方案

With 400k objects, I wonder whether a database (either in-process or out-of-process) wouldn't be a more appropriate answer. This then abstracts the index creation process. In particular, any database will support multiple different indexes over different column(s), making the queries cited all very supportable without having to code specifically for each (just let the query optimizer worry about it).

Working with it in-memory may be valid, but you might (with vanilla .NET) have to do a lot more manual index management. By the sounds of it, i4o would certainly be worth investigating, but I don't have any existing comparison data.

这篇关于比较i4o与PLINQ以获得更大的集合的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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