What is an efficient way of inserting thousands of records into an SQLite table using Django?

后端 未结 9 780
暖寄归人
暖寄归人 2020-11-30 17:41

I have to insert 8000+ records into a SQLite database using Django\'s ORM. This operation needs to be run as a cronjob about once per minute.
At the moment I\'m using a

9条回答
  •  长情又很酷
    2020-11-30 18:37

    Bulk creation is available in Django 1.4:

    https://django.readthedocs.io/en/1.4/ref/models/querysets.html#bulk-create

提交回复
热议问题