From: jay <jackem.mojx@alibaba-inc.com>
To: 'Ryan Hansen' <ryan.hansen@brightbuilders.com>
To: pgsql-performance@postgresql.org
Subject: 答复: [PERFORM] Improve COPY performance for large data sets
Date: Thu, 11 Sep 2008 09:23:04 +0800
Message-ID: <003a01c913ac$f0723910$6744000a@hz.ali.com> (raw)
In-Reply-To: <48C8006F.50706@brightbuilders.com>
References: <48C8006F.50706@brightbuilders.com>
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
again.
And also you can enlarge maintenance_work_mem.
If you take above, time cost will down significantly.
莫建祥
阿里巴巴软件(上海)有限公司
研发中心-IM服务端开发部
联系方式:86-0571-85022088-13072
贸易通ID:jaymo 淘宝ID:jackem
公司网站:www.alisoft.com
wiki:http://10.0.32.21:1688/confluence/pages/viewpage.action?pageId=10338
-----邮件原件-----
发件人: pgsql-performance-owner@postgresql.org
[mailto:pgsql-performance-owner@postgresql.org] 代表 Ryan Hansen
发送时间: 2008年9月11日 1:14
收件人: pgsql-performance@postgresql.org
主题: Re: [PERFORM] Improve COPY performance for large data sets
NEVERMIND!!
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. :)
-Ryan
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Reply to all the recipients using the --to and --cc options:
reply via email
To: pgsql-performance@postgresql.org
Cc: jackem.mojx@alibaba-inc.com, ryan.hansen@brightbuilders.com
Subject: Re: 答复: [PERFORM] Improve COPY performance for large data sets
In-Reply-To: <003a01c913ac$f0723910$6744000a@hz.ali.com>
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
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