April 2018
Intermediate to advanced
508 pages
15h 22m
English
The preferred path to get a lot of data into the database is by using the COPY command. This is the fastest way to insert a set of rows. If that's not practical and you have to use INSERT instead, you should try to include as many records as possible per commit, wrapping several into a BEGIN/COMMIT block. Most applications find that between 100 and 1,000 rows per commit gives the majority of the best performance possible in doing batch inserts, but it's still not going to be as fast as COPY.
From slowest to fastest, this is the usual ranking:
Read now
Unlock full access