[sqlalchemy] Re: bulk insert from generator instead of list, possible?

2016-06-16 Thread Andy Crain
. Andy On Thursday, June 16, 2016 at 12:32:08 PM UTC-4, Andy Crain wrote: > > Hi, > > I'm attempting to do a bulk insert from a large .csv file. I've read > through the various options at > http://docs.sqlalchemy.org/en/latest/faq/performance.html#i-m-inserting-400-000-ro

[sqlalchemy] bulk insert from generator instead of list, possible?

2016-06-16 Thread Andy Crain
Hi, I'm attempting to do a bulk insert from a large .csv file. I've read through the various options at http://docs.sqlalchemy.org/en/latest/faq/performance.html#i-m-inserting-400-000-rows-with-the-orm-and-it-s-really-slow, and I would like to perform a bulk insert using Core, along the

[sqlalchemy] how to recycle connections grown stale after checkout

2015-06-29 Thread Andy Crain
Hi, What is the best way to forcefully/manually “recycle” a checked out connection that I know to have become stale since it was checked out? And by stale, I mean this is a MySQL connection that has idled beyond MySQL’s wait_timeout (triggering a MySQL has gone away error when it's

Re: [sqlalchemy] how to recycle connections grown stale after checkout

2015-06-29 Thread Andy Crain
seemed like the best approach. Thanks, Andy On Monday, June 29, 2015 at 4:14:11 PM UTC-4, Michael Bayer wrote: On 6/29/15 2:33 PM, Andy Crain wrote: But these seem heavy handed and wrong. What I’d like to do is just discard this stale connection (in my session and in the pool) and get

[sqlalchemy] Re: how to recycle connections grown stale after checkout

2015-06-29 Thread Andy Crain
Jonathan, Thanks, but I'm attempting to deal with connections that have expired *after* checkout. The strategies discussed at that URL address freshness of connections upon checkout. From that page: Note that the invalidation *only* occurs during checkout - not on any connections that are