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

答复: [PERFORM] Improve COPY performance

From: "jay" <jackem(dot)mojx(at)alibaba-inc(dot)com>
To: "'Ryan Hansen'" <ryan(dot)hansen(at)brightbuilders(dot)com>,<pgsql-performance(at)postgresql(dot)org>
Subject: 答复: [PERFORM] Improve COPY performance
Date: 2008-09-11 01:23:04
Message-ID: 003a01c913ac$f0723910$ (view raw or whole thread)
Lists: pgsql-performance
I suspect your table has index, or checkpoint_segments is small and lead PG
do checkpoint frequently. 
If the table has index or constraint, drop it and copy it ,after copy
finished, do create index or constraint again.
If checkpoint_segments is small, enlarge it.
And also you can turn fsync off when you do copy, after finish, turn it on
And also you can enlarge maintenance_work_mem.

If you take above, time cost will down significantly.

贸易通ID:jaymo 淘宝ID:jackem

发件人: pgsql-performance-owner(at)postgresql(dot)org
[mailto:pgsql-performance-owner(at)postgresql(dot)org] 代表 Ryan Hansen
发送时间: 2008年9月11日 1:14
收件人: pgsql-performance(at)postgresql(dot)org
主题: Re: [PERFORM] Improve COPY performance for large data sets


I found it.  Turns out there was still a constraint on the table.  Once 
I dropped that, the time went down to 44 minutes.

Maybe I am an idiot after all. :)


In response to

pgsql-performance by date

Next:From: Greg SmithDate: 2008-09-11 04:12:58
Subject: Re: Effects of setting linux block device readahead size
Previous:From: Scott CareyDate: 2008-09-10 21:17:28
Subject: Re: Effects of setting linux block device readahead size

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