pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
From: Andreas Pflug <pgadmin@pse-consulting.de>
To: Wolfgang Gehner <wgehner@infonoia.com>
Cc: pgsql-performance@postgresql.org
Subject: Re: slow insert into very large table
Date: Thu, 01 Dec 2005 14:00:07 +0000
Message-ID: <438F01E7.9000300@pse-consulting.de> (raw)
In-Reply-To: <438EED91.9080302@infonoia.com>
References: <438EED91.9080302@infonoia.com>

Wolfgang Gehner wrote:
> Hi there,
> 
> I need a simple but large table with several million records. I do batch 
> inserts with JDBC. After the first million or so records,
> the inserts degrade to become VERY slow (like 8 minutes vs initially 20 
> secondes).
> 
> The table has no indices except PK while I do the inserts.
> 
> This is with PostgreSQL 8.0 final for WindowsXP on a Pentium 1.86 GHz, 
> 1GB Memory. HD is fast IDE.
> 
> I already have shared buffers already set to 25000.
> 
> I wonder what else I can do. Any ideas?

Run VACUUM ANALYZE to have statistics reflect the growth of the table. 
The planner probably still assumes your table to be small, and thus 
takes wrong plans to check PK indexes or so.

Regards,
Andreas



view thread (3+ messages)  latest in thread

Message-ID: <438F01E7.9000300@pse-consulting.de>
Permalink:  ../438F01E7.9000300@pse-consulting.de/
Also on:    postgresql.org/message-id/438F01E7.9000300@pse-consulting.de

 · 

reply

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: pgadmin@pse-consulting.de, wgehner@infonoia.com
  Subject: Re: slow insert into very large table
  In-Reply-To: <438F01E7.9000300@pse-consulting.de>

* 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