>
> COPY is supposed to be many times faster than even multi-row inserts, this
> StackOverflow answer has a short explanation:
>
> https://stackoverflow.com/a/32045034/980575


For the sake of the archives, I thought I'd post a couple of more links on
this subject to augment Jim's link:

Depesz seems to be much respected in the Postgres world and his advice is
still considered sound:
https://www.depesz.com/2007/07/05/how-to-insert-data-to-database-as-fast-as-possible/

The official docs have a section on this subject too:
https://www.postgresql.org/docs/9.6/static/populate.html

Note that Postgres has been around for ages (since the 1980s) and so it's
easy to find threads with less than up-to-the-minute advice. I'm using the
current shipping version, 9.6.3. Version 9.5 added some substantial new
features (like INSERT ON CONFLICT) and various optimizations. So, if you're
reading this from the future, check out materials that take into account
whatever version you're using there.
**********************************************************************
4D Internet Users Group (4D iNUG)
FAQ:  http://lists.4d.com/faqnug.html
Archive:  http://lists.4d.com/archives.html
Options: http://lists.4d.com/mailman/options/4d_tech
Unsub:  mailto:4d_tech-unsubscr...@lists.4d.com
**********************************************************************

Reply via email to