Re: [sqlalchemy] orm query that returns millions of rows

2012-03-06 Thread Michael Bayer
On Mar 6, 2012, at 1:37 AM, Chris Withers wrote: On 02/03/2012 15:59, Michael Bayer wrote: the other recipe is the windowed range query which I normally use for this at http://www.sqlalchemy.org/trac/wiki/UsageRecipes/WindowedRangeQuery, So, this would be the way to go for Microsoft SQL

Re: [sqlalchemy] orm query that returns millions of rows

2012-03-05 Thread Chris Withers
On 02/03/2012 15:59, Michael Bayer wrote: the other recipe is the windowed range query which I normally use for this at http://www.sqlalchemy.org/trac/wiki/UsageRecipes/WindowedRangeQuery, So, this would be the way to go for Microsoft SQL Server? cheers, Chris -- Simplistix - Content

[sqlalchemy] orm query that returns millions of rows

2012-03-02 Thread Chris Withers
Hi All, I need to do a query that, in its simplest form, would be: for row in session.query(Message.body).order_by(Message.session_num): ...do read-only stuff with row and then discard... However, as that query will return roughly 20-40 million rows per time, I'm guessing the above may not

Re: [sqlalchemy] orm query that returns millions of rows

2012-03-02 Thread Michael Bayer
On Mar 2, 2012, at 4:21 AM, Chris Withers wrote: Hi All, I need to do a query that, in its simplest form, would be: for row in session.query(Message.body).order_by(Message.session_num): ...do read-only stuff with row and then discard... However, as that query will return roughly