I just want to point out something in Simon's first response that might 
have been missed:

Simon batched the query, then used a `commit()` at the end of each batch. 
 That `commit` is pretty important, because it limits his code to only 
keeping SqlAlchemy objects for the batch -- not every item that has been 
seen.

That approach is usually the most efficient, because looking up a record in 
the database is often faster than keeping a duplicate version of every 
object in python's memory.

-- 
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.
For more options, visit https://groups.google.com/d/optout.

Reply via email to