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

后端 未结 9 781
暖寄归人
暖寄归人 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:39

    You should check out DSE. I wrote DSE to solve these kinds of problems ( massive insert or updates ). Using the django orm is a dead-end, you got to do it in plain SQL and DSE takes care of much of that for you.

    Thomas

提交回复
热议问题