Re: [sqlalchemy] How do Insert statements for single-table inheritance tables get batched together?

2017-10-11 Thread vineet
I ran some tests using raw psycopg2 on my local computer, and also ran some tests with SQLAlchemy. I misunderstood a few things in my tests above, but I've explained the tests below and think they are more accurate. *Context:* - Each test was run 5 times and averaged. - Both the python and datab

Re: [sqlalchemy] Problem with offset and joined relationship

2017-10-11 Thread Mike Bayer
On Wed, Oct 11, 2017 at 4:20 AM, Julien Meyer wrote: > Thanks for your response. > I tried to reproduce the problem on a small environment without success. > > In my use case, the schema name is set dynamically to support cross database > query. I suppose the problem comes from this point. hmm yo

Re: [sqlalchemy] How do Insert statements for single-table inheritance tables get batched together?

2017-10-11 Thread Mike Bayer
On Wed, Oct 11, 2017 at 3:02 AM, wrote: > Hey Mike, > > Thanks again for the detailed explanations! > > I went ahead and tested the code snippet you gave me - I'm not sure I > totally understand when this will change behavior though. > > I tried the following code snippet: > (Snippet #1) > for i

Re: [sqlalchemy] Problem with offset and joined relationship

2017-10-11 Thread Julien Meyer
Thanks for your response. I tried to reproduce the problem on a small environment without success. In my use case, the schema name is set dynamically to support cross database query. I suppose the problem comes from this point. I solved my problem by setting an other relationship to 'joined'. B

Re: [sqlalchemy] How do Insert statements for single-table inheritance tables get batched together?

2017-10-11 Thread vineet
Hey Mike, Thanks again for the detailed explanations! I went ahead and tested the code snippet you gave me - I'm not sure I totally understand when this will change behavior though. I tried the following code snippet: (Snippet #1) for i in xrange(10): db.session.add(A(id=i)) db.session.flus