title: DataTable Select Implementation with Multiple AND Conditions
body: <p>I have a DataTable with about 50,000 rows that I'm using <code>DataTable.Select</code> to retrieve rows from.  The <code>Select</code> requires multiple <code>AND</code> conditions including a wildcard match.  I've played around and found that by doing the same <code>Select</code> in multiple steps, the execution time can be greatly reduced, but changing the order of the <code>AND</code> statements doesn't affect it.</p>
  
  <pre><code>//This takes ~ 750 ms
  DataRow[] results = myDataTable.Select("Field1 LIKE '*" + term1 + "*'" +
  "AND Field2 = '" + term2 + "'" +
  "AND Field3 = '" + term3 + "'");
  
  //This also takes ~750 ms
  DataRow[] results2 = myDataTable.Select("Field3 = '" + term3 + "'" +
  "AND Field2 = '" + term2 + "'" +
  "AND Field1 LIKE '*" + term1 + "*'");  
  
  //This takes 0.415 ms
  DataTable table1 = myDataTable.Select("Field3 = '" + term3+ "'").CopyToDataTable();
  DataTable table2 = table1.Select("Field2 = '" + term2 + "'").CopyToDataTable();
  DataRow [] results3 = table2.Select("Field1 LIKE '*" + term1 + "*'");  
  </code></pre>
  
  <p>My question is, is there a way to always make the <code>SELECT</code> operation evaluate <code>AND</code> conditions in a left-to-right order so that number of records searched would be reduced between steps?  It would seem this could be a good time saver. Thank you for your ideas.  </p>