[sqlalchemy] Re: Slow execution of SQLAlchemy statements vs. plain text

2019-05-28 Thread Sebastian Meinhardt
The profiler results are in but they do not tell me anything that I did not already find by manually stepping through the code. See my first post, above. The method that takes all the time is `execute` of `cx_Oracle.Cursor` itself. I cannot step into that because that is some C-call. I did

[sqlalchemy] Re: Slow execution of SQLAlchemy statements vs. plain text

2019-05-28 Thread Sebastian Meinhardt
Thank you for the pointers! After digging into this some more, I found that this is definitely related to something in cartain versions of SQLAlchemy. I also tried different versions of cx_Oracle (6.4.1, 7.1.2, and 7.1.3) but that had no effect on the performance of the statement. I did not

[sqlalchemy] Slow execution of SQLAlchemy statements vs. plain text

2019-05-27 Thread Sebastian Meinhardt
Hello, given an SQLAlchemy engine `con` (cx_oracle dialect) and a moderately complex SQLAlchemy selectable object `sql`, the following code will consistently take ~15 seconds: con.execute(sql).fetchall() Whereas with the exact same engine and query the following code will only take a

Re: [sqlalchemy] Connection pool takes a long time to handle a closed connection

2018-10-25 Thread Sebastian Meinhardt
On Thursday, October 25, 2018 at 3:48:24 PM UTC+2, Mike Bayer wrote: > > > OK, so I believe your script should be using KILL SESSION, I've just > tried this and the effects are immediate: > > Yes, my own tests that I did in the meantime confirm this. As the original system is still down for

Re: [sqlalchemy] Connection pool takes a long time to handle a closed connection

2018-10-25 Thread Sebastian Meinhardt
Thank you for the advice. I will surely try out all the suggestions to isolate the exact cause of the problem. Unfortunately, today of all days is the annual maintenance and the system is down. I will try to reproduce the problem on a similar system. According to our database administrator,