Efficiency of ADO.NET datasets

  • 13 years ago

    In ado.net you have the possibility to read whole tables at the time into datasets. But how efficient is this when your dataset (parent child) is huge and you only work with a small part at a time?
    How does the efficiency compare between reading data once but holding a vast amount of data in memory that has to be traversed, filtered etc, OR creating datasets with smaller chunks of data, but then needing to create new datasets more often. Theses datasets contain the table's metadata too, so I guess there is an overhead there by reading smaller chunks too often.
    If I only read the records I need into the dataset (i.e. "select * from orderTbl where deptNo = 1") how do I then create my child relationship ? Surely all orderlines with foreign key = order key. But how do I formulate my Data Adapter's Select Statement ( I only have orderNo as foreign key, and not deptNo)? Would my Orderline table contain all records for all departments, even if my Order table only contains records for deptNo =1 ?

    Would appreciate any input on how to use datsets most efficient, and without incomprehensible code !

Post a reply

No one has replied yet! Why not be the first?

Sign in or Join us (it's free).


Why not write for us? Or you could submit an event or a user group in your area. Alternatively just tell us what you think!

Our tools

We've got automatic conversion tools to convert C# to VB.NET, VB.NET to C#. Also you can compress javascript and compress css and generate sql connection strings.

“Engineers are all basically high-functioning autistics who have no idea how normal people do stuff.” - Cory Doctorow