From: Steve Atkins <steve@blighty.com>
To: pgsql-performance@postgresql.org
Subject: Re: Performace Optimization for Dummies
Date: Thu, 28 Sep 2006 11:24:59 -0700
Message-ID: <5EE4B6D1-8ECE-4033-A912-DFD9146A5A93@blighty.com> (raw)
In-Reply-To: <efh26m$2fd$1@news.hub.org>
References: <efgu4v$276m$1@news.hub.org>
<b42b73150609281017m7f8f9d86xfa32d38cec954af7@mail.gmail.com>
<efh26m$2fd$1@news.hub.org>
On Sep 28, 2006, at 10:53 AM, Carlo Stonebanks wrote:
>> are you using the 'copy' interface?
>
> Straightforward inserts - the import data has to transformed,
> normalised and
> de-duped by the import program. I imagine the copy interface is for
> more
> straightforward data importing. These are - buy necessity - single row
> inserts.
Are you wrapping all this in a transaction?
You're doing some dynamically generated selects as part of the
"de-duping" process? They're probably the expensive bit. What
do those queries tend to look like?
Are you analysing the table periodically? If not, then you might
have statistics based on an empty table, or default statistics, which
might cause the planner to choose bad plans for those selects.
Talking of which, are there indexes on the table? Normally you
wouldn't have indexes in place during a bulk import, but if you're
doing selects as part of the data load process then you'd be forcing
sequential scans for every query, which would explain why it gets
slower as the table gets bigger.
Cheers,
Steve
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 from your mail client; the link fills in
the headers below: reply via email
Some clients, webmail especially, drop In-Reply-To and References from
a link, and the reply then starts a new thread: use the mbox below.
To: pgsql-performance@postgresql.org
Cc: steve@blighty.com
Subject: Re: Performace Optimization for Dummies
In-Reply-To: <5EE4B6D1-8ECE-4033-A912-DFD9146A5A93@blighty.com>
References: <efgu4v$276m$1@news.hub.org> <b42b73150609281017m7f8f9d86xfa32d38cec954af7@mail.gmail.com> <efh26m$2fd$1@news.hub.org> <5EE4B6D1-8ECE-4033-A912-DFD9146A5A93@blighty.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