Parallel LINQ (PLINQ)

May be alike me you were thinking LINQ is future technology and in near future we will shift from to LINQ and drilling LINQ and thinking we are updated 😦 but i think if we think we are updated or like that then would be 😥

Few days back i was blogging and read blog of microsoftian and their i get there are some dream jobs @ msft so i contact that person to know about job to get to know either m eligible 😀 [which i know would be 1 day ;)] anyhow today i get healthy reply from that microsoftian and msft looking personnel for PLINQ so i thought about to google about PLINQ and get to know PLINQ is awesome technology

PLINQ stands for Parallel Language Integrated Query and it makes query execution parallel with very lil effort like if through query we need to extract data from different sources like RDMBS, XML, Web service and need to query them using LINQ and put some joins to gather relevant data from different sources, you can do that very easily through LINQ query and very efficiently through PLINQ. lets some code

var data = (FROM emp IN db.Employee JOIN eo IN xml.Overtime ON emp.ID EQUALS eo.EID WHERE eo.Month = August SELECT NEW {emp.Name, emp.Address, eo.DateTime, eo.Hours}).AsParallel

means u just need to use AsParallel method at the end of ur joined query and leave that to LINQ query execution engine, which will simply tell LINQ Engine to divide query to work parallel using multi threading to make fast execution.

i think its cool – keep it up MSFT 😉


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s