pg.ddx.io  pgsql-performance@postgresql.org mailing list archive  
help / color / mirror / Atom feed
slow insert into very large table
3+ messages / 3 participants
[nested] [flat]

* slow insert into very large table
@ 2005-12-01 12:33 Wolfgang Gehner <wgehner@infonoia.com>
  2005-12-01 14:00 ` Re: slow insert into very large table Andreas Pflug <pgadmin@pse-consulting.de>
  2005-12-01 15:50 ` Re: slow insert into very large table Tom Lane <tgl@sss.pgh.pa.us>
  0 siblings, 2 replies; 3+ messages in thread

From: Wolfgang Gehner @ 2005-12-01 12:33 UTC (permalink / raw)
  To: pgsql-performance

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?

Kindest regards,

Wolfgang Gehner

-- 
Infonoia SA
7 rue de Berne
1211 Geneva 1
Tel: +41 22 9000 009
Fax: +41 22 9000 018
http://www.infonoia.com





^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: slow insert into very large table
  2005-12-01 12:33 slow insert into very large table Wolfgang Gehner <wgehner@infonoia.com>
@ 2005-12-01 14:00 ` Andreas Pflug <pgadmin@pse-consulting.de>
  1 sibling, 0 replies; 3+ messages in thread

From: Andreas Pflug @ 2005-12-01 14:00 UTC (permalink / raw)
  To: Wolfgang Gehner <wgehner@infonoia.com>; +Cc: 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



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: slow insert into very large table
  2005-12-01 12:33 slow insert into very large table Wolfgang Gehner <wgehner@infonoia.com>
@ 2005-12-01 15:50 ` Tom Lane <tgl@sss.pgh.pa.us>
  1 sibling, 0 replies; 3+ messages in thread

From: Tom Lane @ 2005-12-01 15:50 UTC (permalink / raw)
  To: Wolfgang Gehner <wgehner@infonoia.com>; +Cc: pgsql-performance

Wolfgang Gehner <wgehner@infonoia.com> writes:
> This is with PostgreSQL 8.0 final for WindowsXP on a Pentium 1.86 GHz, 
> 1GB Memory. HD is fast IDE.

Try something more recent, like 8.0.3 or 8.0.4.  IIRC we had some
performance issues in 8.0.0 with tables that grew from zero to large
size during a single session.

			regards, tom lane



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2005-12-01 15:50 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2005-12-01 12:33 slow insert into very large table Wolfgang Gehner <wgehner@infonoia.com>
2005-12-01 14:00 ` Andreas Pflug <pgadmin@pse-consulting.de>
2005-12-01 15:50 ` Tom Lane <tgl@sss.pgh.pa.us>

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