title: SQLAlchemy 'bulk_save_objects' vs 'add_all' underlying logic difference?
body: <p>Considering following three methods of using sqlalchemy ORM to insert objects:</p>
  
  <p>(1)</p>
  
  <pre><code>for obj in objects:
      session.add(obj)
  </code></pre>
  
  <p>(2)</p>
  
  <pre><code>session.add_all(objects)
  </code></pre>
  
  <p>(3)</p>
  
  <pre><code>session.bulk_save_objects(objects)
  </code></pre>
  
  <p>Suppose the length of <code>objects[]</code> is <code>50000</code></p>
  
  <ul>
  <li>Does method (1) form and send <code>50000</code> insert SQL queries?</li>
  <li>Does method (2) form and send only <code>1</code> SQL query?</li>
  <li>Does method (3) form and send only <code>1</code> SQL query?</li>
  </ul>
  
  <p>I know these three methods <a href="https://docs.sqlalchemy.org/en/13/faq/performance.html#i-m-inserting-400-000-rows-with-the-orm-and-it-s-really-slow" rel="noreferrer">differ a lot in speed</a>. But what are the difference regarding to <strong>the underlying implementation details</strong>?</p>