title: In SQLAlchemy, is a filter applied before or after a join?
body: <p>Using SQLAlchemy, I'm performing queries like the one below:</p>
  
  <pre><code>import models as m
  import sqlalchemy as sa
  
  s = session_maker()
  q = s.query(m.ShareCount, m.Article)
  .join(m.Article)
  .filter(sa.and_(start &lt; m.ShareCount.tstamp, m.ShareCount.tstamp &lt; end))
  </code></pre>
  
  <p>Is the <code>filter</code> applied before or after the <code>join</code> is performed?</p>