DataReader-DataSet Hybrid solution

Posted by G33kKahuna on Stack Overflow See other posts from Stack Overflow or by G33kKahuna
Published on 2010-03-08T20:02:59Z Indexed on 2010/03/08 20:06 UTC
Read the original article Hit count: 321

Filed under:
|
|

My solution architects and I have exhausted both pure Dataset and Datareader solutions. Basically we have a Microsoft.NET 2.0 windows service application that pulls data based on a query and processes additional tasks per record; almost a poor mans workflow system. The recordsets are broader (in terms of the columns) and deeper (in terms of number of records). We observed that DataSet performs much better in terms of performance but runs into contraints as # of records increase say 100K+ we start seeing System.OutOfMemoryException on a 4G machine with processModel configured to run at memoryLimit set to 85. Since this is a multi-threaded app, there could be multiple threads processing different queries and building different DataSets, so we run into the exception sooner in that case

DataReader on the other hand works but is a lot slower and hits other contraints; if there is some sort of disconnect it has to start over again or leaves open connections on the DB side and worst case takes down the service completely etc.

So, we decided the best option would be some sort of hybrid solution.

I'm open to guidance and suggestions. Are there any hybrid solutions available? Any other suggestions

© Stack Overflow or respective owner

Related posts about ADO.NET

Related posts about dataset