Friday, 6 September 2013

Async ADO.NET or TaskFactory

Async ADO.NET or TaskFactory

I've 4 heavy database tables (30 million rows each) and my query gets data
from all 4 tables and do the union to combine all and query is not
returning many rows (up to 1000). So let's say the whole query is taking
20 seconds to complete, I'm thinking to write a separate query for each
table and call them using async or TPL and then combine the results in my
business object (c# .Net 4.0) and then return to ASP.NET web form.
I've looked at BeginExecuteReader and Task.Factory.StartNew but I'm not
sure how to put everything together, has anyone done something like this
before? Any idea how can I do this?

No comments:

Post a Comment