Unsupported versions: 7.0
Historical version. PostgreSQL 7.0 has reached end of support. See the current manual.
Chapter 18. Populating a Database
- Table of Contents
- Disable Auto-commit
- Use COPY FROM
- Remove Indices
Author: Written by Tom Lane, from an e-mail message dated 1999-12-05.
One may need to do a large number of table insertions when first populating a database. Here are some tips and techniques for making that as efficient as possible.
Disable Auto-commit
Turn off auto-commit and just do one commit at the end. Otherwise Postgres is doing a lot of work for each record added. In general when you are doing bulk inserts, you want to turn off some of the database features to gain speed.
Report a documentation issue
Read the upstream documentation. For corrections, first check the current manual.