I have the following bit of code:
horses = (data.session.query(data.Horse).
filter(or_(data.Horse.sire == None, data.Horse.dam ==
None)).
filter(data.Horse.skip_pedigree == False,
data.Horse.foaled != None))
data.session.commit()
for horse in horses:
print horse
dl_pedigree_name(horse)
the commit()s in dl_pedigree_name() take upwards of 9 seconds,
but if I run the same query but with [:100]:
horses = (data.session.query(data.Horse).
filter(or_(data.Horse.sire == None, data.Horse.dam ==
None)).
filter(data.Horse.skip_pedigree == False,
data.Horse.foaled != None))[:100]
they take less than a second.
Any ideas why and what I can do about it?
thanks
Ed
--
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.