Thanks, that's what I needed.

On Dec 9, 6:38 am, Michael Trier <[email protected]> wrote:
> > I have an object from the ORM called obj which has an attribute
> > obj.related_objects.
>
> > If I do "for ro in obj.related_objects:" does that do a query for each
> > iteration?
>
> > I have thousands of related_objects per obj and it is not as fast as i
> > would like.
>
> It will if you don't eager load the related objects.  See this section of the 
> ORM tutorial for more information about this:
>
> http://www.sqlalchemy.org/docs/05/ormtutorial.html?highlight=lazy#wor...
>
> Michael

--

You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/sqlalchemy?hl=en.


Reply via email to