Re: COPY from STDIN vs file with large CSVs

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 





On Wed, Jan 8, 2020 at 8:55 AM Wells Oliver <wells.oliver@xxxxxxxxx> wrote:
I have a CSV that's ~30GB. Some 400m rows. Would there be a meaningful performance difference to run COPY from STDIN using: cat f.csv | psql "COPY .. FROM STDIN WITH CSV" versus just doing "COPY ... FROM 'f.csv' WITH CSV"?

If you're looking to speed up the loading - and your disk subsystem is decent - consider running your csv through the "split" command to decompose it into smaller CSV files. You can then load them in parallel using multiple psql sessions.

[Index of Archives]     [KVM ARM]     [KVM ia64]     [KVM ppc]     [Virtualization Tools]     [Spice Development]     [Libvirt]     [Libvirt Users]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite Questions]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux