I would do commit after each 10000 inserts

data #some array of dicts
for i in xrange(len(data)):
    db.table.insert(**data[i])
    if i%10000==0:
        db.commit()
db.commit()

-- 



Reply via email to