From: Rajesh Kumar Mallah <mallah.rajesh@gmail.com>
To: Steven Flatt <steven.flatt@gmail.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: Insertion to temp table deteriorating over time
Date: Wed, 13 Dec 2006 22:44:10 +0530
Message-ID: <a97c77030612130914r5e95add6la00cb21612de56f2@mail.gmail.com> (raw)
In-Reply-To: <357fa7590612130844q58ef3ca5q31e164f9b006e0fc@mail.gmail.com>
References: <357fa7590612130844q58ef3ca5q31e164f9b006e0fc@mail.gmail.com>
On 12/13/06, Steven Flatt <steven.flatt@gmail.com> wrote:
> Hi,
>
> Our application is using Postgres 7.4 and I'd like to understand the root
> cause of this problem:
>
> To speed up overall insert time, our application will write thousands of
> rows, one by one, into a temp table
1. how frequently are you commiting the transaction ?
if you commit less frequetly it will be faster.
2. If you use COPY instead of INSERT it will be faster.
using COPY is easy with DBD::Pg (perl). In versions
8.x i think there has been major speed improvements
in COPY.
I do not know the root cause of slowdown though.
Regds
mallah.
>
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: mallah.rajesh@gmail.com, steven.flatt@gmail.com
Subject: Re: Insertion to temp table deteriorating over time
In-Reply-To: <a97c77030612130914r5e95add6la00cb21612de56f2@mail.gmail.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