Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PYTHON

how to save bulk create in django

# took 0.47 seconds
def builtin():
    insert_list = []
    for i in range(10000):
        name="String number %s" %i
        insert_list.append(Record(name=name))
    Record.objects.bulk_create(insert_list)
Source by voorloopnul.com #
 
PREVIOUS NEXT
Tagged: #save #bulk #create #django
ADD COMMENT
Topic
Name
9+3 =