title: SSIS OLEDB SQL Command Execution is slow
body: <p>I have table with more than Million records. </p>
  
  <ol>
  <li>When i execute my query in SSMS it takes around 1:24 less than 2 minutes for sure at any point of time and returns around 600,000 records.</li>
  <li>SSIS takes more than couple of hours infact i was able to export it just once.</li>
  </ol>
  
  <p>Here is the sample sql:</p>
  
  <pre><code>SELECT distinct 
  A.Col1, A.Col2, A.Col3, A.Col4, A.Col5, A.Col6, A.Col7, B.Col3
  FROM tblA  A
  inner join tblB B on A.Col1 = B.col1 and 
  A.Col2 = 'AB' AND A.Col3 Not In ('A','B','C') AND 
  A.Col3 In ('FPC','FPE','PRN','SUB','RVW','FPO','FEV','PRM')
  </code></pre>
  
  <p>Note: Indexes do exists for all columns in select sql query (and for columns mentioned in where clause).</p>
  
  <p>In SSIS, </p>
  
  <ol>
  <li>I have Data Flow task on Control flow.</li>
  <li>OleDB Source with SQL query command.</li>
  <li>OleDB Destination tbl.</li>
  </ol>
  
  <p>what might be causing delay in SSIS?</p>