title: c# - pull records from database without timeout
body: <p>i have a sql query with multiple joins &amp; it pulls data from a database for processing. This is supposed to be running on some scheduled basis. So day 1, it might pull 500, day 2 say 400.</p>
  
  <p>Now, if the service is stopped for some reason &amp; the data not processed, then on day3 there could be as much as 1000 records to process. This is causing timeout on the sql query.</p>
  
  <p>How best to handle this situation without causing timeout &amp; gradually reducing workload to process?</p>
  
  <p>TIA</p>