Django: Using custom raw SQL inserts with executemany and MySQL

前端 未结 4 1100
心在旅途
心在旅途 2020-12-14 13:23

I need to upload a lot of data to a MySQL db. For most models I use django\'s ORM, but one of my models will have billions (!) of instances and I would like to optimize its

4条回答
  •  陌清茗
    陌清茗 (楼主)
    2020-12-14 13:50

    are you serisouly suggesting loading billions of rows (sorry instances) of data via some ORM data access layer - how long do you have ?

    bulk load if possible - http://dev.mysql.com/doc/refman/5.1/en/load-data.html

提交回复
热议问题