title: Batch select with SQLAlchemy
body: <p>I have a large set of values V, some of which are likely to exist in a table T.  I would like to insert into the table those which are not yet inserted.  So far I have the code:</p>
  
  <pre><code>for value in values:
          s = self.conn.execute(mytable.__table__.select(mytable.value == value)).first()      
          if not s:
              to_insert.append(value)
  </code></pre>
  
  <p>I feel like this is running slower than it should.  I have a few related questions:</p>
  
  <ol>
  <li>Is there a way to construct a select statement such that you provide a list (in this case, 'values') to which sqlalchemy responds with records which match that list?</li>
  <li>Is this code overly expensive in constructing select objects?  Is there a way to construct a single select statement, then parameterize at execution time?</li>
  </ol>