Improve speed of COPY COMMAND in postgres I would like to understand if increasing work_mem does help improving the speed of the COPY command.

Does COPY use work_mem or maint_work_mem extensively?
No, COPY does not need a lot of memory.

There are two things to speed up COPY:


Remove any indexes and constraints on the table before you COPY into it.
Increase max_wal_size so that you don't get more checkpoints than necessary.

Of course, if you COPY into an UNLOGGED table, it will be even faster.