title: How to exec PROC with 1M records without hanging app and less time in C#
body: <p>I am confusing about to choose the correct  software design model to write a efficient code  for the below scanario,</p>
  
  <ul>
  <li>I have a biometric device (socket communication) and the same device
  details like IP, etc  details are in the Database (SQL server 2012).
  Now the application (C#) need to 
  
  <ol>
  <li>connect to the device and </li>
  <li>Get the info for this device from DB.</li>
  <li>and Push into the same device. and Update the status result into the GUI.</li>
  </ol></li>
  </ul>
  
  <p>and here, The devices are some time 100 Nos .</p>
  
  <p>So for this I have done a code but that's not effectively doing this task, i mean taking more time to complete and very slow.</p>
  
  <p>so far i did,</p>
  
  <pre><code>for(dev_count)
  {
     if(check device is valid )
  {
  // read the device details 
   // Here creating thread and loading the emp details to device 
     Thread t1 = new Thread( loademptoDevice());
  }
  
  void loademptoDevice()
  {
    // here connecting SQl connection and get teh details and load into device socket communication
  }
  </code></pre>
  
  <ul>
  <li>Like this I have coded but it giving poor response. </li>
  </ul>
  
  <p>So I need someOne to give me good software design patter for to resolve the issue.</p>
  
  <p>Thanks in advance</p>