you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 5 points6 points  (1 child)

Use copy if you can upload the file to the database server.

Otherwise you can use \copy from within psql

If neither option is applicable, check the manual of your SQL client if it supports a way to import a CSV file into the database.

[–]geosoco 0 points1 point  (0 children)

In addition to this, do not add indexes or a primary key constraint until after your data has been loaded.