Thanks Mike, that clears up a few things

On Jun 27, 2:08 am, "Mike Orr" <[EMAIL PROTECTED]> wrote:
> On 6/26/07, voltron <[EMAIL PROTECTED]> wrote:
>
> > sess = create_session()
> > allusers = sess.query(User).select()
>
> > for user in allusers:
> >     user.group = "contractor"
> >     print x.name
>
> This adds the overhead of creating a Python object for every row.  If
> you already have many of the objects in memory anyway or the overhead
> is too small to be noticeable, you can do it this way.  Rick's way
> sends one small query to the database, which does it all internally.
>
> --
> Mike Orr <[EMAIL PROTECTED]>


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"sqlalchemy" group.
To post to this group, send email to sqlalchemy@googlegroups.com
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