pg.ddx.io pgsql-docs@postgresql.org mailing list archive
help / color / mirror / Atom feedCOPY optimization issue
2+ messages / 2 participants
[nested] [flat]
* COPY optimization issue
@ 2002-06-13 13:15 terry@greatgulfhomes.com
0 siblings, 1 reply; 2+ messages in thread
From: terry@greatgulfhomes.com @ 2002-06-13 13:15 UTC (permalink / raw)
To: 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
think.
Thanks
Terry Fielder
Network Engineer
Great Gulf Homes / Ashton Woods Homes
terry@greatgulfhomes.com
^ permalink raw reply [nested|flat] 2+ messages in thread
* Re: COPY optimization issue
@ 2002-06-13 13:52 Tom Lane <tgl@sss.pgh.pa.us>
parent: terry@greatgulfhomes.com
0 siblings, 0 replies; 2+ messages in thread
From: Tom Lane @ 2002-06-13 13:52 UTC (permalink / raw)
To: terry@greatgulfhomes.com; +Cc: pgsql-docs
terry@greatgulfhomes.com writes:
> I currently just use the COPY command, but with over 800,000 records, this
> takes quite some time.
> Is there a faster way?
Drop and recreate indexes might help. See
http://www.ca.postgresql.org/users-lounge/docs/7.2/postgres/populate.html
regards, tom lane
^ permalink raw reply [nested|flat] 2+ messages in thread
end of thread, other threads:[~2002-06-13 13:52 UTC | newest]
Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2002-06-13 13:15 COPY optimization issue terry@greatgulfhomes.com
2002-06-13 13:52 ` Tom Lane <tgl@sss.pgh.pa.us>
This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox