Currently the Postgres bulk inserter uses a standard INSERT INTO ... VALUES query to insert data. This is slow compared to COPY data FROM STDIN WITH (FORMAT BINARY).
Given that we already use COPY to fetch data fast it would make sense to me to use the same trick in reverse to insert data fast. And example project which does something similar is https://github.com/adriangb/pgpq.
Currently the Postgres bulk inserter uses a standard
INSERT INTO ... VALUESquery to insert data. This is slow compared toCOPY data FROM STDIN WITH (FORMAT BINARY).Given that we already use
COPYto fetch data fast it would make sense to me to use the same trick in reverse to insert data fast. And example project which does something similar is https://github.com/adriangb/pgpq.