femski wrote:
I have a batch application that writes approx. 4 million rows into a narrow
table. I am using JDBC addBatch/ExecuteBatch with auto commit turned off.
Batch size is 100. So far I am seeing Postgres take roughly five times the
time it takes to do this in the Oracle.

The usual tricks are:
- Drop indexes before loading, and rebuild them afterwards.
- Disable foreign key references while loading
- Use COPY instead of JDBC

Is the loading I/O or CPU bound? How long does the load actually take?

Are you running the latest version of PostgreSQL and the JDBC driver?

Have you read the "Populating a Database" chapter in the manual: http://www.postgresql.org/docs/8.2/interactive/populate.html

--
  Heikki Linnakangas
  EnterpriseDB   http://www.enterprisedb.com

---------------------------(end of broadcast)---------------------------
TIP 9: In versions below 8.0, the planner will ignore your desire to
      choose an index scan if your joining column's datatypes do not
      match

Reply via email to