Hiya.

I have a situation where I need to insert 20 rows into a table. I now do it like this:

for person in persons_to_be_insterted:
        Person(firstname=person['firstname'], lastname=person['lastname'])

This generates 20 (actually 40 to get back the id's) sql queries, which is quite a performance hit. Is there a way to insert these 20 objects all at once?

Attachment: smime.p7s
Description: S/MIME cryptographic signature

Reply via email to