Re: slow insert into very large table

From: Andreas Pflug <pgadmin(at)pse-consulting(dot)de>
To: Wolfgang Gehner <wgehner(at)infonoia(dot)com>
Cc: pgsql-performance(at)postgresql(dot)org
Subject: Re: slow insert into very large table
Date: 2005-12-01 14:00:07
Message-ID: 438F01E7.9000300@pse-consulting.de
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-performance

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

In response to

Browse pgsql-performance by date

  From Date Subject
Next Message David Lang 2005-12-01 14:16:17 Re: 15,000 tables
Previous Message Michael Riess 2005-12-01 13:42:14 15,000 tables