I want to upload 3 GB csv file to the pg database on server.
I need to finish this operation in 4 to 5 hours.
Please show me the way to upload data to server from csv file.
I want to upload 3 GB csv file to the pg database on server.
I need to finish this operation in 4 to 5 hours.
Please show me the way to upload data to server from csv file.
 
    
     
    
    If you can take the DB offline, copy the file to the server with (e.g.) scp, then use pg_bulkload.
Otherwise split it into chunks and use psql's \copy to load the chunks in parallel, after dropping indexes etc.
See also:
 
    
    