Skip site navigation (1) Skip section navigation (2)

COPY optimization issue

From: terry(at)greatgulfhomes(dot)com
To: "Postgres (E-mail)" <pgsql-docs(at)postgresql(dot)org>
Subject: COPY optimization issue
Date: 2002-06-13 13:15:26
Message-ID: 003901c212dc$627a9120$ (view raw, whole thread or download thread mbox)
Lists: pgsql-docs
My postgres database does a nightly sync with a Legacy database by
clobbering a postgres table with data from a CSV.

I currently just use the COPY command, but with over 800,000 records, this
takes quite some time.

Is there a faster way?

eg  I notice that any validation failure of ANY records causes the entire
copy to roll back.  Is this begin/commit action wrapped around the copy
costing me CPU cycles?  And if so, can I turn it off, or is there a better
way then using copy?

Note:  I do nightly vacuum's so deleted tuples is not the issue, I don't


Terry Fielder
Network Engineer
Great Gulf Homes / Ashton Woods Homes


pgsql-docs by date

Next:From: Tom LaneDate: 2002-06-13 13:52:30
Subject: Re: COPY optimization issue
Previous:From: Bruce MomjianDate: 2002-06-08 04:23:43
Subject: Re: Updated Russian version of FAQ

Privacy Policy | About PostgreSQL
Copyright © 1996-2017 The PostgreSQL Global Development Group