On Friday, June 3, 2016 at 7:49:23 AM UTC-4, Krishnakant wrote: > > So it will have no performance difference is it? >
> If both do same thing then how and why will explicit connection help me > better? > the `engine.execute()` will be slower, because you will be creating/checking-out a different connection for each operation in the for-loop and (needlessly) leveraging the sqlalchemy connection pool. if you use `connection.execute()` with a single connection, then you don't have as much overhead involved with the connection pool management. Your errors are probably from improperly implementing the connection pool. I suggest re-reading the connection pool docs and faq to get a better understanding of what it does and why it does that. -- 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 https://groups.google.com/group/sqlalchemy. For more options, visit https://groups.google.com/d/optout.