Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7733599
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 1, 20262026-06-01T07:02:10+00:00 2026-06-01T07:02:10+00:00

I am retrieving a very large number of records with multiple result sets from

  • 0

I am retrieving a very large number of records with multiple result sets from SQL Server into my .NET 3.5 project.

I can’t just pull them all into a DataSet and work on them, since it would take up too much memory. I don’t need to pull all the records as once but just one record in the parent table and then the related child records.

I could accomplish this with using a DataReader but my concern here is the process of iterating through all the records will take many hours. That means the DataReader would be left open for all those hours which I don’t think is possible.

How do you go about processing the records when retrieving all the records into a DataSet is not possible due to the large number but using a DataReader would require it to be open for many hours?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-01T07:02:11+00:00Added an answer on June 1, 2026 at 7:02 am

    One way to tackle this problem is to split the data and process it in chunks, while keeping information about the last processed record.

    This way, if the database connection is lost you wouldn’t need to start over but you could continue at the last “checkpoint” (you could save checkpoint after every record if that makes sense).

    If processing of each loaded record takes long, it would make sense to use a DataTable to download a small chunk of data into memory, process it and continue (this improves usage of db resources). But if the processing is fast and most of the time is spent downloading the data from database, then it would make more sense to use DataReader (to save memory).

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm retrieving a signed int from a SQL Server database and need to convert
i have found an very good method for retrieving any result set from the
I'm inserting large number of records using LinqToSql from C# to SqlServer 2008 express
I'm retrieving some records from a database using user = Users.all in the console
I'm retrieving large amounts of data from Youtube (users and videos) via their API,
I've found very nice solution of retrieving images from db/blob thanks to How to
From Mercurial wiki - GSoC Ideas 2010 : Project Ideas Lightweight copies/renames (very difficult
In my application, I'm retrieving content from the database very often. So I'm likely
The find methods are very convenient for retrieving records, and I'm frequently using :include
I've encountered a problem when retrieving a JSONP response from a server in a

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.