I'll try to make this succinct...

I'm creating a temporary table and then doing a query with it that takes a 
good length of time.  I found that the source tables going into the 
temporary table were being locked after the temporary table was created 
even though they were no longer needed for the second much longer query. 
 Apparently "create temporary table" in MySQL doesn't autocommit and so the 
transaction is locking a lot more than needed.  So...  I tried committing 
right after creating the temporary table, but now I randomly lose the 
temporary table because SQLAlchemy sees the commit as a reason to return 
the connection back to the connection pool and then get back another 
connection on the next query.  So, as the temporary table is persistent 
only on that connection I usually lose the table as I usually don't get the 
very same connection back from the pool.

I'd like to be able to tell MySQL to commit after creating the temporary 
table so I can drop the locks used to fill that table, but I want to make 
sure SQLAlchemy doesn't let go of the connection and return it to the pool.

-- 
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/groups/opt_out.

Reply via email to