I'm attempting to move medium amounts of data around in PostgreSQL (tens-to-hundreds of millions of rows).
In designing the system, I'm trying to understand: How does the performance of INSERT INTO table(field1, field2) SELECT field1, field2 FORM other_table compared with COPY FROM ... BINARY in PostgreSQL?
I can't find any documentation that directly speaks to that question. Some considerations I can see:
INTO INTO ... SELECTrequires both reads and writes from the same diskCOPY FROM ... BINARYrequires either a client that has the data, or doing a round-tripCOPY TO ...piped toCOPY FROM ...
But I'm sure there are others, I'm hoping there's some form of canonical performance guidance around comparative expectations for these.