Google Cloud SQL: Alternative to LOAD DATA INFILE

前端 未结 2 633
说谎
说谎 2020-12-21 05:45

I am working in Google App Engine and we have a Python script that dumps data in Google Cloud SQL. One of the data sets we have to dump is huge. We dump around 150K rows of

2条回答
  •  攒了一身酷
    2020-12-21 06:25

    Things you can do to get better bulk import performance:

    • Create a .sql file and do an import
    • Make sure that the insert statements do more than one row at a time. A good rule of thumb is one megabyte per INSERT.
    • Switch to async replication
    • Do the import from an App Engine app. The app will be colocated with your Cloud SQL instance, greatly reducing the network latency.

提交回复
热议问题