On Fri, Apr 26, 2013 at 12:24 PM, Werner <werner.bru...@sfr.fr> wrote: > On 26/04/2013 17:07, Claudio Freire wrote: >> >> On Fri, Apr 26, 2013 at 12:06 PM, Werner <werner.bru...@sfr.fr> wrote: >>> >>> http://sqlalchemy.readthedocs.org/en/rel_0_8/orm/tutorial.html#querying >> >> >> Not entirely, if you don't use yield_per (as shown in the docs in >> fact, but worth mentioning). >> >> Seeing query: >> >> if self._yield_per: >> fetch = cursor.fetchmany(self._yield_per) >> if not fetch: >> break >> else: >> fetch = cursor.fetchall() >> >> Not only that, but also all rows are processed and saved to a local >> list, so all instances are built and populated way before you get the >> first row. That is, unless you specify yield_per. > > Oops, thanks for correcting me.
Um... a tad OT, but looking at that code, there's lots of opportunities for optimization. I'll have to profile a bit and let you know. -- 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?hl=en. For more options, visit https://groups.google.com/groups/opt_out.