You really want to test this yourself on YOUR setup. I know my code is sending a single execute for this scenario, but I'm not hitting any speed bumps. Set echo to True and see what happens. (a_table.metadata.bind.echo = True). Then set it back to False. You can change echo on the fly.
On Friday, September 5, 2014 6:34:09 PM UTC-4, Joshua Ma wrote: > > Hi all, > > Can someone confirm for me that, when Connection.execute is run with an > UPDATE statement and a list of 100k values, you get a batch update query > that incurs only one DB round-trip instead of 100k roundtrips? And this > should be true for alembic's execute ( > http://alembic.readthedocs.org/en/latest/ops.html#alembic.operations.Operations.execute) > > as well? > > I'm asking because I thought that's what it did, but we're hitting some > speed bumps during a migration (doing a few hundred thousand updates) and > I'm starting to suspect that it's somehow waiting for each update query to > come back before sending the next. > > I'm probably wrong though, so I was hoping someone could confirm the bulk > behavior for me before I dig deeper. Running alembic 0.6.5 and SQLAlchemy > 0.9.4. > > Thanks! > Josh > -- You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sqlalchemy+unsubscr...@googlegroups.com. To post to this group, send email to sqlalchemy@googlegroups.com. Visit this group at http://groups.google.com/group/sqlalchemy. For more options, visit https://groups.google.com/d/optout.