Re: [sqlalchemy] Windowed Queries breaking after a commit and emitting many, many Selects.

2014-10-26 Thread James Meneghello
Actually came to the same answer reading through the docs again, good timing. Disabling expire_on_commit seems to have done the trick. Not entirely sure why it's attempting to access objects previously expired. My understanding is that it works like this: for row in windowed_query(query, Item.i

Re: [sqlalchemy] Eager Loading of AssociationProxy (Generic Association with Discriminator on Association)

2014-10-26 Thread Michael Bayer
> On Oct 26, 2014, at 12:07 AM, Victor Reichert wrote: > > Hi, > > I am following the "Generic Association with Discriminator on Association" > example at: > > http://docs.sqlalchemy.org/en/latest/_modules/examples/generic_associations/discriminator_on_association.html > >

Re: [sqlalchemy] Windowed Queries breaking after a commit and emitting many, many Selects.

2014-10-26 Thread Michael Bayer
> On Oct 26, 2014, at 5:25 AM, James Meneghello wrote: > > The application I'm working on operates over extremely large datasets, so I'm > using the query windowing from here > (https://bitbucket.org/zzzeek/sqlalchemy/wiki/UsageRecipes/WindowedRangeQuery) > to break it into manageable chunks.

[sqlalchemy] Windowed Queries breaking after a commit and emitting many, many Selects.

2014-10-26 Thread James Meneghello
The application I'm working on operates over extremely large datasets, so I'm using the query windowing from here (https://bitbucket.org/zzzeek/sqlalchemy/wiki/UsageRecipes/WindowedRangeQuery) to break it into manageable chunks. The query window is usually around 10k rows, after which it update